bug
zhangzeli
2022-01-11 9c1840e4302d8c4f7af549e5de412488073490bf
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);
}