|
|
|
@ -354,10 +354,7 @@ public class OutRechargeOrderController { |
|
|
|
|
@ApiOperation(value = "分账") |
|
|
|
|
public ResponseData wxProfitsharing() { |
|
|
|
|
try { |
|
|
|
|
|
|
|
|
|
List<HighOrder> orderList = highOrderService.getTest(); |
|
|
|
|
for (HighOrder highOrder : orderList) { |
|
|
|
|
HighOrder order = highOrderService.getOrderById(highOrder.getId()); |
|
|
|
|
HighOrder order = highOrderService.getOrderByOrderNo("20211019173044475879505"); |
|
|
|
|
BigDecimal rake = new BigDecimal("0.01"); |
|
|
|
|
// 计算微信收取的手续费 支付金额 * 0.002 注:如果与两个相邻数字的距离相等,则为上舍入的舍入模式。
|
|
|
|
|
BigDecimal wxHandlingFee = order.getPayPrice().multiply(new BigDecimal("0.002")).setScale(2,BigDecimal.ROUND_HALF_DOWN); |
|
|
|
@ -367,7 +364,7 @@ public class OutRechargeOrderController { |
|
|
|
|
param.put("appid", "wx637bd6f7314daa46"); |
|
|
|
|
param.put("mch_id", "1289663601"); |
|
|
|
|
param.put("sub_mch_id" , "1609882817"); // 个体户黎杨珍
|
|
|
|
|
param.put("transaction_id" , highOrder.getPaySerialNo()); |
|
|
|
|
param.put("transaction_id" , order.getPaySerialNo()); |
|
|
|
|
param.put("out_order_no" , order.getOrderNo()); |
|
|
|
|
param.put("nonce_str" , WxUtils.makeNonStr()); |
|
|
|
|
|
|
|
|
@ -398,7 +395,6 @@ public class OutRechargeOrderController { |
|
|
|
|
sharingRecord.setCreateTime(new Date()); |
|
|
|
|
sharingRecord.setContent(resultXmL); |
|
|
|
|
highProfitSharingRecordService.insert(sharingRecord); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return ResponseMsgUtil.success("操作成功"); |
|
|
|
|
|
|
|
|
@ -413,13 +409,15 @@ public class OutRechargeOrderController { |
|
|
|
|
@ApiOperation(value = "完结分账") |
|
|
|
|
public ResponseData wxEndProfitsharing(String transaction_id,String out_order_no, BigDecimal amount) { |
|
|
|
|
try { |
|
|
|
|
|
|
|
|
|
HighOrder orderNo = highOrderService.getOrderByOrderNo("HF2021101812025050304"); |
|
|
|
|
Map<String,String> param = new LinkedHashMap<>(); |
|
|
|
|
param.put("appid", "wx637bd6f7314daa46"); |
|
|
|
|
param.put("mch_id", "1289663601"); |
|
|
|
|
param.put("sub_mch_id" , "1609882817"); // 个体户黎杨珍
|
|
|
|
|
param.put("nonce_str" , WxUtils.makeNonStr()); |
|
|
|
|
param.put("transaction_id" , "4200001158202108094442626740"); |
|
|
|
|
param.put("out_order_no" , "30000408682021080916082519929"); |
|
|
|
|
param.put("transaction_id" , orderNo.getPaySerialNo()); |
|
|
|
|
param.put("out_order_no" , orderNo.getOrderNo()); |
|
|
|
|
param.put("description" , "系统自动完结分账"); |
|
|
|
|
String signStr = WxUtils.generateSignature(param, "Skufk5oi85wDFGl888i6wsRSTkdd5df5" , WXPayConstants.SignType.HMACSHA256); |
|
|
|
|
param.put("sign" , signStr); |
|
|
|
|