更新提现申请修改为异步任务处理
This commit is contained in:
parent
9743fe4047
commit
b0d113cceb
@ -13,6 +13,7 @@ import com.xhpc.activity.mapper.XhpcClearingCheckoutMapper;
|
||||
import com.xhpc.activity.mapper.XhpcClearingHistoryOrderMapper;
|
||||
import com.xhpc.activity.mapper.XhpcClearingReceiptMapper;
|
||||
import com.xhpc.activity.service.XhpcClearingCheckoutService;
|
||||
import com.xhpc.activity.task.AsyncService;
|
||||
import com.xhpc.activity.utils.DownloadUtil;
|
||||
import com.xhpc.activity.vo.CheckoutBankVo;
|
||||
import com.xhpc.activity.vo.ClearingReceiptVo;
|
||||
@ -68,6 +69,8 @@ public class XhpcClearingCheckoutServiceImpl extends BaseService implements Xhpc
|
||||
@Resource
|
||||
TokenService tokenService;
|
||||
|
||||
@Resource
|
||||
AsyncService asyncService;
|
||||
|
||||
@Override
|
||||
public List<XhpcClearingCheckoutDomain> getPage(Map<String, Object> params) {
|
||||
@ -169,13 +172,10 @@ public class XhpcClearingCheckoutServiceImpl extends BaseService implements Xhpc
|
||||
checkoutMapper.insert(domain);
|
||||
|
||||
if (StringUtils.isEmpty(domain.getClearingOrderIds())) {
|
||||
historyOrderMapper.updateCheckoutByOperator(domain.getOperatorId(), domain.getClearingCheckoutId());
|
||||
asyncService.updateCheckoutByOperatorAsync(domain.getOperatorId(), domain.getClearingCheckoutId());
|
||||
} else {
|
||||
// ...
|
||||
historyOrderMapper.updateCheckoutByOrderId(domain.getClearingOrderIds(), domain.getClearingCheckoutId());
|
||||
asyncService.updateCheckoutByOrderIdsAsync(domain.getClearingOrderIds(), domain.getClearingCheckoutId());
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@ -12,8 +12,26 @@ public class AsyncService {
|
||||
@Resource
|
||||
XhpcClearingHistoryOrderMapper historyOrderMapper;
|
||||
|
||||
/**
|
||||
* 审核待清分订单处理
|
||||
* @param orderIds
|
||||
* @param status
|
||||
* @param checkBy
|
||||
*/
|
||||
@Async
|
||||
public void updateCheckStatusAsync(String orderIds, Integer status, String checkBy){
|
||||
historyOrderMapper.updateStatusBatchByOrderIds(orderIds, status, checkBy);
|
||||
}
|
||||
|
||||
|
||||
@Async
|
||||
public void updateCheckoutByOperatorAsync(Long operatorId, Long checkoutId){
|
||||
historyOrderMapper.updateCheckoutByOperator(operatorId, checkoutId);
|
||||
}
|
||||
|
||||
|
||||
@Async
|
||||
public void updateCheckoutByOrderIdsAsync(String orderIds, Long checkoutId){
|
||||
historyOrderMapper.updateCheckoutByOrderId(orderIds, checkoutId);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user