| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import cn.exrick.xboot.your.entity.DrivingRecord; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | */ |
| | | 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); |
| | | |
| | | @Select("select count(id) from t_driving_record where yin_huan=1") |
| | | int count2(); |
| | | } |