提交修改

dev-discount
袁野 4 years ago
parent 86995339dd
commit 87dc0695d3
  1. 7
      hai-cweb/src/main/java/com/cweb/controller/pay/WechatPayController.java
  2. 10
      hai-service/src/main/java/com/hai/model/WxSharingOrderRequestModel.java
  3. 13
      hai-service/src/main/java/com/hai/model/WxSharingReceiversVO.java

@ -169,16 +169,15 @@ public class WechatPayController {
wxSharingOrderRequest.setAppid("wx637bd6f7314daa46"); wxSharingOrderRequest.setAppid("wx637bd6f7314daa46");
wxSharingOrderRequest.setNonce_str(WxUtils.makeNonStr()); wxSharingOrderRequest.setNonce_str(WxUtils.makeNonStr());
List<WxSharingReceiversVO> list = new ArrayList<>();
WxSharingReceiversVO receiversVO = new WxSharingReceiversVO(); WxSharingReceiversVO receiversVO = new WxSharingReceiversVO();
receiversVO.setAccount(wxSharingOrderRequest.getSub_mch_id()); receiversVO.setAccount(wxSharingOrderRequest.getSub_mch_id());
receiversVO.setType("MERCHANT_ID"); receiversVO.setType("MERCHANT_ID");
receiversVO.setName("嗨加油");
receiversVO.setRelation_type("SERVICE_PROVIDER"); receiversVO.setRelation_type("SERVICE_PROVIDER");
list.add(receiversVO); wxSharingOrderRequest.setReceiver(JSONObject.toJSONString(receiversVO));
wxSharingOrderRequest.setReceivers(JSONObject.toJSONString(list));
BeanMap beanMap = BeanMap.create(wxSharingOrderRequest); BeanMap beanMap = BeanMap.create(wxSharingOrderRequest);
wxSharingOrderRequest.setSign(WxUtils.makeSign(beanMap, "SHA256" ,"SHA256")); wxSharingOrderRequest.setSign(WxUtils.makeSign(beanMap, "ASDfksdrgg55dDJoe5fky5u8trylDs5u" ,"SHA256"));
String url = "https://api.mch.weixin.qq.com/pay/profitsharingaddreceiver"; String url = "https://api.mch.weixin.qq.com/pay/profitsharingaddreceiver";
String xm = XmlUtil.toSplitXml(wxSharingOrderRequest); String xm = XmlUtil.toSplitXml(wxSharingOrderRequest);

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

@ -29,6 +29,11 @@ public class WxSharingReceiversVO {
*/ */
private String relation_type; private String relation_type;
/**
* 分账接收方全称
*/
private String name;
public String getType() { public String getType() {
return type; return type;
} }
@ -68,4 +73,12 @@ public class WxSharingReceiversVO {
public void setRelation_type(String relation_type) { public void setRelation_type(String relation_type) {
this.relation_type = relation_type; this.relation_type = relation_type;
} }
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
} }

Loading…
Cancel
Save