|
|
|
@@ -432,27 +432,22 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ |
|
|
|
|
|
|
|
//分账检查是否已创建分账订单 |
|
|
|
WxProfitSharingOrder record = new WxProfitSharingOrder(); |
|
|
|
|
|
|
|
//创建分账订单 |
|
|
|
Date currentDate = new Date(); |
|
|
|
record = new WxProfitSharingOrder(); |
|
|
|
record.setId(idworker.nextId()); |
|
|
|
record.setTenantId(sharingOrderDto.getTenantId()); |
|
|
|
record.setTransactionId(sharingOrderDto.getTransactionId()); |
|
|
|
record.setOrderId(sharingOrderDto.getOrderId()); |
|
|
|
record = wxProfitSharingOrderMapper.selectOne(record); |
|
|
|
if (record == null) { |
|
|
|
//创建分账订单 |
|
|
|
Date currentDate = new Date(); |
|
|
|
record = new WxProfitSharingOrder(); |
|
|
|
record.setId(idworker.nextId()); |
|
|
|
record.setTenantId(sharingOrderDto.getTenantId()); |
|
|
|
record.setTransactionId(sharingOrderDto.getTransactionId()); |
|
|
|
record.setOrderId(sharingOrderDto.getOrderId()); |
|
|
|
record.setPayAmount(sharingOrderDto.getPayAmount()); |
|
|
|
record.setMerchantId(sharingOrderDto.getMerchantId()); |
|
|
|
record.setSharingStatus(EnumProfitSharingOrderStatus.PROFIT_SHARING_UNKNOWN.getCode()); |
|
|
|
record.setCreateTime(currentDate); |
|
|
|
record.setUpdateTime(currentDate); |
|
|
|
record.setPayTimeStart(sharingOrderDto.getPayTimeStart()); |
|
|
|
record.setPayTimeEnd(sharingOrderDto.getPayTimeEnd()); |
|
|
|
record.setType(sharingOrderDto.getType()); |
|
|
|
wxProfitSharingOrderMapper.insertSelective(record); |
|
|
|
} |
|
|
|
record.setPayAmount(sharingOrderDto.getPayAmount()); |
|
|
|
record.setMerchantId(sharingOrderDto.getMerchantId()); |
|
|
|
record.setSharingStatus(EnumProfitSharingOrderStatus.PROFIT_SHARING_UNKNOWN.getCode()); |
|
|
|
record.setCreateTime(currentDate); |
|
|
|
record.setUpdateTime(currentDate); |
|
|
|
record.setPayTimeStart(sharingOrderDto.getPayTimeStart()); |
|
|
|
record.setPayTimeEnd(sharingOrderDto.getPayTimeEnd()); |
|
|
|
record.setType(sharingOrderDto.getType()); |
|
|
|
wxProfitSharingOrderMapper.insertSelective(record); |
|
|
|
|
|
|
|
//分账提交 |
|
|
|
WxProfitSharingFinishP psFCmd = new WxProfitSharingFinishP(); |
|
|
|
|