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/redpack/RedPackDetailMapper.java | 291 ++++++++++++++++++++++++++++++--------------------------- 1 files changed, 153 insertions(+), 138 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/dao/mybatis/redpack/RedPackDetailMapper.java b/fanli/src/main/java/com/yeshi/fanli/dao/mybatis/redpack/RedPackDetailMapper.java index 8d7c308..1b2e3ab 100644 --- a/fanli/src/main/java/com/yeshi/fanli/dao/mybatis/redpack/RedPackDetailMapper.java +++ b/fanli/src/main/java/com/yeshi/fanli/dao/mybatis/redpack/RedPackDetailMapper.java @@ -1,139 +1,154 @@ -package com.yeshi.fanli.dao.mybatis.redpack; - -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.redpack.RedPackDetail; -import com.yeshi.fanli.vo.redpack.RedPackMonthVO; - -public interface RedPackDetailMapper extends BaseMapper<RedPackDetail> { - - - /** - * 鏌ヨ鏄庣粏 - * @param identifyCode - * @return - */ - RedPackDetail getByIdentifyCode(@Param("identifyCode")String identifyCode); - - - /** - * 鏍规嵁鏃ユ湡绫诲瀷缁熻鑾峰緱閲戦 - * @param uid - * @param dateType 1浠婃棩 銆�2鏄ㄦ棩銆�3鏈湀銆�4涓婃湀 - * @return - */ - BigDecimal countAddMoneyByDate(@Param("uid")long uid, @Param("dateType")int dateType); - - /** - * 鏍规嵁鏃ユ湡绫诲瀷缁熻娑堣�楅噾棰� - * @param uid - * @param dateType 1浠婃棩 銆�2鏄ㄦ棩銆�3鏈湀銆�4涓婃湀 - * @return - */ - BigDecimal countUseMoneyByDate(@Param("uid")long uid, @Param("dateType")int dateType); - - /** - * 鎸夋渶澶х殑鍒涘缓鏃堕棿鍜岀敤鎴稩D妫�绱㈠垪琛� - * - * @param uid - * @param date - * @return - */ - List<RedPackDetail> selectByMaxCreateTime(@Param("uid") Long uid, @Param("date") Date date, @Param("count") int count); - - - /** - * 閫氳繃鐢ㄦ埛ID鍜岃繑鍥炵殑鏈�澶ф椂闂寸殑璇︽儏ID鏉ヨ幏鍙栦笅涓�椤电殑鏁版嵁 - * - * @param uid - * @param id - * @param count - * @return - */ - List<RedPackDetail> selectByUidWithIndexId(@Param("uid") Long uid, @Param("id") Long id, @Param("count") int count); - - - /** - * 缁熻鏌愪釜鏈堜唤鐨勬敹鍏ヤ笌鏀嚭 - * - * @param uid - * @param dateFormat - * @return - */ - List<RedPackMonthVO> selectMonthMoneyByUid(@Param("uid") Long uid, @Param("dateFormat") List<String> dateFormat); - - - /** - * 鑾峰彇鐢ㄦ埛鎬诲叡鏈夊灏戣褰曟暟鎹� - * - * @param uid - * @return - */ - Long selectCountByUid(@Param("uid") Long uid); - - /** - * 鎸夌敤鎴稩D鍜屾渶澶ф椂闂存绱㈡湀浠界殑鏁伴噺 - * - * @param uid - * @param maxDate - * @return - */ - int selectMonthCountByUid(@Param("uid") Long uid, @Param("date") Date maxDate); - - - /** - * 鎸夋渶澶х殑鍒涘缓鏃堕棿鍜岀敤鎴稩D妫�绱㈡暟閲� - * - * @param uid - * @param date - * @return - */ - Long selectCountByUidAndMaxCreateTime(@Param("uid") Long uid, @Param("date") Date date); - - - - /** - * 鏍规嵁鏃ユ湡绫诲瀷缁熻鑾峰緱閲戦 - * @param uid - * @param dateType 1浠婃棩 銆�2鏄ㄦ棩銆�3鏈湀銆�4涓婃湀 - * @return - */ - BigDecimal countWinMoneyByDate(@Param("uid")long uid, @Param("dateType")int dateType); - - /** - * 鏍规嵁鏃ユ湡绫诲瀷缁熻娑堣�楅噾棰� - * @param uid - * @param dateType 1浠婃棩 銆�2鏄ㄦ棩銆�3鏈湀銆�4涓婃湀 - * @return - */ - BigDecimal countReduceMoneyByDate(@Param("uid")long uid, @Param("dateType")int dateType); - - - - /** - * 鍒楄〃鏌ヨ - * - * @param key - * @param state - * @param start - * @param count - * @return - */ - List<RedPackDetail> query(@Param("start") long start,@Param("count") int count,@Param("key") String key, @Param("uid") Long uid, - @Param("type") Integer type); - - /** - * 璁℃暟 - * - * @param key - * @param state - * @return - */ - long count(@Param("key") String key, @Param("uid") Long uid, @Param("type") Integer type); - +package com.yeshi.fanli.dao.mybatis.redpack; + +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.redpack.RedPackDetail; +import com.yeshi.fanli.vo.redpack.RedPackMonthVO; + +public interface RedPackDetailMapper extends BaseMapper<RedPackDetail> { + + + /** + * 鏌ヨ鏄庣粏 + * @param identifyCode + * @return + */ + RedPackDetail getByIdentifyCode(@Param("identifyCode")String identifyCode); + + + /** + * 鏍规嵁鏃ユ湡绫诲瀷缁熻鑾峰緱閲戦 + * @param uid + * @param dateType 1浠婃棩 銆�2鏄ㄦ棩銆�3鏈湀銆�4涓婃湀 + * @return + */ + BigDecimal countAddMoneyByDate(@Param("uid")long uid, @Param("dateType")int dateType); + + /** + * 鏍规嵁鏃ユ湡绫诲瀷缁熻娑堣�楅噾棰� + * @param uid + * @param dateType 1浠婃棩 銆�2鏄ㄦ棩銆�3鏈湀銆�4涓婃湀 + * @return + */ + BigDecimal countUseMoneyByDate(@Param("uid")long uid, @Param("dateType")int dateType); + + /** + * 鎸夋渶澶х殑鍒涘缓鏃堕棿鍜岀敤鎴稩D妫�绱㈠垪琛� + * + * @param uid + * @param date + * @return + */ + List<RedPackDetail> selectByMaxCreateTime(@Param("uid") Long uid, @Param("date") Date date, @Param("count") int count); + + + /** + * 閫氳繃鐢ㄦ埛ID鍜岃繑鍥炵殑鏈�澶ф椂闂寸殑璇︽儏ID鏉ヨ幏鍙栦笅涓�椤电殑鏁版嵁 + * + * @param uid + * @param id + * @param count + * @return + */ + List<RedPackDetail> selectByUidWithIndexId(@Param("uid") Long uid, @Param("id") Long id, @Param("count") int count); + + + /** + * 缁熻鏌愪釜鏈堜唤鐨勬敹鍏ヤ笌鏀嚭 + * + * @param uid + * @param dateFormat + * @return + */ + List<RedPackMonthVO> selectMonthMoneyByUid(@Param("uid") Long uid, @Param("dateFormat") List<String> dateFormat); + + + /** + * 鑾峰彇鐢ㄦ埛鎬诲叡鏈夊灏戣褰曟暟鎹� + * + * @param uid + * @return + */ + Long selectCountByUid(@Param("uid") Long uid); + + /** + * 鎸夌敤鎴稩D鍜屾渶澶ф椂闂存绱㈡湀浠界殑鏁伴噺 + * + * @param uid + * @param maxDate + * @return + */ + int selectMonthCountByUid(@Param("uid") Long uid, @Param("date") Date maxDate); + + + /** + * 鎸夋渶澶х殑鍒涘缓鏃堕棿鍜岀敤鎴稩D妫�绱㈡暟閲� + * + * @param uid + * @param date + * @return + */ + Long selectCountByUidAndMaxCreateTime(@Param("uid") Long uid, @Param("date") Date date); + + + + /** + * 鏍规嵁鏃ユ湡绫诲瀷缁熻鑾峰緱閲戦 + * @param uid + * @param dateType 1浠婃棩 銆�2鏄ㄦ棩銆�3鏈湀銆�4涓婃湀 + * @return + */ + BigDecimal countWinMoneyByDate(@Param("uid")long uid, @Param("dateType")int dateType); + + /** + * 鏍规嵁鏃ユ湡绫诲瀷缁熻娑堣�楅噾棰� + * @param uid + * @param dateType 1浠婃棩 銆�2鏄ㄦ棩銆�3鏈湀銆�4涓婃湀 + * @return + */ + BigDecimal countReduceMoneyByDate(@Param("uid")long uid, @Param("dateType")int dateType); + + + + /** + * 鍒楄〃鏌ヨ + * + * @param key + * @param state + * @param start + * @param count + * @return + */ + List<RedPackDetail> query(@Param("start") long start,@Param("count") int count,@Param("key") String key, @Param("uid") Long uid, + @Param("type") Integer type); + + /** + * 璁℃暟 + * + * @param key + * @param state + * @return + */ + long count(@Param("key") String key, @Param("uid") Long uid, @Param("type") Integer type); + + + /** + * 缁熻姣忔棩鏂板绾㈠寘 + * @param preDay + * @return + */ + Long countNumByDay(@Param("preDay") String preDay); + + /** + * 缁熻姣忔棩鏂板绾㈠寘 + * @param preDay + * @return + */ + BigDecimal countMoneyByDay(@Param("preDay") String preDay); + } \ No newline at end of file -- Gitblit v1.8.0