|
|
|
@@ -1,5 +1,7 @@ |
|
|
|
package com.iformall.schedule; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.iformall.common.ErrorCode; |
|
|
|
import com.iformall.common.ResultData; |
|
|
|
import com.iformall.domain.po.WxMall; |
|
|
|
import com.iformall.domain.po.WxMallNoticeContact; |
|
|
|
@@ -8,6 +10,7 @@ import com.iformall.domain.po.WxProfitSharingOrder; |
|
|
|
import com.iformall.domain.po.msg.MailMsg; |
|
|
|
import com.iformall.domain.po.msg.WxMsgRecord; |
|
|
|
import com.iformall.enums.*; |
|
|
|
import com.iformall.exception.MallinkException; |
|
|
|
import com.iformall.mapper.WxMallMapper; |
|
|
|
import com.iformall.mapper.WxMallNoticeContactMapper; |
|
|
|
import com.iformall.mapper.WxPayOrderMapper; |
|
|
|
@@ -57,6 +60,35 @@ public class SharingOrderRedoSchedule { |
|
|
|
return wxMallMapper.findList(wxMall); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* 分账账单第三方创建失败重试 |
|
|
|
*/ |
|
|
|
@Async |
|
|
|
@Scheduled(cron = "0 15 1 * * ?") // 每天凌晨02:00分账重试 |
|
|
|
public void sharingOrderReqFaildRedoSchedule() { |
|
|
|
List<WxMall> malls = getMalls(); |
|
|
|
for (WxMall mall: malls) { |
|
|
|
WxProfitSharingOrder wxProfitSharingOrder = new WxProfitSharingOrder(); |
|
|
|
wxProfitSharingOrder.setTenantId(mall.getTenantId()); |
|
|
|
wxProfitSharingOrder.setSharingStatus(EnumProfitSharingOrderStatus.PROFIT_SHARING_REQ_FAILED.getCode()); |
|
|
|
List<WxProfitSharingOrder> list = wxProfitSharingOrderMapper.findList(wxProfitSharingOrder); |
|
|
|
if (null != list) { |
|
|
|
for (int i = 0 ; i < list.size(); i++) { |
|
|
|
WxProfitSharingOrder record = list.get(i); |
|
|
|
WxPayOrder wxPayOrder = new WxPayOrder(); |
|
|
|
wxPayOrder.updateTenantInfo(record); |
|
|
|
wxPayOrder = wxPayOrderMapper.selectById(record.getOrderId(), record.getTenantId()); |
|
|
|
wxProfitSharingOrderService.redoSharingOrder(record, wxPayOrder); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* 分账失败重试 |
|
|
|
*/ |
|
|
|
@Async |
|
|
|
@Scheduled(cron = "0 15 2 * * ?") // 每天凌晨02:00分账重试 |
|
|
|
// @Scheduled(cron = "0 15 */2 * * ?")// 每2个小时的15分钟 |
|
|
|
|