浏览代码

fix some bug

Mr.qian 1 月之前
父节点
当前提交
184341b6e4

+ 5 - 0
mall-api/src/main/java/com/txz/mall/enums/NoticeEnum.java

@@ -42,6 +42,11 @@ public enum NoticeEnum {
      */
     ORDER_SHIPPED_SUCCESS("ORDER_SHIPPED_SUCCESS", "订单通知_订单发货", "notifications.order.shipped.title", "notifications.order.shipped.content"),
     
+    /**
+     * 回收
+     */
+    ORDER_RECYCLE_REWARD("ORDER_RECYCLE_REWARD", "订单通知_回收", "notifications.order.recycle.title", "notifications.order.recycle.content"),
+    
     /**
      * 收益通知_邀请好友奖励
      */

+ 11 - 10
mall-service/src/main/java/com/txz/mall/service/impl/StorePinkServiceImpl.java

@@ -212,22 +212,17 @@ public class StorePinkServiceImpl extends AbstractService<StorePink> implements
     @Resource
     private OrderIndexService orderIndexService;
     
-        @Resource
-private  AsyncConfig asyncConfig;
+    @Resource
+    private AsyncConfig asyncConfig;
     
     /**
      * 中间索引表状态同步
      *
      * @param orderNo
-     * @param status
      */
-    private void upOrderIndex(String orderNo, PinkOrderStatusEnum status, StorePinkStatusEnum storePinkStatus) {
+    private void upOrderIndex(String orderNo, StorePinkStatusEnum storePinkStatus) {
         OrderIndex orderIndex = new OrderIndex();
-        orderIndex.setStatus(status.getKey());
-        if (PinkOrderStatusEnum.GROUP_ORDER_PAID == status) {
-            Date date = new Date();
-            orderIndex.setPayTime(date);
-        }
+        
         if (ObjectUtil.isNotEmpty(storePinkStatus)) {
             orderIndex.setStorePinkStatus(storePinkStatus.getKey());
         }
@@ -263,7 +258,13 @@ private  AsyncConfig asyncConfig;
             String s = I18nUtil.get("no.group.buying.orders");
             throw new ServiceException(s + spsCode);
         }
-        //异步更新索引表,同步拼团单状态
+        // 异步更新索引表,同步拼团单状态
+        asyncConfig.taskExecutor().execute(() -> {
+            list.forEach(storePink -> {
+                this.upOrderIndex(storePink.getOrderId(), StorePinkStatusEnum.RESULTS_ANNOUNCED);
+            });
+        });
+        
         long count = list.stream().filter(i -> i.getLId().equals(1)).count();
         if (count >= 1) {
             throw new ServiceException(I18nUtil.get("already.have.a.chosen.one") + spsCode);

+ 1 - 0
mall-service/src/main/resources/i18n/messages_bn_BD.properties

@@ -14,6 +14,7 @@ group.order.to.receive=To Receive
 PinkOrderStatusEnum.GROUP_ORDER_TO_RECEIVE=To Receive
 group.order.completed=Completed
 PinkOrderStatusEnum.GROUP_ORDER_COMPLETED=Completed
+PinkOrderStatusEnum.GROUP_ORDER_RECYCLE=Recycle
 
 SUCCESS=\u09B8\u09BE\u09AB\u09B2\u09CD\u09AF
 FAIL=\u09AC\u09CD\u09AF\u09B0\u09CD\u09A5 \u09B9\u0993\u09DF\u09BE

+ 1 - 1
mall-service/src/main/resources/i18n/messages_en_US.properties

@@ -15,7 +15,7 @@ group.order.to.receive=To Receive
 PinkOrderStatusEnum.GROUP_ORDER_TO_RECEIVE=To Receive
 group.order.completed=Completed
 PinkOrderStatusEnum.GROUP_ORDER_COMPLETED=Completed
-
+PinkOrderStatusEnum.GROUP_ORDER_RECYCLE=Recycle
 
 this.specification.value.already.exists=this specification value already exists
 order.does.not.exist.id=order does not exist id

+ 1 - 1
mall-service/src/main/resources/i18n/messages_zh_CN.properties

@@ -15,7 +15,7 @@ group.order.to.receive=To Receive
 PinkOrderStatusEnum.GROUP_ORDER_TO_RECEIVE=To Receive
 group.order.completed=Completed
 PinkOrderStatusEnum.GROUP_ORDER_COMPLETED=Completed
-
+PinkOrderStatusEnum.GROUP_ORDER_RECYCLE=Recycle
 
 this.specification.value.already.exists=\u6B64\u89C4\u683C\u503C\u5DF2\u7ECF\u5B58\u5728
 order.does.not.exist.id=\u8BA2\u5355\u4E0D\u5B58\u5728 ID\uFF1A

+ 2 - 0
mall-service/src/main/resources/i18n/notice/bn.json

@@ -12,6 +12,8 @@
   "notifications.order.shipped.title": "অর্ডার সফলভাবে শিপ হয়েছে",
   "notifications.order.shipped.content": "আপনার অংশগ্রহণ করা গ্রুপ অর্ডার [%s] সফলভাবে শিপ হয়েছে",
   "notifications.reward.referFriends.title": "বন্ধু রেফার পুরস্কার",
+  "notifications.order.cancel.title": "অর্ডার বাতিল",
+  "notifications.order.recycle.content": "অর্ডার পুনরুদ্ধার সফল",
   "notifications.reward.referFriends.content": "আপনি বন্ধু রেফারের জন্য পুরস্কার পেয়েছেন",
   "notifications.reward.groupBuy.title": "গ্রুপ বাই যোগ দিন পুরস্কার",
   "notifications.reward.groupBuy.content": "আপনি একটি পুরস্কার পেয়েছেন, অর্ডার আইডি [%s]",

+ 2 - 0
mall-service/src/main/resources/i18n/notice/en.json

@@ -12,6 +12,8 @@
   "notifications.order.shipped.title": "Order shipped successfully",
   "notifications.order.shipped.content": "The group order you participated in [%s] has been successfully shipped",
   "notifications.reward.referFriends.title": "Refer Friends Reward",
+  "notifications.order.recycle.title": "Order Recycle Reward",
+  "notifications.order.recycle.content": "The order has been successfully retrieved",
   "notifications.reward.referFriends.content": "You have received the reward for refer friends",
   "notifications.reward.groupBuy.title": "Join Group Buy Reward",
   "notifications.reward.groupBuy.content": "You have received a reward, order ID [%s]",

+ 2 - 0
mall-service/src/main/resources/i18n/notice/zh.json

@@ -11,6 +11,8 @@
   "notifications.order.groupBuyFail.content": "您参与的团购订单[%s]已失败",
   "notifications.order.shipped.title": "订单发货成功",
   "notifications.order.shipped.content": "您参与的团购订单[%s]已成功发货",
+  "notifications.order.recycle.title": "订单回收奖励",
+  "notifications.order.recycle.content": "订单回收成功",
   "notifications.reward.referFriends.title": "推荐好友奖励",
   "notifications.reward.referFriends.content": "您已获得推荐好友奖励",
   "notifications.reward.groupBuy.title": "参团奖励",