wang-hao-jie
2021-12-27 fb53a9997de491c3d0a30ed333a6bd3b24877b82
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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);
 
    @Select("select sum(likes) from t_driving_record where user_id=#{userId}")
    Integer sumLikeByUserId(String userId);
}