From 98b1a0affd69bbe63223c21fdd2c404e8bedfccb Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期三, 20 五月 2020 17:25:08 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/div' into 2.1.2 --- fanli/src/main/java/com/yeshi/fanli/service/inter/user/UserSystemCouponService.java | 131 +++++++++++++++++++++++++++++++------------ 1 files changed, 94 insertions(+), 37 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/inter/user/UserSystemCouponService.java b/fanli/src/main/java/com/yeshi/fanli/service/inter/user/UserSystemCouponService.java index 7c756f8..c878760 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/inter/user/UserSystemCouponService.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/inter/user/UserSystemCouponService.java @@ -3,9 +3,11 @@ import java.math.BigDecimal; import java.util.List; +import com.yeshi.fanli.entity.accept.AcceptData; import com.yeshi.fanli.entity.bus.user.UserSystemCoupon; import com.yeshi.fanli.entity.bus.user.UserSystemCouponGiveRecord; import com.yeshi.fanli.entity.system.SystemCoupon; +import com.yeshi.fanli.entity.system.SystemCoupon.CouponTypeEnum; import com.yeshi.fanli.exception.user.UserSystemCouponException; import com.yeshi.fanli.vo.user.UserSystemCouponRecordVO; import com.yeshi.fanli.vo.user.UserSystemCouponVO; @@ -91,7 +93,7 @@ * @throws UserSystemCouponException * @throws Exception */ - public void useOrderCoupon(Long uid, Long id, String orderNo, Integer sourceType) throws UserSystemCouponException, Exception; + public void useOrderCoupon(Long uid, Long id, String orderNo, Integer sourceType, AcceptData acceptData) throws UserSystemCouponException, Exception; /** * 鏍规嵁璁㈠崟鍙疯幏鍙栧鍔卞埜浣跨敤杩涘害 @@ -126,15 +128,6 @@ */ public List<UserSystemCoupon> getUserCouponBySource(Long uid, String source); - /** - * 鎻掑叆鍒镐俊鎭� - * @param uid - * @param couponType - * @param source 鏉ユ簮 - * @throws UserSystemCouponException - * @throws Exception - */ - public void insertUserCoupon(Long uid, String couponType, String source, BigDecimal percent) throws UserSystemCouponException, Exception; /** @@ -143,11 +136,6 @@ */ public void sendBackTimeOutCoupon(Long uid); - /** - * 婵�娲荤鍒╁厤鍗曞埜 - * @param uid - */ - public void activatedWelfareFreeCoupon(Long uid, String from); /** * 鏇存柊鍒歌褰� 鈥斺�斿尮閰嶅厤鍗曞埜 @@ -173,14 +161,6 @@ */ public void updateStateByArrivalAccount(String orderNo) throws Exception; - /** - * 棰嗗彇鏈櫥褰曟椂宸叉娊濂栫殑绀煎搧 - * @param uid - * @param platform - * @param device - * @throws Exception - */ - public void copyLotteryPrize(Long uid, int platform, String device) throws Exception; @@ -191,15 +171,8 @@ * @return */ public int countTodatyUserCouponBySource(Long uid, String source); - - /** - * 闅忔満鐢熸垚濂栧姳鍒� - * @param num - * @param uid - * @param source - * @throws Exception - */ - public void randomRewardCoupon(int num, Long uid, String source) throws Exception; + + /** * 娣诲姞鍒� @@ -221,7 +194,7 @@ * @throws UserSystemCouponException * @throws Exception */ - public List<UserSystemCouponVO> getCouponList(long start, int count, Long uid) throws UserSystemCouponException, Exception; + public List<UserSystemCouponVO> getCouponList(AcceptData acceptData, long start, int count, Long uid) throws UserSystemCouponException, Exception; /** @@ -254,17 +227,101 @@ public void updateCounponInvalid(List<UserSystemCoupon> list); /** - * 鍏戞崲 + * 鏈夋晥濂栧姳鍒� * @param uid * @return */ - public boolean getIncludeExchange(Long uid); + public boolean getValidRebateCoupon(Long uid); + /** - * 闈炲厬鎹� + * 鏌ヨ1.6.5涔嬪墠鐨� 涓嶇瓑浜�35% * @param uid * @return */ - public boolean getIncludeNotExchange(Long uid); + public List<UserSystemCouponVO> listIncludeNotExchange(Long uid) throws Exception; + + public long countCouponOld(Long uid); + + /** + * 鏇存柊鐢ㄦ埛杩囨湡鍒� + * @param uid + */ + public void updateInvalidSate(Long uid); + + /* + * 璧犻�佸埜 + */ + public void sendBackGiveUser(Long uid); + + /** + * 缁熻鍙娇鐢ㄧ殑鍏嶅崟鍒� + * @param uid + * @return + */ + public long countUsableFreeCouponForBuy(Long uid); + + /** + * 缁熻鍙娇鐢ㄧ殑濂栧姳鍒� + * @param uid + * @return + */ + public long countUsableRewardCoupon(Long uid); + + /** + * 鏌ヨ鍏嶅埜鏁伴噺 + * @param uid + * @param type + * @return + */ + public List<UserSystemCoupon> getFreeCouponByType(Long uid, String type); + + /** + * 婵�娲诲厤鍗曞埜---璁㈠崟宸插埌璐� 瑙﹀彂婵�娲诲厤鍗曞埜 + * @param uid + */ + public void triggerFreeCouponActivate(Long uid, String orderNo, Integer source); + + /** + * 閫�鍥炲埜 + * @param giveid + */ + public void sendBackByGiveId(Long giveid); + + /** + * 缁熻璧犻�佸厤鍗曞埜 + * @param uid + * @return + */ + public long countGiveFreeCoupon(Long uid); + + + /** + * 鍏嶅崟鍒歌幏寰� + * @param uid + * @param typeEnum 绫诲瀷 + * @param source 鏉ユ簮 + * @param num 鏁伴噺 + * @param notify 鏄惁鍙戦�佹秷鎭� + * @return + * @throws UserSystemCouponException + */ + public UserSystemCoupon freeCouponWin(Long uid, CouponTypeEnum typeEnum, String source, int num, boolean notify) + throws UserSystemCouponException, Exception; + + /** + * 濂栧姳鍒稿埜鑾峰緱 + * @param uid + * @param typeEnum + * @param source + * @param num + * @param notify + * @param percent + * @return + * @throws UserSystemCouponException + * @throws Exception + */ + public UserSystemCoupon rewardCouponWin(Long uid, String source, int num, boolean notify, + BigDecimal percent) throws UserSystemCouponException, Exception; } -- Gitblit v1.8.0