From 0b57cfd62e842b309d03467b96a331c673ecad7c Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期二, 21 四月 2020 14:08:18 +0800
Subject: [PATCH] 删除普通会员等级
---
fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserSystemCouponServiceImpl.java | 23 ++++++++++++++++++++++-
1 files changed, 22 insertions(+), 1 deletions(-)
diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserSystemCouponServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserSystemCouponServiceImpl.java
index 95e137b..0742917 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserSystemCouponServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserSystemCouponServiceImpl.java
@@ -952,6 +952,7 @@
}
BigDecimal hongBao = orderVO.getHongBao();
+
// 绾㈠寘鐘舵��
Integer hongBaoState = orderVO.getHongBaoState();
// 绾㈠寘绫诲瀷
@@ -964,6 +965,11 @@
if (order == null)
throw new UserSystemCouponException(1, "璇ヨ鍗曚笉瀛樺湪");
+ // 浣跨敤濂栧姳鍒� 閲戦棰濋檺鍒�
+ if (hongBao.compareTo(Constant.REWARD_COUPON_LIMIT_MONEY) > 0){
+ throw new UserSystemCouponException(1, "璇ヨ鍗曚笉鑳戒娇鐢ㄥ鍔卞埜");
+ }
+
/* 濂栭噾璁$畻 浠ュ強鐩稿叧绾㈠寘淇℃伅澶勭悊 */
// 杞崲鎴愬皬鏁扮偣
@@ -1060,7 +1066,22 @@
couponRecord.setUpdateTime(date);
userSystemCouponRecordService.insertSelective(couponRecord);
- // 娑堟伅鎺ㄩ��
+ int goodsCount = 0;
+ String orderId = order.getOrderId();
+ Integer orderType = order.getOrderType();
+ List<CommonOrder> orderList = commonOrderService.listBySourceTypeAndOrderId(orderType, orderId);
+ if (orderList != null && orderList.size() > 0) {
+ for (CommonOrder co : orderList) {
+ goodsCount += co.getCount();
+ }
+ }
+
+ // 璧勯噾娑堟伅
+ UserInfo userInfo = userInfoService.selectByPKey(uid);
+ userMoneyMsgNotificationService.rewardCounponReceived(uid, orderId, orderType, goodsCount,
+ money, userInfo.getMyHongBao(), order.getThirdCreateTime());
+
+ // 鍒镐娇鐢ㄦ垚鍔熸秷鎭�
try {
userOtherMsgNotificationService.rewardCouponEndMsg(uid, userSystemCoupon.getSource(), 1, "浣跨敤鎴愬姛");
} catch (Exception e) {
--
Gitblit v1.8.0