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 { @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); }