Kaynağa Gözat

活动关闭修改

liweifan 3 yıl önce
ebeveyn
işleme
71e9162808

+ 1 - 3
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/ActivityPlanServiceImpl.java

@@ -148,7 +148,7 @@ public class ActivityPlanServiceImpl extends ServiceImpl<ActivityPlanDao, Activi
         }else{
             activityPlan.setActivityState(2);
             //取消活动所有订单
-            cancelActivityOrder(activityPlan);
+            cancelActivityOrder(detail);
         }
 
         activityPlan.setId(activityId);
@@ -156,8 +156,6 @@ public class ActivityPlanServiceImpl extends ServiceImpl<ActivityPlanDao, Activi
         activityPlan.setUpdateTime(new Date());
 
         baseMapper.updateById(activityPlan);
-
-
         return true;
     }
 

+ 3 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/CourseScheduleServiceImpl.java

@@ -2011,11 +2011,13 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
             e.printStackTrace();
         }
 
-        //清除统计缓存
         for (Long studentId : studentIds) {
+            //清除学生缓存
             redissonClient.getBucket(CacheNameEnum.STUDENT_TOTAL.getRedisKey(studentId)).delete();
+            //发生推送通知
             pianoSend(teacherId, studentId);
         }
+        //清除老师缓存
         redissonClient.getBucket(CacheNameEnum.TEACHER_TOTAL.getRedisKey(teacherId)).delete();
     }
 

+ 9 - 13
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/UserOrderPaymentServiceImpl.java

@@ -107,21 +107,17 @@ public class UserOrderPaymentServiceImpl extends ServiceImpl<UserOrderPaymentDao
             param.setPaymentNo(orderPayment.getPaymentNo());
             param.setReason(reason);
 
-            try {
-                BaseResult<ClosePayment> responseResult = paymentClient.closePayment(param);
-                log.info("关单返回: {}", JSONObject.toJSONString(responseResult));
-                if (!responseResult.getStatus()) {
-                    orderPayment.setCloseStatus(TradeStatusEnum.failed);
-                    orderPayment.setCloseFailMsg(responseResult.getMsg());
+            BaseResult<ClosePayment> responseResult = paymentClient.closePayment(param);
+            log.info("关单返回: {}", JSONObject.toJSONString(responseResult));
+            if (!responseResult.getStatus()) {
+                orderPayment.setCloseStatus(TradeStatusEnum.failed);
+                orderPayment.setCloseFailMsg(responseResult.getMsg());
+            } else {
+                if (responseResult.getData().getHasNotify()) {
+                    orderPayment.setCloseStatus(TradeStatusEnum.pending);
                 } else {
-                    if (responseResult.getData().getHasNotify()) {
-                        orderPayment.setCloseStatus(TradeStatusEnum.pending);
-                    } else {
-                        orderPayment.setCloseStatus(TradeStatusEnum.succeeded);
-                    }
+                    orderPayment.setCloseStatus(TradeStatusEnum.succeeded);
                 }
-            } catch (Exception e) {
-                e.printStackTrace();
             }
         }
         updateById(orderPayment);