套餐推广订单取消定时任务
This commit is contained in:
@@ -4,6 +4,7 @@ import com.czg.account.service.ShopTableService;
|
||||
import com.czg.market.entity.MkShopCouponRecord;
|
||||
import com.czg.market.service.AcPushEventService;
|
||||
import com.czg.market.service.MkShopCouponRecordService;
|
||||
import com.czg.market.service.PpPackageOrderService;
|
||||
import com.czg.market.service.SmsPushEventService;
|
||||
import com.czg.order.service.GbOrderService;
|
||||
import com.czg.order.service.OrderInfoCustomService;
|
||||
@@ -43,6 +44,8 @@ public class RedisKeyExpirationListener implements MessageListener {
|
||||
private AcPushEventService acPushEventService;
|
||||
@Resource
|
||||
private GbOrderService gbOrderService;
|
||||
@DubboReference
|
||||
private PpPackageOrderService ppPackageOrderService;
|
||||
|
||||
|
||||
//redis key失效监听
|
||||
@@ -79,6 +82,10 @@ public class RedisKeyExpirationListener implements MessageListener {
|
||||
log.info("监听到拼团任务过期,gb_order任务Id: {}", expiredKey);
|
||||
String eventId = expiredKey.substring(RedisCst.classKeyExpired.EXPIRED_GB_ORDER.length());
|
||||
gbOrderService.expireRefund(Long.parseLong(eventId), null);
|
||||
} else if (expiredKey.startsWith(RedisCst.classKeyExpired.EXPIRED_PP_ORDER)) {
|
||||
log.info("监听到套餐推广任务过期,pp_order任务Id: {}", expiredKey);
|
||||
String eventId = expiredKey.substring(RedisCst.classKeyExpired.EXPIRED_PP_ORDER.length());
|
||||
ppPackageOrderService.expiredOrder(Long.parseLong(eventId));
|
||||
} else if (expiredKey.startsWith(RedisCst.classKeyExpired.EXPIRED_SMS)) {
|
||||
log.info("监听到短信定时发放优惠券,sms_push_event任务Id: {}", expiredKey);
|
||||
String eventId = expiredKey.substring(RedisCst.classKeyExpired.EXPIRED_SMS.length());
|
||||
|
||||
@@ -54,7 +54,7 @@ public class PpOrderController {
|
||||
//退钱
|
||||
String refPayOrderNo = CzgRandomUtils.snowflake(OrderNoPrefixEnum.REPP);
|
||||
payService.unifyRefund(detail.getShopId(), detail.getId(), detail.getPayOrderId(), refPayOrderNo,
|
||||
StrUtil.isBlankIfStr(detail.getRefundReason()) ? "拼团退款" : detail.getRefundReason(), detail.getFinalPrice());
|
||||
StrUtil.isBlankIfStr(detail.getRefundReason()) ? "套餐推广退款" : detail.getRefundReason(), detail.getFinalPrice());
|
||||
|
||||
return CzgResult.success();
|
||||
}
|
||||
@@ -70,6 +70,7 @@ public class PpOrderController {
|
||||
|
||||
/**
|
||||
* 套餐推广-核销
|
||||
* 参数: {"verifyCode": "123456"}
|
||||
*/
|
||||
@PostMapping("checkout")
|
||||
@OperationLog("套餐推广-核销")
|
||||
|
||||
@@ -109,7 +109,11 @@ public class OTimeTask {
|
||||
@Scheduled(cron = "0 50 23 * * ? ")
|
||||
public void refundCompensate() {
|
||||
//积分 和 拼团
|
||||
List<String> ware = List.of(PayTypeConstants.SourceType.WARE, PayTypeConstants.SourceType.POINT);
|
||||
List<String> ware = List.of(
|
||||
PayTypeConstants.SourceType.WARE,
|
||||
PayTypeConstants.SourceType.POINT,
|
||||
PayTypeConstants.SourceType.PP
|
||||
);
|
||||
|
||||
LocalDateTime tenMinutesAgo = LocalDateTime.now().minusMinutes(10);
|
||||
LocalDateTime thirdDayAgo = LocalDateTime.now().minusDays(3);
|
||||
|
||||
Reference in New Issue
Block a user