|
@@ -1,4 +1,4 @@
|
|
-package com.wechat.service.sepAccount.impl;
|
|
|
|
|
|
+/*package com.wechat.service.sepAccount.impl;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.wechat.common.enums.SepAccountEnums;
|
|
import com.wechat.common.enums.SepAccountEnums;
|
|
@@ -16,9 +16,9 @@ import java.util.HashMap;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
|
|
|
-/**
|
|
|
|
|
|
+*//**
|
|
* 分账测试类
|
|
* 分账测试类
|
|
- */
|
|
|
|
|
|
+ *//*
|
|
public class SepAccountTest {
|
|
public class SepAccountTest {
|
|
// 删除分账
|
|
// 删除分账
|
|
private static final String DEL_SEP_ACCOUNT_USER = "{\"type\":\"%s\",\"account\":\"%s\"}";
|
|
private static final String DEL_SEP_ACCOUNT_USER = "{\"type\":\"%s\",\"account\":\"%s\"}";
|
|
@@ -39,12 +39,12 @@ public class SepAccountTest {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- /**
|
|
|
|
|
|
+ *//**
|
|
* 分账接收方与原请求不一致
|
|
* 分账接收方与原请求不一致
|
|
* 多次分账后完结分账时,out_order_no 需要注意
|
|
* 多次分账后完结分账时,out_order_no 需要注意
|
|
* 第一次是系统内部生成的,第二、第三次 是上次分账返回的order_id
|
|
* 第一次是系统内部生成的,第二、第三次 是上次分账返回的order_id
|
|
* @throws Exception
|
|
* @throws Exception
|
|
- */
|
|
|
|
|
|
+ *//*
|
|
private static void noSepAccount()throws Exception {
|
|
private static void noSepAccount()throws Exception {
|
|
Map<String,Object> condition = new HashMap<>();
|
|
Map<String,Object> condition = new HashMap<>();
|
|
condition.put("mch_id", ProjectConstant.merchantId);//商户id
|
|
condition.put("mch_id", ProjectConstant.merchantId);//商户id
|
|
@@ -62,13 +62,13 @@ public class SepAccountTest {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- /**
|
|
|
|
|
|
+ *//**
|
|
* 包括商户号,签名类型、随机数
|
|
* 包括商户号,签名类型、随机数
|
|
* @param enums
|
|
* @param enums
|
|
* @param condition
|
|
* @param condition
|
|
* @param isSSL
|
|
* @param isSSL
|
|
* @return
|
|
* @return
|
|
- */
|
|
|
|
|
|
+ *//*
|
|
private RespWrapper<Map<String,Object>> doWxRequest(SepAccountEnums enums, Map<String,Object> condition, boolean isSSL){
|
|
private RespWrapper<Map<String,Object>> doWxRequest(SepAccountEnums enums, Map<String,Object> condition, boolean isSSL){
|
|
Assert.notNull(condition,"微信请求参数不能为空");
|
|
Assert.notNull(condition,"微信请求参数不能为空");
|
|
condition.put("mch_id", ProjectConstant.merchantId);//商户id
|
|
condition.put("mch_id", ProjectConstant.merchantId);//商户id
|
|
@@ -93,9 +93,9 @@ public class SepAccountTest {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- /**
|
|
|
|
|
|
+ *//**
|
|
* {nonce_str=ed95b1c7fbd32fe8, receiver={"type":"PERSONAL_WECHATID","account":"wxid_haxp101y5saj21"}, appid=wxec504e0378010e16, sign=961EA0F51E9AC69229769F041DB5C05E86693F973F71B6DC0EF71D18709340D8, result_code=SUCCESS, mch_id=1503800091, sub_mch_id=1584278251, return_code=SUCCESS}
|
|
* {nonce_str=ed95b1c7fbd32fe8, receiver={"type":"PERSONAL_WECHATID","account":"wxid_haxp101y5saj21"}, appid=wxec504e0378010e16, sign=961EA0F51E9AC69229769F041DB5C05E86693F973F71B6DC0EF71D18709340D8, result_code=SUCCESS, mch_id=1503800091, sub_mch_id=1584278251, return_code=SUCCESS}
|
|
- */
|
|
|
|
|
|
+ *//*
|
|
private static void delSepAccountUser() {
|
|
private static void delSepAccountUser() {
|
|
Map<String,Object> condition = new HashMap<>();
|
|
Map<String,Object> condition = new HashMap<>();
|
|
condition.put("mch_id", ProjectConstant.merchantId);//商户id
|
|
condition.put("mch_id", ProjectConstant.merchantId);//商户id
|
|
@@ -114,11 +114,11 @@ public class SepAccountTest {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- /**
|
|
|
|
|
|
+ *//**
|
|
* 查询分账结果
|
|
* 查询分账结果
|
|
*
|
|
*
|
|
*
|
|
*
|
|
- */
|
|
|
|
|
|
+ *//*
|
|
private static void findSepAccountResult() {
|
|
private static void findSepAccountResult() {
|
|
Map<String,Object> condition = new HashMap<>();
|
|
Map<String,Object> condition = new HashMap<>();
|
|
condition.put("mch_id", ProjectConstant.merchantId);//商户id
|
|
condition.put("mch_id", ProjectConstant.merchantId);//商户id
|
|
@@ -136,14 +136,14 @@ public class SepAccountTest {
|
|
System.out.println(resultMap);
|
|
System.out.println(resultMap);
|
|
System.out.println(checkNoticeSign(resultMap));
|
|
System.out.println(checkNoticeSign(resultMap));
|
|
}
|
|
}
|
|
- /**
|
|
|
|
|
|
+ *//**
|
|
* {
|
|
* {
|
|
* "type": "MERCHANT_ID",
|
|
* "type": "MERCHANT_ID",
|
|
* "account":"190001001",
|
|
* "account":"190001001",
|
|
* "amount":100,
|
|
* "amount":100,
|
|
* "description": "分到商户"
|
|
* "description": "分到商户"
|
|
* },
|
|
* },
|
|
- */
|
|
|
|
|
|
+ *//*
|
|
static class SepUser{
|
|
static class SepUser{
|
|
String type;
|
|
String type;
|
|
String account;
|
|
String account;
|
|
@@ -187,12 +187,12 @@ public class SepAccountTest {
|
|
this.description = description;
|
|
this.description = description;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- /**
|
|
|
|
|
|
+ *//**
|
|
* 单个分账操作
|
|
* 单个分账操作
|
|
- */
|
|
|
|
|
|
+ *//*
|
|
private static final String outOrderNo = "ktjSep20200418001";
|
|
private static final String outOrderNo = "ktjSep20200418001";
|
|
|
|
|
|
- /**
|
|
|
|
|
|
+ *//**
|
|
* <xml>
|
|
* <xml>
|
|
* <return_code><![CDATA[SUCCESS]]></return_code>
|
|
* <return_code><![CDATA[SUCCESS]]></return_code>
|
|
* <result_code><![CDATA[SUCCESS]]></result_code>
|
|
* <result_code><![CDATA[SUCCESS]]></result_code>
|
|
@@ -206,7 +206,7 @@ public class SepAccountTest {
|
|
* <order_id><![CDATA[30000110062020041800341490392]]></order_id>
|
|
* <order_id><![CDATA[30000110062020041800341490392]]></order_id>
|
|
* </xml>
|
|
* </xml>
|
|
* @throws Exception
|
|
* @throws Exception
|
|
- */
|
|
|
|
|
|
+ *//*
|
|
private static void singleSepAccount() throws Exception{
|
|
private static void singleSepAccount() throws Exception{
|
|
Map<String,Object> condition = new HashMap<>();
|
|
Map<String,Object> condition = new HashMap<>();
|
|
condition.put("mch_id", ProjectConstant.merchantId);//商户id
|
|
condition.put("mch_id", ProjectConstant.merchantId);//商户id
|
|
@@ -231,9 +231,9 @@ public class SepAccountTest {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- /**
|
|
|
|
|
|
+ *//**
|
|
* 校验微信响应数据
|
|
* 校验微信响应数据
|
|
- */
|
|
|
|
|
|
+ *//*
|
|
private static boolean checkNoticeSign(Map<String,Object> params){
|
|
private static boolean checkNoticeSign(Map<String,Object> params){
|
|
String sign = (String) params.get("sign");
|
|
String sign = (String) params.get("sign");
|
|
if(sign == null) return false;
|
|
if(sign == null) return false;
|
|
@@ -271,3 +271,4 @@ public class SepAccountTest {
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+*/
|