From 28cf328a098334b51a3e9d2d56f983fb8c862211 Mon Sep 17 00:00:00 2001 From: yujian <yujian@163.com> Date: 星期六, 23 五月 2020 09:54:38 +0800 Subject: [PATCH] 足迹、收藏订单兼容新需求 --- fanli/src/main/java/com/yeshi/fanli/dao/mybatis/integral/IntegralDetailMapper.java | 176 +++++++++++++++++++++++++++++++++++----------------------- 1 files changed, 105 insertions(+), 71 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/dao/mybatis/integral/IntegralDetailMapper.java b/fanli/src/main/java/com/yeshi/fanli/dao/mybatis/integral/IntegralDetailMapper.java index 0952fa4..7fb49a2 100644 --- a/fanli/src/main/java/com/yeshi/fanli/dao/mybatis/integral/IntegralDetailMapper.java +++ b/fanli/src/main/java/com/yeshi/fanli/dao/mybatis/integral/IntegralDetailMapper.java @@ -1,72 +1,106 @@ -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); - - /** - * 鎸夌敤鎴稩D鍜屾渶澶ф椂闂存绱㈡湀浠界殑鏁伴噺 - * - * @param uid - * @param maxDate - * @return - */ - int selectMonthCountByUid(@Param("uid") Long uid, @Param("date") Date maxDate, @Param("type")Integer type); - - - /** - * 鎸夋渶澶х殑鍒涘缓鏃堕棿鍜岀敤鎴稩D妫�绱㈡暟閲� - * - * @param uid - * @param date - * @return - */ - Long selectCountByUidAndMaxCreateTime(@Param("uid") Long uid, @Param("date") Date date, @Param("type")Integer type); - - - /** - * 鎸夋渶澶х殑鍒涘缓鏃堕棿鍜岀敤鎴稩D妫�绱㈠垪琛� - * - * @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("type")Integer type); - +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); + + /** + * 鎸夌敤鎴稩D鍜屾渶澶ф椂闂存绱㈡湀浠界殑鏁伴噺 + * + * @param uid + * @param maxDate + * @return + */ + int selectMonthCountByUid(@Param("uid") Long uid, @Param("date") Date maxDate, @Param("type")Integer type); + + + /** + * 鎸夋渶澶х殑鍒涘缓鏃堕棿鍜岀敤鎴稩D妫�绱㈡暟閲� + * + * @param uid + * @param date + * @return + */ + Long selectCountByUidAndMaxCreateTime(@Param("uid") Long uid, @Param("date") Date date, @Param("type")Integer type); + + + /** + * 鎸夋渶澶х殑鍒涘缓鏃堕棿鍜岀敤鎴稩D妫�绱㈠垪琛� + * + * @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); } \ No newline at end of file -- Gitblit v1.8.0