| | |
| | | package com.yeshi.fanli.dao.mybatis.integral; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import com.yeshi.fanli.dao.BaseMapper; |
| | | import com.yeshi.fanli.entity.integral.IntegralDetail; |
| | | import com.yeshi.fanli.vo.integral.IntegralMonthVO; |
| | | |
| | | public interface IntegralDetailMapper extends BaseMapper<IntegralDetail> { |
| | | |
| | | /** |
| | | * 获取用户总共有多少记录数据 |
| | | * |
| | | * @param uid |
| | | * @return |
| | | */ |
| | | Long selectCountByUid(@Param("uid") Long uid, @Param("type")Integer type); |
| | | |
| | | /** |
| | | * 按用户ID和最大时间检索月份的数量 |
| | | * |
| | | * @param uid |
| | | * @param maxDate |
| | | * @return |
| | | */ |
| | | int selectMonthCountByUid(@Param("uid") Long uid, @Param("date") Date maxDate, @Param("type")Integer type); |
| | | |
| | | |
| | | /** |
| | | * 按最大的创建时间和用户ID检索数量 |
| | | * |
| | | * @param uid |
| | | * @param date |
| | | * @return |
| | | */ |
| | | Long selectCountByUidAndMaxCreateTime(@Param("uid") Long uid, @Param("date") Date date, @Param("type")Integer type); |
| | | |
| | | |
| | | /** |
| | | * 按最大的创建时间和用户ID检索列表 |
| | | * |
| | | * @param uid |
| | | * @param date |
| | | * @return |
| | | */ |
| | | List<IntegralDetail> selectByMaxCreateTime(@Param("uid") Long uid, @Param("date") Date date, @Param("count") int count, @Param("type")Integer type); |
| | | |
| | | |
| | | /** |
| | | * 通过用户ID和返回的最大时间的详情ID来获取下一页的数据 |
| | | * |
| | | * @param uid |
| | | * @param id |
| | | * @param count |
| | | * @return |
| | | */ |
| | | List<IntegralDetail> selectByUidWithIndexId(@Param("uid") Long uid, @Param("id") Long id, @Param("count") int count, @Param("type")Integer type); |
| | | |
| | | |
| | | /** |
| | | * 统计某个月份的收入与支出 |
| | | * |
| | | * @param uid |
| | | * @param dateFormat |
| | | * @return |
| | | */ |
| | | List<IntegralMonthVO> selectMonthMoneyByUid(@Param("uid") Long uid, @Param("dateFormat") List<String> dateFormat); |
| | | |
| | | package com.yeshi.fanli.dao.mybatis.integral;
|
| | |
|
| | | import java.math.BigDecimal;
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | |
|
| | | import org.apache.ibatis.annotations.Param;
|
| | |
|
| | | import com.yeshi.fanli.dao.BaseMapper;
|
| | | import com.yeshi.fanli.entity.integral.IntegralDetail;
|
| | | import com.yeshi.fanli.vo.integral.IntegralMonthVO;
|
| | |
|
| | | public interface IntegralDetailMapper extends BaseMapper<IntegralDetail> {
|
| | |
|
| | | /**
|
| | | * 根据唯一值查询明细
|
| | | * @param uniqueKey
|
| | | * @return
|
| | | */
|
| | | IntegralDetail getDetailByUniqueKey(@Param("uniqueKey")String uniqueKey);
|
| | | |
| | | /**
|
| | | * 获取用户总共有多少记录数据
|
| | | * |
| | | * @param uid
|
| | | * @return
|
| | | */
|
| | | Long selectCountByUid(@Param("uid") Long uid, @Param("type")Integer type);
|
| | | |
| | | /**
|
| | | * 按用户ID和最大时间检索月份的数量
|
| | | * |
| | | * @param uid
|
| | | * @param maxDate
|
| | | * @return
|
| | | */
|
| | | int selectMonthCountByUid(@Param("uid") Long uid, @Param("date") Date maxDate, @Param("type")Integer type);
|
| | | |
| | | |
| | | /**
|
| | | * 按最大的创建时间和用户ID检索数量
|
| | | * |
| | | * @param uid
|
| | | * @param date
|
| | | * @return
|
| | | */
|
| | | Long selectCountByUidAndMaxCreateTime(@Param("uid") Long uid, @Param("date") Date date, @Param("type")Integer type);
|
| | | |
| | | |
| | | /**
|
| | | * 按最大的创建时间和用户ID检索列表
|
| | | * |
| | | * @param uid
|
| | | * @param date
|
| | | * @return
|
| | | */
|
| | | List<IntegralDetail> selectByMaxCreateTime(@Param("uid") Long uid, @Param("date") Date date, @Param("count") int count, @Param("type")Integer type);
|
| | | |
| | | |
| | | /**
|
| | | * 通过用户ID和返回的最大时间的详情ID来获取下一页的数据
|
| | | * |
| | | * @param uid
|
| | | * @param id
|
| | | * @param count
|
| | | * @return
|
| | | */
|
| | | List<IntegralDetail> selectByUidWithIndexId(@Param("uid") Long uid, @Param("id") Long id, @Param("count") int count, @Param("type")Integer type);
|
| | | |
| | | |
| | | /**
|
| | | * 统计某个月份的收入与支出
|
| | | * |
| | | * @param uid
|
| | | * @param dateFormat
|
| | | * @return
|
| | | */
|
| | | List<IntegralMonthVO> selectMonthMoneyByUid(@Param("uid") Long uid, @Param("dateFormat") List<String> dateFormat);
|
| | | |
| | | |
| | | /**
|
| | | * 统计历史到账
|
| | | * @param uniqueKey
|
| | | * @return
|
| | | */
|
| | | BigDecimal getCumulativeMoney(@Param("uid") Long uid);
|
| | | |
| | | |
| | | /**
|
| | | * 统计当日新增金币
|
| | | * @param uniqueKey
|
| | | * @return
|
| | | */
|
| | | Long countNewAddByDate(@Param("preDay") String preDay);
|
| | | |
| | | /**
|
| | | * 列表查询
|
| | | * @param start
|
| | | * @param count
|
| | | * @param key
|
| | | * @return
|
| | | */
|
| | | List<IntegralDetail> listQuery(@Param("start")long start, @Param("count")int count, @Param("key")String key);
|
| | | |
| | | Long countQuery(@Param("key")String key);
|
| | | } |