Browse Source

开播提醒

yuhongqi 17 hours ago
parent
commit
d1949be7f5

+ 1 - 1
fs-live-app/src/main/java/com/fs/live/task/Task.java

@@ -171,7 +171,7 @@ public class Task {
                 }
                 // 清理小程序缓存 和 直播标签缓存
                 String cacheKey = String.format(LiveKeysConstant.LIVE_DATA_CACHE, live.getLiveId());
-                redisCache.setCacheObject(cacheKey,live,1,TimeUnit.HOURS);
+                redisCache.deleteObject(cacheKey);
                 liveWatchUserService.clearLiveFlagCache(live.getLiveId());
                 // 将开启的直播间信息写入Redis缓存,用于打标签定时任务
                 try {

+ 1 - 8
fs-service/src/main/java/com/fs/live/service/impl/LiveAfterSalesServiceImpl.java

@@ -554,6 +554,7 @@ public class LiveAfterSalesServiceImpl implements ILiveAfterSalesService {
         if (!liveAfterSales.getStatus().equals(AfterStatusEnum.STATUS_3.getValue())) {
             throw new CustomException("非法操作");
         }
+        liveAfterSales.setRefundAmount(param.getRefundAmount());
         return liveOrderService.refundOrderMoney(liveAfterSales.getOrderId(),liveAfterSales);
     }
 
@@ -915,14 +916,6 @@ public class LiveAfterSalesServiceImpl implements ILiveAfterSalesService {
                 orderMap.setStatus(order.getStatus());
                 liveOrderService.updateLiveOrder(orderMap);
                 liveOrderItemService.updateFsStoreOrderCode(order.getOrderId(), orderSn);
-                //生成新的订单
-                List<LiveOrderPayment> payments = liveOrderPaymentMapper.selectLiveOrderPaymentByPay(5, order.getOrderId());
-                for (LiveOrderPayment payment : payments) {
-                    LiveOrderPayment livePayment = new LiveOrderPayment();
-                    livePayment.setPaymentId(payment.getPaymentId());
-                    livePayment.setBusinessCode(orderSn);
-                    liveOrderPaymentMapper.updateLiveOrderPayment(livePayment);
-                }
                 liveOrderService.createOmsOrder(order.getOrderId());
             }
         }

+ 2 - 7
fs-service/src/main/java/com/fs/live/service/impl/LiveOrderServiceImpl.java

@@ -710,12 +710,7 @@ public class LiveOrderServiceImpl implements ILiveOrderService {
                         liveOrderPaymentMapper.updateLiveOrderPayment(paymentMap);
                         order = baseMapper.selectFsUserVipOrderByOrderCode(storePayment.getBusinessCode());
                         if(order==null || !order.getStatus().equals(OrderInfoEnum.STATUS_0.getValue())){
-                            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
-                            return "";
-                        }
-                        if (order != null && !order.getIsPay().equals(0)) {
-                            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
-                            return "";
+                            throw new CustomException("当前订单未找到或者订单状态不为待支付! paycode:"+payCode);
                         }
                     }
                 }
@@ -1559,7 +1554,7 @@ public class LiveOrderServiceImpl implements ILiveOrderService {
                         log.info("退款:" + refund);
                         if (refund != null && ("00000000".equals(refund.getResp_code()) || "00000100".equals(refund.getResp_code()))
                                 && ("S".equals(refund.getTrans_stat()) || "P".equals(refund.getTrans_stat()))) {
-                            payment.setRefundMoney(payment.getPayMoney());
+                            payment.setRefundMoney(refundAmount);
                             payment.setStatus(-1);
                             payment.setRefundTime(new Date());
                             liveOrderPaymentMapper.updateLiveOrderPayment(payment);

+ 1 - 2
fs-service/src/main/java/com/fs/live/service/impl/LiveServiceImpl.java

@@ -320,7 +320,7 @@ public class LiveServiceImpl implements ILiveService
     @Override
     public R subNotifyLive(LiveNotifyParam param) {
         LiveMiniprogramSubNotifyTask notifyTask = new LiveMiniprogramSubNotifyTask();
-        notifyTask.setPage("/pages_course/living.html?liveId=" + param.getLiveId());
+        notifyTask.setPage("pages_course/living?liveId=" + param.getLiveId());
         notifyTask.setTaskName("直播间预约提醒");
         notifyTask.setTemplateId(param.getTemplateId());
         Long userId = param.getUserId();
@@ -341,7 +341,6 @@ public class LiveServiceImpl implements ILiveService
         }
 
         notifyTask.setTouser(maOpenId);
-        notifyTask.setPage(String.valueOf(1));
 
         notifyTask.setCreateTime(LocalDateTime.now());
         // 状态等待执行