|
|
|
@@ -338,8 +338,17 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ |
|
|
|
updSharingOrder.setReceivers(JSON.toJSONString(receivers)); |
|
|
|
wxProfitSharingOrderMapper.updateById(updSharingOrder); |
|
|
|
|
|
|
|
if(EnumPayMchType.DIRECT.getCode().equals(payOrder.getMchType()) || EnumPayShare.NO.getCode().equals(payOrder.getShare())){ |
|
|
|
//如果是直连 把分给商户的钱记录下来 |
|
|
|
if(EnumPayMchType.TOTAL.getCode().equals(payOrder.getMchType()) && EnumPayShare.NO.getCode().equals(payOrder.getShare())){ |
|
|
|
//解冻给收款方(广场) |
|
|
|
JSONObject jo = new JSONObject(); |
|
|
|
jo.put("type",EnumProfitSharingReceiverType.PROFIT_SHARING_RECEIVER_MERCHANT_ID.getMessage()); |
|
|
|
jo.put("account",payAccount.getSubMchId()); |
|
|
|
jo.put("amount", shareAmount); |
|
|
|
jo.put("merchantId",0); |
|
|
|
jo.put("description",receiver.getId()); |
|
|
|
receivers.add(jo); |
|
|
|
}else if(EnumPayMchType.DIRECT.getCode().equals(payOrder.getMchType())){ |
|
|
|
//解冻给收款方(门店) |
|
|
|
JSONObject jo = new JSONObject(); |
|
|
|
jo.put("type",payShareAdapterService.getShareAccount(receiver.getReceiverType()).getMessage()); |
|
|
|
jo.put("account",receiver.getReceiverAccount()); |
|
|
|
@@ -348,6 +357,7 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ |
|
|
|
jo.put("description",receiver.getId()); |
|
|
|
receivers.add(jo); |
|
|
|
} |
|
|
|
|
|
|
|
try{ |
|
|
|
int delete = wxProfitSharingResultMapper.deleteBySharingOrderId(sharingOrder.getId(),sharingOrder.getTenantId()); |
|
|
|
final IdWorker idworker = IdWorker.get(); |
|
|
|
|