|
|
|
@@ -138,7 +138,7 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ |
|
|
|
|
|
|
|
@Override |
|
|
|
@Transactional(isolation=Isolation.SERIALIZABLE, propagation = Propagation.REQUIRED, rollbackFor = {Exception.class}) |
|
|
|
public ResultData redoSharingOrder(WxProfitSharingOrder sharingOrder,WxPayOrder payOrder) { |
|
|
|
public ResultData redoSharingOrder(WxProfitSharingOrder sharingOrder,WxPayOrder payOrder,Integer merchantShareAmount) { |
|
|
|
|
|
|
|
if(!EnumProfitSharingOrderStatus.shareStatus().contains(sharingOrder.getSharingStatus())){ |
|
|
|
return new ResultData(ErrorCode.PROFIT_SHARING_REQUEST_FAILED.getCode(),"分账状态不允许"); |
|
|
|
@@ -173,7 +173,7 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ |
|
|
|
if (null == receiver) { |
|
|
|
return new ResultData(ErrorCode.PROFIT_SHARING_REQUEST_FAILED.getCode(),"当前商户未配置收款账号"); |
|
|
|
} |
|
|
|
StringBuffer sb = new StringBuffer("{").append("\"description\":").append(receiver.getId()).append(",\"amount\":").append(sharingOrder.getPayAmount()).append("}"); |
|
|
|
StringBuffer sb = new StringBuffer("{").append("\"description\":").append(receiver.getId()).append(",\"amount\":").append(merchantShareAmount).append("}"); |
|
|
|
if (null == recordJsonArray) { |
|
|
|
recordJsonArray = JSONArray.parseArray("["+sb.toString()+"]"); |
|
|
|
}else { |
|
|
|
@@ -252,7 +252,7 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ |
|
|
|
return new ResultData(); |
|
|
|
} |
|
|
|
|
|
|
|
ResultData resultData = redoSharingOrder(record,payOrder); |
|
|
|
ResultData resultData = redoSharingOrder(record,payOrder,sharingOrderDto.getShareAmount()); |
|
|
|
return resultData; |
|
|
|
} |
|
|
|
|
|
|
|
|