提交分账接口修改

dev-discount
袁野 4 years ago
parent 86995339dd
commit 498c434621
  1. 16
      hai-cweb/src/main/java/com/cweb/controller/pay/WechatPayController.java
  2. 10
      hai-service/src/main/java/com/hai/model/WxSharingOrderRequestModel.java

@ -26,9 +26,7 @@ import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.BufferedOutputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.SortedMap;
import java.util.*;
@Controller
@RequestMapping(value = "/wechatpay")
@ -169,13 +167,19 @@ public class WechatPayController {
wxSharingOrderRequest.setAppid("wx637bd6f7314daa46");
wxSharingOrderRequest.setNonce_str(WxUtils.makeNonStr());
List<WxSharingReceiversVO> list = new ArrayList<>();
/* List<WxSharingReceiversVO> list = new ArrayList<>();
WxSharingReceiversVO receiversVO = new WxSharingReceiversVO();
receiversVO.setAccount(wxSharingOrderRequest.getSub_mch_id());
receiversVO.setType("MERCHANT_ID");
receiversVO.setRelation_type("SERVICE_PROVIDER");
list.add(receiversVO);
wxSharingOrderRequest.setReceivers(JSONObject.toJSONString(list));
list.add(receiversVO);*/
Map<String,Object> receiversVO = new HashMap<>();
receiversVO.put("type", "MERCHANT_ID");
receiversVO.put("relation_type", "SERVICE_PROVIDER");
receiversVO.put("account", wxSharingOrderRequest.getSub_mch_id());
receiversVO.put("name", "个体户");
wxSharingOrderRequest.setReceiver(JSONObject.toJSONString(receiversVO));
BeanMap beanMap = BeanMap.create(wxSharingOrderRequest);
wxSharingOrderRequest.setSign(WxUtils.makeSign(beanMap, "SHA256" ,"SHA256"));

@ -62,7 +62,7 @@ public class WxSharingOrderRequestModel {
/**
* 分账接收方列表单次分账不能即是支付商户又是接收商户多次分账没有限制
*/
private String receivers;
private String receiver;
public String getMch_id() {
return mch_id;
@ -152,11 +152,11 @@ public class WxSharingOrderRequestModel {
this.amount = amount;
}
public String getReceivers() {
return receivers;
public String getReceiver() {
return receiver;
}
public void setReceivers(String receivers) {
this.receivers = receivers;
public void setReceiver(String receiver) {
this.receiver = receiver;
}
}

Loading…
Cancel
Save