wang-hao-jie
2021-11-22 24908b26035b3aefe84ba557e7cddd5a9a8aece9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package cn.exrick.xboot.your.mapper;
 
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.exrick.xboot.your.entity.DrivingRecord;
import org.apache.ibatis.annotations.Select;
 
import java.util.List;
 
/**
 * 行车记录数据处理层
 * @author zhangzeli
 */
public interface DrivingRecordMapper extends BaseMapper<DrivingRecord> {
 
    @Select("select max(mileage) from t_driving_record where user_id=#{userId}")
    Integer maxByUserId(String userId);
 
    @Select("select min(mileage) from t_driving_record where user_id=#{userId}")
    Integer minByUserId(String userId);
}