银盛大改,增加D1通道
This commit is contained in:
parent
0f6cc8d945
commit
7eaf21c7e8
|
|
@ -891,7 +891,7 @@ public class MerchantOrderController {
|
|||
orderPosVO.setOrderNumber(order.getOrderNumber());
|
||||
orderPosVO.setMercOrderNo(order.getMercOrderNo());
|
||||
orderPosVO.setTransTime(String.valueOf(order.getTransDt()));
|
||||
return ResultGenerator.genSuccessJsonPos(orderPosVO, req.getAppId(), req.getReqData());
|
||||
return ResultGenerator.genSuccessJsonPos(orderPosVO, req.getAppId(), req.getRequestId());
|
||||
}
|
||||
String aisleSwitch = order.getAisleSwitch();
|
||||
MerchantChannelStatus channel = null;
|
||||
|
|
@ -933,7 +933,7 @@ public class MerchantOrderController {
|
|||
orderPosVO.setMercOrderNo(order.getMercOrderNo());
|
||||
orderPosVO.setTransTime(String.valueOf(order.getTransDt()));
|
||||
}
|
||||
return ResultGenerator.genSuccessJsonPos(orderPosVO, req.getAppId(), req.getReqData());
|
||||
return ResultGenerator.genSuccessJsonPos(orderPosVO, req.getAppId(), req.getRequestId());
|
||||
}
|
||||
|
||||
@GetMapping("/closeOrder")
|
||||
|
|
|
|||
|
|
@ -95,4 +95,23 @@ public class DeviceStockController{
|
|||
dsService.bindDevcieV2(dto);
|
||||
return ResultGenerator.genSuccessResult("绑定成功",null);
|
||||
}
|
||||
@PostMapping("/bindtablecode")
|
||||
public Result<Object> bindTableCode(@RequestBody DeviceStockDTO dto){
|
||||
dsService.bindTableCode(dto);
|
||||
return ResultGenerator.genSuccessResult("绑定成功",null);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 验证桌码
|
||||
* @param code
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/checkNum")
|
||||
public Result<Object> checkNum(String code){
|
||||
dsService.checkDevice(code);
|
||||
return ResultGenerator.genSuccessResult();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -198,19 +198,19 @@ public class WxController {
|
|||
// ysServiceV3.req(ReqMethod.Reporting, bizContentMap);
|
||||
// }
|
||||
//
|
||||
@PostMapping("/appIdAddOrUpdate")
|
||||
public void appIdAddOrUpdate(){
|
||||
JSONObject bizContentMap = new JSONObject();
|
||||
bizContentMap.put("channelId", "CUPS_WECHAT");
|
||||
bizContentMap.put("mercId", "QRY230511483159");
|
||||
bizContentMap.put("appletId", "wxc2bb94c0ddda1032");
|
||||
ysServiceV3.req(ReqMethod.appIdAddOrUpdate, bizContentMap);
|
||||
}
|
||||
// @PostMapping("/appIdAddOrUpdate")
|
||||
// public void appIdAddOrUpdate(){
|
||||
// JSONObject bizContentMap = new JSONObject();
|
||||
// bizContentMap.put("channelId", "CUPS_WECHAT");
|
||||
// bizContentMap.put("mercId", "QRY230511483159");
|
||||
// bizContentMap.put("appletId", "wxc2bb94c0ddda1032");
|
||||
// ysServiceV3.req(ReqMethod.appIdAddOrUpdate, bizContentMap);
|
||||
// }
|
||||
|
||||
@PostMapping("/auditResult")
|
||||
public void test(String sysFlowId){
|
||||
ysAuditServiceV3.result(sysFlowId);
|
||||
}
|
||||
// @PostMapping("/auditResult")
|
||||
// public void test(String sysFlowId){
|
||||
// ysAuditServiceV3.result(sysFlowId);
|
||||
// }
|
||||
|
||||
/**
|
||||
* 获取公众号权限
|
||||
|
|
|
|||
|
|
@ -93,19 +93,34 @@ public class AuditCallbackController {
|
|||
log.info("云商服V3进件接口回调参数:{},",result.toJSONString());
|
||||
executorService.execute(() -> {
|
||||
try {
|
||||
ysAuditServiceV3.callback(result);
|
||||
ysAuditServiceV3.callback(result,4);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
});
|
||||
return "success";
|
||||
}
|
||||
@PostMapping("/ysV3D1")
|
||||
public String ysAuditCallbackV3D1(@RequestBody JSONObject result) throws Exception {
|
||||
log.info("云商服V3进件接口回调参数:{},",result.toJSONString());
|
||||
executorService.execute(() -> {
|
||||
try {
|
||||
ysAuditServiceV3.callback(result,6);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
});
|
||||
return "success";
|
||||
}
|
||||
|
||||
|
||||
|
||||
@PostMapping("/ysSignV3")
|
||||
public String ysSignV3(@RequestBody JSONObject result) throws Exception {
|
||||
log.info("云商服V3签约接口回调参数:{},",result.toJSONString());
|
||||
executorService.execute(() -> {
|
||||
try {
|
||||
ysAuditServiceV3.callback(result);
|
||||
ysAuditServiceV3.callback(result,4);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,6 +73,8 @@ public class TokenRegistryInterceptor extends HandlerInterceptorAdapter {
|
|||
limitUri.add("/api/auditCallback/tradeCallBack");
|
||||
limitUri.add("/api/merchantOrder/posTradeQuery");
|
||||
limitUri.add("/api/merchantOrder/posTradeQueryNumber");
|
||||
limitUri.add("/api/device/stock/checkNum");
|
||||
limitUri.add("/api/device/stock/bindtablecode");
|
||||
boolean passFlag = limitUri.stream().anyMatch(s -> s.equals(requestUri) || requestUri.startsWith(s));
|
||||
if (passFlag) {
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -11,9 +11,10 @@ ys:
|
|||
otherDomain: https://commonapi.ysepay.com/gateway.do
|
||||
## 代理商编号
|
||||
agentNo: 801521000002WJW
|
||||
## 交易发起方编号 武汉融商创银科技有限公司
|
||||
## 交易发起方编号
|
||||
srcMerchantNo: 826521773920170
|
||||
|
||||
|
||||
## 私钥用于签名,对应的公钥给到银盛
|
||||
priKey: MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDky8v1JlxCfZM0e0p7rkZq/hpa3yHjsF3aJaE5rBt0+x5G7MnHX1AIgi9jJzG3Z8QnEPUVutVClVbRZ3k9hZChlm6T9Miv4IhyvE4kPGJEXRi2q2r7nHyUeGve3TC4jXvELy0muS30BWRyczM/f2x13/uzjxeCM1eMnI5+jxfdg8aaYS2NpCydgObtEvKQRpx6YoF+F7eIF8DNvbYyoRNzM/+NsmquDmgK7Ad1qNK7gqYSmfXH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Qq5irAtEWVfNK3jc0I6CumdyiAG+WyWHbbcF9UBG+1KpUM46YNpIbS0r4Yobg+R4H5hHAoGBAOCZOg2VFPiluOPWzIcILb6nYvZyPhZP4pzz7WyzBht2SoHcD70cduCQpcuAXbj5JY59gUfNxURCDxQDNW2x8cQs6Hxme1kVg5kZNJAaclfb7Jx+ZqsYk4ua0NqxOtyfhRmYXVaTVKDFNt8CmwoiKYse4VDC/E3yKgha0UdcE+co
|
||||
## 签名公钥,由银盛提供
|
||||
|
|
@ -28,7 +29,7 @@ ys:
|
|||
## 代理商编号
|
||||
agentNoV2: 801521000002WJW
|
||||
## 进件私钥v2
|
||||
priKeyV2: MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDky8v1JlxCfZM0e0p7rkZq/hpa3yHjsF3aJaE5rBt0+x5G7MnHX1AIgi9jJzG3Z8QnEPUVutVClVbRZ3k9hZChlm6T9Miv4IhyvE4kPGJEXRi2q2r7nHyUeGve3TC4jXvELy0muS30BWRyczM/f2x13/uzjxeCM1eMnI5+jxfdg8aaYS2NpCydgObtEvKQRpx6YoF+F7eIF8DNvbYyoRNzM/+NsmquDmgK7Ad1qNK7gqYSmfXHUys7F97Sd/NxfegaiBMapepruUvQSlcQkYXJprM9cBGQuWx/iK8kQ+yYfmOI0OWX8pBwYWut7rR/ritujAdKtIpg14XVxRLnop6dAgMBAAECggEASjJA6TZQcwuQIlPdOrCwi1/uIgv8TH9UYDsVxsMmgFAzaGK/qNUi+i9luKzsNYMEHHsmT66wHBCb//qjWa0n0w8auwaF0mtpNHQWjy+52luqeQqr/f6oc+l9ad+nPiI7wcpexREGcv0QrwDm3K+w96T0Vi2QPRvzR1k56Jb08VN+kpAXb3g7X++il0Ql2lKFM8NySI0utnHAFMH7erJqNc4KeKmr2fJYw23ldBUOxmU6oWEIGwO+KiysfNlmzu3JspYE/eQfKX5aaEKaDbPVGF5Dje5e1SlJ1x9sTAfhOPeh83canoRN61aAI5mEKu04li5LLsc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47qsIZ1WboM2Rk/AoGBAIuT1kSjtd0OE34mV8lpcHVzNsQi8XN3DKTLY4DKRRDMO1wtG5xFPq1SBiu+nH9tlJvjqm1KQaFnIv868IV5vrybsK5g+9y9xZlQlLhvQq5irAtEWVfNK3jc0I6CumdyiAG+WyWHbbcF9UBG+1KpUM46YNpIbS0r4Yobg+R4H5hHAoGBAOCZOg2VFPiluOPWzIcILb6nYvZyPhZP4pzz7WyzBht2SoHcD70cduCQpcuAXbj5JY59gUfNxURCDxQDNW2x8cQs6Hxme1kVg5kZNJAaclfb7Jx+ZqsYk4ua0NqxOtyfhRmYXVaTVKDFNt8CmwoiKYse4VDC/E3yKgha0UdcE+co
|
||||
## 进件公钥v2
|
||||
pubKeyV2: MIGfMA0GCSGqSIb3DQEBAQUAA4GNADCBiQKBgQC7SPkmIUf2auwkgbVchMyfeCDgICuA1GKrSwRbDI24UMVhzDgcIxCUmFG5/DfcPJz0d3oV9Ggkd4/7NmteRvmNnOOGNOnmR6AGEKafDpL1mAdpndmpkAZ0f6OVo3Py5JDg2wt8d+u3dF0AFWwd2rrrqscWvxJVB55DnuZfXl2CyQIDAQAB
|
||||
## 加密密钥
|
||||
|
|
@ -42,6 +43,13 @@ ys:
|
|||
sybPubKey:
|
||||
# 银盛公钥
|
||||
payPubKey:
|
||||
#D1相关配置
|
||||
agentNoD1: 801521000002UUS
|
||||
srcMerchantNoD1: 826521673920090
|
||||
## 进件私钥v2(D1)
|
||||
priKeyV2D1: MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQD2J82Gg79Tk8HZ9Zl7EOeLwvUn41c4ktUg6jveIhYLhT/PW5hpPAtgKXd9BvhtpfXhzbK6U9UURKhBgFIkQ+oIJQNfbB/F2jdVK9ke3IYi0/TXHMnY63x43qxciLeAOt+LxdhHn6ZImV4MsRkPjF/zLsaJrPOPWbc2m4T1yvinfzkrxhZaWn1dj4+IdyO3tA/juXCjydQqKR2kSqJlo6gdT9N3RIJ+ET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JJ/6DxhxrlqdICiWeixjVkN9vePw0LrqTA7IjylELJuamuu2yntflXgvfUaYspIu/mWGufFEAtXodCL6TyKlhf21mEV28e4L+ydAoGAItgCUGbot95QNT1z+9QFN+18AvMnWCNvqanrC4qsk0phjYX9FFwfSCqWVeVm0Q0+2tUrRNcUEcbmlbQToBZq/hSu0nPcZIPvnNxLfW/NY7eVCXIcI5eNPjUIgbRCVMc6w5ukYMxPidOBuRXIt1iq2+iV20/FMbA58sY7AgOiaMw=
|
||||
## 进件公钥v2
|
||||
pubKeyV2D1: MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC7SPkmIUf2auwkgbVchMyfeCDgICuA1GKrSwRbDI24UMVhzDgcIxCUmFG5/DfcPJz0d3oV9Ggkd4/7NmteRvmNnOOGNOnmR6AGEKafDpL1mAdpndmpkAZ0f6OVo3Py5JDg2wt8d+u3dF0AFWwd2rrrqscWvxJVB55DnuZfXl2CyQIDAQAB
|
||||
|
||||
ys-extension:
|
||||
## 进件URL前缀v2
|
||||
|
|
|
|||
|
|
@ -103,20 +103,20 @@ public class LoginController {
|
|||
userInfo.setLoginName(username);
|
||||
userInfo = uiService.getOne(new QueryWrapper<>(userInfo));
|
||||
|
||||
String ipAddr = IpUtils.getIpAddr(request);
|
||||
DescribeIpv4LocationResponse clientLocation = ipLocationService.getLocation(ipAddr);
|
||||
String location = clientLocation.getCountry()
|
||||
+ "," + clientLocation.getProvince()
|
||||
+ "," + clientLocation.getCity()
|
||||
+ "," + clientLocation.getCounty();
|
||||
// String ipAddr = IpUtils.getIpAddr(request);
|
||||
// DescribeIpv4LocationResponse clientLocation = ipLocationService.getLocation(ipAddr);
|
||||
// String location = clientLocation.getCountry()
|
||||
// + "," + clientLocation.getProvince()
|
||||
// + "," + clientLocation.getCity()
|
||||
// + "," + clientLocation.getCounty();
|
||||
if (userInfo == null) {
|
||||
wxTalkService.sendManageLoginInfo(username, password, ipAddr, clientLocation.getIsp(), location, false);
|
||||
//wxTalkService.sendManageLoginInfo(username, password, ipAddr, clientLocation.getIsp(), location, false);
|
||||
result.put("message", "用户名或者密码错误");
|
||||
return result;
|
||||
}
|
||||
|
||||
if (!userInfo.getPassword().equals(MD5.create().digestHex(password, StandardCharsets.UTF_8))) {
|
||||
wxTalkService.sendManageLoginInfo(username, password, ipAddr, clientLocation.getIsp(), location, false);
|
||||
//wxTalkService.sendManageLoginInfo(username, password, ipAddr, clientLocation.getIsp(), location, false);
|
||||
result.put("message", "用户名或者密码错误");
|
||||
return result;
|
||||
}
|
||||
|
|
@ -126,7 +126,7 @@ public class LoginController {
|
|||
result.put("token", JwtUtils.getToken(userInfo));
|
||||
result.put("userId", userInfo.getId());
|
||||
|
||||
wxTalkService.sendManageLoginInfo(username, password, ipAddr, clientLocation.getIsp(), location, true);
|
||||
//wxTalkService.sendManageLoginInfo(username, password, ipAddr, clientLocation.getIsp(), location, true);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -462,11 +462,12 @@ public class MerchantStoreController extends BaseNoModelController {
|
|||
}
|
||||
|
||||
Map<String, Object> result = new HashMap<>(2);
|
||||
Integer channel =0;
|
||||
try {
|
||||
JSONObject params = new JSONObject();
|
||||
params.put("userId", ua.getUserId() + "");
|
||||
//ysAuditServiceV2.merchantAudit(ua.getUserId() + "", false);
|
||||
ysAuditServiceV3.merchantAuditV3(String.valueOf(ua.getUserId()), false); // userAppService.merchantAudit(params, "4");
|
||||
ysAuditServiceV3.merchantAuditV3(String.valueOf(ua.getUserId()), false,channel); // userAppService.merchantAudit(params, "4");
|
||||
result.put("code", "1");
|
||||
result.put("msg", "发起进件成功, 稍后查看进件状态");
|
||||
return result;
|
||||
|
|
|
|||
|
|
@ -9,13 +9,13 @@ public interface YSAuditServiceV3 {
|
|||
* 银盛进件3.0
|
||||
* @param userId 用户id
|
||||
*/
|
||||
void merchantAuditV3(String userId, boolean isFailCheck);
|
||||
void sign(MerchantChannelStatus mcs);
|
||||
void merchantAuditV3(String userId, boolean isFailCheck, Integer channel);
|
||||
void sign(MerchantChannelStatus mcs, Integer channel);
|
||||
/**
|
||||
* 回调,通用回调
|
||||
* @param jsonObject 回调参数
|
||||
*/
|
||||
void callback(JSONObject jsonObject) throws Exception;
|
||||
void callback(JSONObject jsonObject, Integer channel) throws Exception;
|
||||
|
||||
/**
|
||||
* 查询进件结果
|
||||
|
|
@ -25,8 +25,8 @@ public interface YSAuditServiceV3 {
|
|||
|
||||
void openOnlinePay(MerchantChannelStatus mcs);
|
||||
|
||||
void report(MerchantChannelStatus mcs);
|
||||
void report(MerchantChannelStatus mcs, Integer channel);
|
||||
|
||||
void reportAgain(MerchantChannelStatus mcs);
|
||||
void reportAgain(MerchantChannelStatus mcs, Integer channel);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -122,19 +122,19 @@ public class YSAuditServiceV3 implements cn.pluss.platform.channel.ys.YSAuditSer
|
|||
// private MercChangeRecordService mcrService;
|
||||
|
||||
@Override
|
||||
public void merchantAuditV3(String userId, boolean isFailCheck) {
|
||||
public void merchantAuditV3(String userId, boolean isFailCheck, Integer channel) {
|
||||
try {
|
||||
self.step1(userId);
|
||||
self.step1(userId,channel);
|
||||
executorService.execute(() -> {
|
||||
try {
|
||||
self.step2(userId);
|
||||
self.step2(userId,channel);
|
||||
Thread.sleep(10000);
|
||||
self.step3(userId);
|
||||
self.step3(userId, channel);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
||||
MerchantBaseInfo mbi = mbiService.getMerchantBaseInfoByUserId(userId);
|
||||
MerchantChannelStatus mcs = mcsService.getByMerchantCode(mbi.getMerchantCode(), 4);
|
||||
MerchantChannelStatus mcs = mcsService.getByMerchantCode(mbi.getMerchantCode(), channel);
|
||||
|
||||
if (e instanceof MsgException) {
|
||||
Serializable obj = ((MsgException) e).getObj();
|
||||
|
|
@ -143,7 +143,7 @@ public class YSAuditServiceV3 implements cn.pluss.platform.channel.ys.YSAuditSer
|
|||
}
|
||||
}
|
||||
|
||||
if (mcs != null && mcs.getChannel() == 4) {
|
||||
if (mcs != null && mcs.getChannel().equals(channel)) {
|
||||
mcs.setStatus(MerchantChannelStatus.AUDIT_STATUS_EXAMINING);
|
||||
mcs.setThirdStatus(MerchantChannelStatus.AUDIT_THIRD_STATUS_WAITING);
|
||||
mcs.setRemark("银盛审核失败: " + e.getMessage());
|
||||
|
|
@ -161,9 +161,9 @@ public class YSAuditServiceV3 implements cn.pluss.platform.channel.ys.YSAuditSer
|
|||
e.printStackTrace();
|
||||
|
||||
MerchantBaseInfo mbi = mbiService.getMerchantBaseInfoByUserId(userId);
|
||||
MerchantChannelStatus mcs = mcsService.getByMerchantCode(mbi.getMerchantCode(), 4);
|
||||
MerchantChannelStatus mcs = mcsService.getByMerchantCode(mbi.getMerchantCode(), channel);
|
||||
|
||||
if (mcs != null && Objects.equals(mcs.getChannel(), 4)) {
|
||||
if (mcs != null && Objects.equals(mcs.getChannel(), channel)) {
|
||||
mcs.setStatus(MerchantChannelStatus.AUDIT_STATUS_EXAMINING);
|
||||
mcs.setThirdStatus(MerchantChannelStatus.AUDIT_THIRD_STATUS_WAITING);
|
||||
mcs.setRemark("银盛审核失败: " + e.getMessage());
|
||||
|
|
@ -183,7 +183,7 @@ public class YSAuditServiceV3 implements cn.pluss.platform.channel.ys.YSAuditSer
|
|||
}
|
||||
|
||||
@Override
|
||||
public void sign(MerchantChannelStatus mcs) {
|
||||
public void sign(MerchantChannelStatus mcs, Integer channel) {
|
||||
List<String> excludeStatus = Collections.singletonList(MerchantChannelStatus.AUDIT_STATUS_SUCCESS);
|
||||
|
||||
boolean returnFlag = excludeStatus.stream().anyMatch(s -> s.equals(mcs.getStatus()));
|
||||
|
|
@ -198,28 +198,51 @@ public class YSAuditServiceV3 implements cn.pluss.platform.channel.ys.YSAuditSer
|
|||
|
||||
JSONObject extra = mcs.getExtra();
|
||||
String custId = extra.getString("custId");
|
||||
RespEntity respEntity;
|
||||
if(channel == 4) {
|
||||
RateInfo rateInfo = new RateInfo();
|
||||
rateInfo.setCustId(custId);
|
||||
rateInfo.setBusOpenType("00|01");
|
||||
rateInfo.setContractType("2");
|
||||
rateInfo.setIsSendConMsg("1");
|
||||
rateInfo.setNotifyUrl(YsConfigV3.AUDIT_SIGN_NOTIFY_URL);
|
||||
|
||||
RateInfo rateInfo = new RateInfo();
|
||||
rateInfo.setCustId(custId);
|
||||
rateInfo.setBusOpenType("00|01");
|
||||
rateInfo.setContractType("2");
|
||||
rateInfo.setIsSendConMsg("1");
|
||||
rateInfo.setNotifyUrl(YsConfigV3.AUDIT_SIGN_NOTIFY_URL);
|
||||
RateFeeInfo rateFeeInfo = new RateFeeInfo();
|
||||
rateFeeInfo.setAliPayFee(new RateFeeDetail("0", "0.38", "1"));
|
||||
rateFeeInfo.setWxPayFee(new RateFeeDetail("0", "0.38", "1"));
|
||||
rateFeeInfo.setBank1debitPayFee(new RateFeeDetail("0", "0.61", "1", "999900"));
|
||||
rateFeeInfo.setBank1creditPayFee(new RateFeeDetail("0", "0.61", "1", "999900"));
|
||||
rateFeeInfo.setBank2debitPayFee(new RateFeeDetail("0", "0.60", "1", "999900"));
|
||||
rateFeeInfo.setBank2creditPayFee(new RateFeeDetail("0", "0.60", "1"));
|
||||
RateFeeDetail codeScanD0Fee = new RateFeeDetail("0", "0.48", "1");
|
||||
rateInfo.setCodeScanD0Fee(codeScanD0Fee);
|
||||
rateInfo.setCodeScanT1Fee(rateFeeInfo);
|
||||
|
||||
RateFeeInfo rateFeeInfo = new RateFeeInfo();
|
||||
rateFeeInfo.setAliPayFee(new RateFeeDetail("0", "0.38", "1"));
|
||||
rateFeeInfo.setWxPayFee(new RateFeeDetail("0", "0.38", "1"));
|
||||
rateFeeInfo.setBank1debitPayFee(new RateFeeDetail("0", "0.61", "1", "999900"));
|
||||
rateFeeInfo.setBank1creditPayFee(new RateFeeDetail("0", "0.61", "1", "999900"));
|
||||
rateFeeInfo.setBank2debitPayFee(new RateFeeDetail("0", "0.60", "1", "999900"));
|
||||
rateFeeInfo.setBank2creditPayFee(new RateFeeDetail("0", "0.60", "1"));
|
||||
RateFeeDetail codeScanD0Fee = new RateFeeDetail("0", "0.10", "1");
|
||||
rateInfo.setCodeScanD0Fee(codeScanD0Fee);
|
||||
rateInfo.setCodeScanT1Fee(rateFeeInfo);
|
||||
respEntity = ysServiceV3.req(ReqMethod.sign, (JSONObject) JSON.toJSON(rateInfo), channel);
|
||||
if (!Objects.equals(respEntity.getSubCode(), YsConfigV3.BIZ_SUCCESS)) {
|
||||
throw new MsgException("银盛云商服3.0商户签约申请请求失败, {}", respEntity.getSubMsg());
|
||||
}
|
||||
}else {
|
||||
RateInfoD1 rateInfoD1 = new RateInfoD1();
|
||||
rateInfoD1.setCustId(custId);
|
||||
rateInfoD1.setBusOpenType("00");
|
||||
rateInfoD1.setContractType("2");
|
||||
rateInfoD1.setIsSendConMsg("1");
|
||||
rateInfoD1.setNotifyUrl(YsConfigV3.AUDIT_NOTIFY_URL_D1);
|
||||
|
||||
RespEntity respEntity = ysServiceV3.req(ReqMethod.sign, (JSONObject) JSON.toJSON(rateInfo));
|
||||
if (!Objects.equals(respEntity.getSubCode(), YsConfigV3.BIZ_SUCCESS)) {
|
||||
throw new MsgException("银盛云商服3.0商户签约申请请求失败, {}", respEntity.getSubMsg());
|
||||
RateFeeInfo rateFeeInfo = new RateFeeInfo();
|
||||
rateFeeInfo.setAliPayFee(new RateFeeDetail("0", "0.38", "1"));
|
||||
rateFeeInfo.setWxPayFee(new RateFeeDetail("0", "0.38", "1"));
|
||||
rateFeeInfo.setBank1debitPayFee(new RateFeeDetail("0", "0.61", "1", "999900"));
|
||||
rateFeeInfo.setBank1creditPayFee(new RateFeeDetail("0", "0.61", "1", "999900"));
|
||||
rateFeeInfo.setBank2debitPayFee(new RateFeeDetail("0", "0.60", "1", "999900"));
|
||||
rateFeeInfo.setBank2creditPayFee(new RateFeeDetail("0", "0.60", "1"));
|
||||
rateInfoD1.setCodeScanT1Fee(rateFeeInfo);
|
||||
|
||||
respEntity = ysServiceV3.req(ReqMethod.sign, (JSONObject) JSON.toJSON(rateInfoD1), channel);
|
||||
if (!Objects.equals(respEntity.getSubCode(), YsConfigV3.BIZ_SUCCESS)) {
|
||||
throw new MsgException("银盛云商服3.0商户签约申请请求失败, {}", respEntity.getSubMsg());
|
||||
}
|
||||
}
|
||||
|
||||
JSONObject businessData = JSON.parseObject(respEntity.getBusinessData());
|
||||
|
|
@ -242,7 +265,7 @@ public class YSAuditServiceV3 implements cn.pluss.platform.channel.ys.YSAuditSer
|
|||
}
|
||||
|
||||
@Override
|
||||
public void callback(JSONObject callback) throws Exception {
|
||||
public void callback(JSONObject callback, Integer channel) throws Exception {
|
||||
// String signContent = SignUtils.getSignContent(callback);
|
||||
// String signStr = callback.getString("sign");
|
||||
// Sign sign = SecureUtil.sign(SignAlgorithm.SHA256withRSA, null, ysConfig.getOldPubKey());
|
||||
|
|
@ -260,7 +283,6 @@ public class YSAuditServiceV3 implements cn.pluss.platform.channel.ys.YSAuditSer
|
|||
// log.info("银盛云商服3.0回调验签失败");
|
||||
// throw new MsgException("银盛云商服3.0回调验签失败");
|
||||
// }
|
||||
|
||||
String bizContent = callback.getString("bizContent");
|
||||
Notify notifyData = JSON.parseObject(bizContent, Notify.class);
|
||||
|
||||
|
|
@ -269,13 +291,13 @@ public class YSAuditServiceV3 implements cn.pluss.platform.channel.ys.YSAuditSer
|
|||
// 资料确认通知
|
||||
Notify.Cust cust = notifyData.getCust();
|
||||
cust.setStatus(notifyData.getStatus());
|
||||
auditResultHandle(cust);
|
||||
auditResultHandle(cust,channel);
|
||||
break;
|
||||
case Notify.TYPE_MERC_SIGN:
|
||||
// 签约变更通知
|
||||
Notify.Auth auth = notifyData.getAuth();
|
||||
auth.setStatus(notifyData.getStatus());
|
||||
signResultHandle(auth);
|
||||
signResultHandle(auth,channel);
|
||||
break;
|
||||
case Notify.TYPE_MERC_CHANGE:
|
||||
// 商户资料变更通知
|
||||
|
|
@ -289,7 +311,7 @@ public class YSAuditServiceV3 implements cn.pluss.platform.channel.ys.YSAuditSer
|
|||
// 报备通知
|
||||
Notify.Report report = notifyData.getReport();
|
||||
report.setStatus(notifyData.getStatus());
|
||||
collectSubMerId(report);
|
||||
collectSubMerId(report,channel);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -299,7 +321,7 @@ public class YSAuditServiceV3 implements cn.pluss.platform.channel.ys.YSAuditSer
|
|||
|
||||
}
|
||||
|
||||
public void preCheck(String userId) {
|
||||
public void preCheck(String userId, Integer channel) {
|
||||
MerchantBaseInfo mbi = mbiService.getMerchantBaseInfoByUserId(userId);
|
||||
LambdaQueryWrapper<MerchantChannelStatus> qWrapper = Wrappers.lambdaQuery();
|
||||
qWrapper.eq(MerchantChannelStatus::getMerchantCode, mbi.getMerchantCode());
|
||||
|
|
@ -341,32 +363,32 @@ public class YSAuditServiceV3 implements cn.pluss.platform.channel.ys.YSAuditSer
|
|||
}
|
||||
|
||||
// 此处先将进件状态锁住
|
||||
existD0.setChannel(4);
|
||||
existD0.setChannel(channel);
|
||||
mcsService.saveOrUpdate(existD0);
|
||||
}
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRES_NEW)
|
||||
public void step1(String userId) {
|
||||
MercInfo mercInfo = combineBaseInfo(userId);
|
||||
RespEntity req = ysServiceV3.req(ReqMethod.addCustInfoApply, (JSONObject) JSONObject.toJSON(mercInfo));
|
||||
public void step1(String userId, Integer channel) {
|
||||
MercInfo mercInfo = combineBaseInfo(userId, channel);
|
||||
RespEntity req = ysServiceV3.req(ReqMethod.addCustInfoApply, (JSONObject) JSONObject.toJSON(mercInfo), channel);
|
||||
String subCode = req.getSubCode();
|
||||
|
||||
if (!Objects.equals(subCode, YsConfigV3.BIZ_SUCCESS)) {
|
||||
throw new MsgException(req.getSubMsg());
|
||||
}
|
||||
|
||||
preCheck(userId);
|
||||
preCheck(userId, channel);
|
||||
MerchantChannelStatus mcs = new MerchantChannelStatus();
|
||||
MerchantBaseInfo mbi = mbiService.getMerchantBaseInfoByUserId(userId);
|
||||
mcs.setMerchantCode(mbi.getMerchantCode());
|
||||
mcs.setChannel(4);
|
||||
mcs.setChannel(channel);
|
||||
mcs = mcsService.getOne(new QueryWrapper<>(mcs));
|
||||
|
||||
if (mcs == null) {
|
||||
mcs = new MerchantChannelStatus();
|
||||
mcs.setMerchantCode(mcs.getMerchantCode());
|
||||
mcs.setChannel(4);
|
||||
mcs.setChannel(channel);
|
||||
}
|
||||
|
||||
JSONObject extra = mcs.getExtra();
|
||||
|
|
@ -382,8 +404,14 @@ public class YSAuditServiceV3 implements cn.pluss.platform.channel.ys.YSAuditSer
|
|||
//upstreamInfoService.save(mbi, legalIdCard, accountDTO.getIdcard(), accountDTO.getBankCard(), 4);
|
||||
}
|
||||
|
||||
private MercInfo combineBaseInfo(String userId) {
|
||||
CombineMercInfo combineMercInfo = mercAuditListener.getMercInfo(userId, Account.CHANNEL_TYPE_D0);
|
||||
private MercInfo combineBaseInfo(String userId, Integer channel) {
|
||||
CombineMercInfo combineMercInfo;
|
||||
if (channel.equals(4)){
|
||||
combineMercInfo = mercAuditListener.getMercInfo(userId, Account.CHANNEL_TYPE_D0);
|
||||
}else {
|
||||
combineMercInfo = mercAuditListener.getMercInfo(userId, Account.CHANNEL_TYPE_D1);
|
||||
}
|
||||
|
||||
LambdaQueryWrapper<MerchantBaseInfo> qWrapper = Wrappers.lambdaQuery();
|
||||
qWrapper.eq(MerchantBaseInfo::getUserId, userId);
|
||||
MerchantBaseInfo mbi = mbiService.getOne(qWrapper);
|
||||
|
|
@ -413,8 +441,14 @@ public class YSAuditServiceV3 implements cn.pluss.platform.channel.ys.YSAuditSer
|
|||
custInfo.setMccCd(mbi.getMcc());
|
||||
custInfo.setContactMail("chaozhanggui2022@163.com");
|
||||
custInfo.setCusMgrNm("蔡祥");
|
||||
custInfo.setNotifyUrl(YsConfigV3.AUDIT_NOTIFY_URL);
|
||||
custInfo.setAgtMercId(ysConfigV3.getAgentNo());
|
||||
//区分D0、D1
|
||||
if (channel.equals(4)) {
|
||||
custInfo.setNotifyUrl(YsConfigV3.AUDIT_NOTIFY_URL);
|
||||
custInfo.setAgtMercId(ysConfigV3.getAgentNo());
|
||||
}else {
|
||||
custInfo.setNotifyUrl(YsConfigV3.AUDIT_NOTIFY_URL_D1);
|
||||
custInfo.setAgtMercId(ysConfigV3.getAgentNoD1());
|
||||
}
|
||||
// custInfo.setRemark("测试商户");
|
||||
|
||||
//法人基本信息
|
||||
|
|
@ -507,12 +541,12 @@ public class YSAuditServiceV3 implements cn.pluss.platform.channel.ys.YSAuditSer
|
|||
* 客户号id custId
|
||||
* 入网状态 status
|
||||
*/
|
||||
public void auditResultHandle(Notify.Cust cust) {
|
||||
public void auditResultHandle(Notify.Cust cust, Integer channel) {
|
||||
String status = cust.getStatus();
|
||||
String sysFlowId = cust.getSysFlowId();
|
||||
MerchantChannelStatus mcs = new MerchantChannelStatus();
|
||||
mcs.setApplicationId(sysFlowId);
|
||||
mcs.setChannel(4);
|
||||
mcs.setChannel(channel);
|
||||
mcs = mcsService.getOne(new QueryWrapper<>(mcs));
|
||||
mcs.setThirdStatus(status);
|
||||
mcs.getExtra().putAll((JSONObject) JSON.toJSON(cust));
|
||||
|
|
@ -521,7 +555,7 @@ public class YSAuditServiceV3 implements cn.pluss.platform.channel.ys.YSAuditSer
|
|||
case YsConfigV3.STATUS_SUCCESS:
|
||||
mcs.setAuditSuccessTime(new Date());
|
||||
mcsService.updateById(mcs);
|
||||
sign(mcs);
|
||||
sign(mcs,channel);
|
||||
break;
|
||||
case YsConfigV3.STATUS_REFUSE:
|
||||
List<String> excludeStatus = Arrays.asList(MerchantChannelStatus.AUDIT_STATUS_REJECT, MerchantChannelStatus.AUDIT_STATUS_SUCCESS);
|
||||
|
|
@ -549,65 +583,11 @@ public class YSAuditServiceV3 implements cn.pluss.platform.channel.ys.YSAuditSer
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 入网申请流水 lkl
|
||||
* 备注 note
|
||||
* 客户号id custId
|
||||
* 入网状态 status
|
||||
*/
|
||||
public void lklResultHandle(CallBackVo cust) {
|
||||
String status = cust.getStatus();
|
||||
String sysFlowId = cust.getSysFlowId();
|
||||
MerchantChannelStatus mcs = new MerchantChannelStatus();
|
||||
mcs.setApplicationId(sysFlowId);
|
||||
mcs.setChannel(5);
|
||||
mcs = mcsService.getOne(new QueryWrapper<>(mcs));
|
||||
mcs.setThirdStatus(status);
|
||||
mcs.getExtra().putAll((JSONObject) JSON.toJSON(cust));
|
||||
|
||||
switch (status) {
|
||||
case YsConfigV3.STATUS_SUCCESS:
|
||||
mcs.setAuditSuccessTime(new Date());
|
||||
mcsService.updateById(mcs);
|
||||
sign(mcs);
|
||||
break;
|
||||
case YsConfigV3.STATUS_REFUSE:
|
||||
List<String> excludeStatus = Arrays.asList(MerchantChannelStatus.AUDIT_STATUS_REJECT, MerchantChannelStatus.AUDIT_STATUS_SUCCESS);
|
||||
MerchantChannelStatus finalMcs = mcs;
|
||||
boolean returnFlag = excludeStatus.stream().anyMatch(s -> s.equals(finalMcs.getStatus()));
|
||||
if (returnFlag) {
|
||||
return;
|
||||
}
|
||||
MerchantBaseInfo mbi = mbiService.getMerchantBaseInfoByMerchantCode(mcs.getMerchantCode());
|
||||
String note = cust.getNote();
|
||||
mcs.setRemark(note);
|
||||
mcs.setStatus(MerchantChannelStatus.AUDIT_STATUS_REJECT);
|
||||
mcsService.updateById(mcs);
|
||||
mercAuditListener.onFail(mbi.getUserId(), mcs, note);
|
||||
break;
|
||||
// case YsConfigV3.STATUS_TO_MANUAL:
|
||||
// List<String> excludeStatus2 = Arrays.asList(MerchantChannelStatus.AUDIT_STATUS_SUCCESS, MerchantChannelStatus.AUDIT_STATUS_ARTIFICIAL_EXAMINING);
|
||||
// MerchantChannelStatus finalMcs2 = mcs;
|
||||
// boolean returnFlag2 = excludeStatus2.stream().anyMatch(s -> s.equals(finalMcs2.getStatus()));
|
||||
// if (returnFlag2) {
|
||||
// return;
|
||||
// }
|
||||
// mcs.setStatus(MerchantChannelStatus.AUDIT_STATUS_ARTIFICIAL_EXAMINING);
|
||||
// mcsService.updateById(mcs);
|
||||
// break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public void step2(String userId) {
|
||||
public void step2(String userId, Integer channel) {
|
||||
MerchantBaseInfo mbi = mbiService.getMerchantBaseInfoByUserId(userId);
|
||||
List<MerchantImage> miList = miService.getListOfMerch(userId, Account.CHANNEL_TYPE_D0);
|
||||
MerchantChannelStatus mcs = new MerchantChannelStatus();
|
||||
mcs.setChannel(4);
|
||||
mcs.setChannel(channel);
|
||||
mcs.setMerchantCode(mbi.getMerchantCode());
|
||||
mcs = mcsService.getOne(new QueryWrapper<>(mcs));
|
||||
|
||||
|
|
@ -619,9 +599,9 @@ public class YSAuditServiceV3 implements cn.pluss.platform.channel.ys.YSAuditSer
|
|||
imageUpload(mi.getPhotoType(), mi.getPicUrl(), mcs.getApplicationId());
|
||||
}
|
||||
}
|
||||
public void step3(String userId) {
|
||||
public void step3(String userId, Integer channel) {
|
||||
MerchantBaseInfo mbi = mbiService.getMerchantBaseInfoByUserId(userId);
|
||||
MerchantChannelStatus mcs = mcsService.getByMerchantCode(mbi.getMerchantCode(), 4);
|
||||
MerchantChannelStatus mcs = mcsService.getByMerchantCode(mbi.getMerchantCode(), channel);
|
||||
|
||||
if (mcs == null) {
|
||||
throw new MsgException("无法确认进件信息");
|
||||
|
|
@ -631,7 +611,7 @@ public class YSAuditServiceV3 implements cn.pluss.platform.channel.ys.YSAuditSer
|
|||
param.put("auditFlag", "Y");
|
||||
param.put("sysFlowId", mcs.getApplicationId());
|
||||
|
||||
RespEntity respEntity = ysServiceV3.req(ReqMethod.auditCustInfoApply, param);
|
||||
RespEntity respEntity = ysServiceV3.req(ReqMethod.auditCustInfoApply, param, channel);
|
||||
|
||||
JSONObject bizContent = JSON.parseObject(respEntity.getBusinessData());
|
||||
mcs.getExtra().putAll(bizContent);
|
||||
|
|
@ -723,10 +703,10 @@ public class YSAuditServiceV3 implements cn.pluss.platform.channel.ys.YSAuditSer
|
|||
|
||||
return null;
|
||||
}
|
||||
public void signResultHandle(Notify.Auth authData) {
|
||||
public void signResultHandle(Notify.Auth authData, Integer channel) {
|
||||
QueryWrapper<MerchantChannelStatus> qWrapper = Wrappers.query();
|
||||
qWrapper.eq("extra ->> '$.authId'", authData.getAuthId());
|
||||
qWrapper.eq("channel", 4);
|
||||
qWrapper.eq("channel", channel);
|
||||
MerchantChannelStatus mcs = mcsService.getOne(qWrapper);
|
||||
mcs = mcsService.getByIdLock(mcs.getId());
|
||||
|
||||
|
|
@ -837,13 +817,13 @@ public class YSAuditServiceV3 implements cn.pluss.platform.channel.ys.YSAuditSer
|
|||
param.put("option", "ON");
|
||||
param.put("rateFee", "0.38");
|
||||
param.put("rateBottom", "1");
|
||||
ysServiceV3.req(ReqMethod.openOnlinePay, param);
|
||||
ysServiceV3.req(ReqMethod.openOnlinePay, param, mcs.getChannel());
|
||||
} catch (Exception e) {
|
||||
log.error("云商服3.0开通线上D0接口报错: {}", e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public void collectSubMerId(Notify.Report report) {
|
||||
public void collectSubMerId(Notify.Report report, Integer channel) {
|
||||
List<Notify.ThirdMerc> thridMercList = report.getThridMercList();
|
||||
|
||||
if (thridMercList == null || thridMercList.isEmpty()) {
|
||||
|
|
@ -863,7 +843,7 @@ public class YSAuditServiceV3 implements cn.pluss.platform.channel.ys.YSAuditSer
|
|||
String reportChannel = item.getReportChannel();
|
||||
|
||||
SubMerchant subMerchant = new SubMerchant();
|
||||
subMerchant.setChannelTypeId("4");
|
||||
subMerchant.setChannelTypeId(String.valueOf(channel));
|
||||
|
||||
String flagName = "";
|
||||
String typeName = "";
|
||||
|
|
@ -916,12 +896,12 @@ public class YSAuditServiceV3 implements cn.pluss.platform.channel.ys.YSAuditSer
|
|||
}
|
||||
}
|
||||
@Override
|
||||
public void report(MerchantChannelStatus mcs) {
|
||||
public void report(MerchantChannelStatus mcs, Integer channel) {
|
||||
if (mcs == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (mcs.getChannel() != 4) {
|
||||
if (!mcs.getChannel().equals(channel)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -964,7 +944,7 @@ public class YSAuditServiceV3 implements cn.pluss.platform.channel.ys.YSAuditSer
|
|||
param.put(YsConstant.MERC_ID, merchantId);
|
||||
param.put("reportChannel", "NUCC_WECHAT");
|
||||
|
||||
RespEntity req = ysServiceV3.req(ReqMethod.sweepReport, param);
|
||||
RespEntity req = ysServiceV3.req(ReqMethod.sweepReport, param, Integer.valueOf(merchantId));
|
||||
if (!Objects.equals(req.getSubCode(), YsConfigV3.BIZ_SUCCESS)) {
|
||||
throw new MsgException("微信网联报备异常," + req.getSubMsg());
|
||||
}
|
||||
|
|
@ -979,7 +959,7 @@ public class YSAuditServiceV3 implements cn.pluss.platform.channel.ys.YSAuditSer
|
|||
param.put(YsConstant.MERC_ID, merchantId);
|
||||
param.put("reportChannel", "CUPS_WECHAT");
|
||||
|
||||
RespEntity req = ysServiceV3.req(ReqMethod.sweepReport, param);
|
||||
RespEntity req = ysServiceV3.req(ReqMethod.sweepReport, param, Integer.valueOf(merchantId));
|
||||
if (!Objects.equals(req.getSubCode(), YsConfigV3.BIZ_SUCCESS)) {
|
||||
throw new MsgException("微信银联报备异常," + req.getSubMsg());
|
||||
}
|
||||
|
|
@ -994,7 +974,7 @@ public class YSAuditServiceV3 implements cn.pluss.platform.channel.ys.YSAuditSer
|
|||
param.put(YsConstant.MERC_ID, merchantId);
|
||||
param.put("reportChannel", "NUCC_ALIPAY");
|
||||
|
||||
RespEntity req = ysServiceV3.req(ReqMethod.sweepReport, param);
|
||||
RespEntity req = ysServiceV3.req(ReqMethod.sweepReport, param, Integer.valueOf(merchantId));
|
||||
if (!Objects.equals(req.getSubCode(), YsConfigV3.BIZ_SUCCESS)) {
|
||||
throw new MsgException("支付宝网联报备异常," + req.getSubMsg());
|
||||
}
|
||||
|
|
@ -1009,18 +989,18 @@ public class YSAuditServiceV3 implements cn.pluss.platform.channel.ys.YSAuditSer
|
|||
param.put(YsConstant.MERC_ID, merchantId);
|
||||
param.put("reportChannel", "CUPS_ALIPAY");
|
||||
|
||||
RespEntity req = ysServiceV3.req(ReqMethod.sweepReport, param);
|
||||
RespEntity req = ysServiceV3.req(ReqMethod.sweepReport, param, Integer.valueOf(merchantId));
|
||||
if (!Objects.equals(req.getSubCode(), YsConfigV3.BIZ_SUCCESS)) {
|
||||
throw new MsgException("支付宝银联报备异常," + req.getSubMsg());
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void reportAgain(MerchantChannelStatus mcs){
|
||||
public void reportAgain(MerchantChannelStatus mcs, Integer channel){
|
||||
if (mcs == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (mcs.getChannel() != 4) {
|
||||
if (!mcs.getChannel().equals(channel)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1064,7 +1044,7 @@ public class YSAuditServiceV3 implements cn.pluss.platform.channel.ys.YSAuditSer
|
|||
param.put(YsConstant.MERC_ID, merchantId);
|
||||
param.put("reportChannel", "NUCC_WECHAT");
|
||||
|
||||
RespEntity req = ysServiceV3.req(ReqMethod.reportAgain, param);
|
||||
RespEntity req = ysServiceV3.req(ReqMethod.reportAgain, param, Integer.valueOf(merchantId));
|
||||
if (!Objects.equals(req.getSubCode(), YsConfigV3.BIZ_SUCCESS)) {
|
||||
throw new MsgException("微信网联报备异常," + req.getSubMsg());
|
||||
}
|
||||
|
|
@ -1140,7 +1120,7 @@ public class YSAuditServiceV3 implements cn.pluss.platform.channel.ys.YSAuditSer
|
|||
param.put(YsConstant.MERC_ID, merchantId);
|
||||
param.put("reportChannel", "CUPS_WECHAT");
|
||||
|
||||
RespEntity req = ysServiceV3.req(ReqMethod.reportAgain, param);
|
||||
RespEntity req = ysServiceV3.req(ReqMethod.reportAgain, param, Integer.valueOf(merchantId));
|
||||
if (!Objects.equals(req.getSubCode(), YsConfigV3.BIZ_SUCCESS)) {
|
||||
throw new MsgException("微信银联报备异常," + req.getSubMsg());
|
||||
}
|
||||
|
|
@ -1155,7 +1135,7 @@ public class YSAuditServiceV3 implements cn.pluss.platform.channel.ys.YSAuditSer
|
|||
param.put(YsConstant.MERC_ID, merchantId);
|
||||
param.put("reportChannel", "NUCC_ALIPAY");
|
||||
|
||||
RespEntity req = ysServiceV3.req(ReqMethod.reportAgain, param);
|
||||
RespEntity req = ysServiceV3.req(ReqMethod.reportAgain, param, Integer.valueOf(merchantId));
|
||||
if (!Objects.equals(req.getSubCode(), YsConfigV3.BIZ_SUCCESS)) {
|
||||
throw new MsgException("支付宝网联报备异常," + req.getSubMsg());
|
||||
}
|
||||
|
|
@ -1170,7 +1150,7 @@ public class YSAuditServiceV3 implements cn.pluss.platform.channel.ys.YSAuditSer
|
|||
param.put(YsConstant.MERC_ID, merchantId);
|
||||
param.put("reportChannel", "CUPS_ALIPAY");
|
||||
|
||||
RespEntity req = ysServiceV3.req(ReqMethod.reportAgain, param);
|
||||
RespEntity req = ysServiceV3.req(ReqMethod.reportAgain, param,Integer.valueOf(merchantId));
|
||||
if (!Objects.equals(req.getSubCode(), YsConfigV3.BIZ_SUCCESS)) {
|
||||
throw new MsgException("支付宝银联报备异常," + req.getSubMsg());
|
||||
}
|
||||
|
|
@ -1183,7 +1163,7 @@ public class YSAuditServiceV3 implements cn.pluss.platform.channel.ys.YSAuditSer
|
|||
|
||||
String signId = mcs.getExtra().getString("signId");
|
||||
if (StringUtils.isEmpty(signId)) {
|
||||
sign(mcs);
|
||||
sign(mcs,mcs.getChannel());
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1191,7 +1171,7 @@ public class YSAuditServiceV3 implements cn.pluss.platform.channel.ys.YSAuditSer
|
|||
reqParam.put("signId", signId);
|
||||
reqParam.put("isSendConMsg", "1");
|
||||
|
||||
RespEntity respEntity = ysServiceV3.req(ReqMethod.sendSmsOrEmailMsg, reqParam);
|
||||
RespEntity respEntity = ysServiceV3.req(ReqMethod.sendSmsOrEmailMsg, reqParam,mcs.getChannel());
|
||||
if (!Objects.equals(respEntity.getSubCode(), YsConfigV3.BIZ_SUCCESS)) {
|
||||
throw new MsgException("银盛云商服3.0商户签约短信请求失败, " + respEntity.getSubMsg());
|
||||
}
|
||||
|
|
@ -1218,7 +1198,7 @@ public class YSAuditServiceV3 implements cn.pluss.platform.channel.ys.YSAuditSer
|
|||
* 变更结算卡
|
||||
* 一般不支持非法人结算卡变更
|
||||
*/
|
||||
public void editAccountInfo(BankCardDTO bankCardDTO) {
|
||||
public void editAccountInfo(BankCardDTO bankCardDTO, Integer channel) {
|
||||
// MercChangeRecord entity = mcrService.get(userId, 4, MercChangeRecord.Type.ACCOUNT, MercChangeRecord.Status.EDIT);
|
||||
// if (entity == null) {
|
||||
// throw new MsgException("没有需要变更的信息");
|
||||
|
|
@ -1229,10 +1209,9 @@ public class YSAuditServiceV3 implements cn.pluss.platform.channel.ys.YSAuditSer
|
|||
|
||||
MerchantBaseInfo mbi = mbiService.getMerchantBaseInfoByUserId(bankCardDTO.getUserId());
|
||||
|
||||
MerchantChannelStatus mcs = mcsService.getByMerchantCode(mbi.getMerchantCode(), 4);
|
||||
MerchantChannelStatus mcs = mcsService.getByMerchantCode(mbi.getMerchantCode(), channel);
|
||||
|
||||
RegionCodeYs ysRegionCode = regionReflectService.getYsRegionCode(bankCardDTO);
|
||||
|
||||
// JSONObject ext = entity.getExt();
|
||||
// String settleType;
|
||||
// if (ext == null) {
|
||||
|
|
@ -1245,11 +1224,19 @@ public class YSAuditServiceV3 implements cn.pluss.platform.channel.ys.YSAuditSer
|
|||
// AccountDTO accountDTO = accountService.getRealAccount(userId, AccountDTO.CHANNEL_TYPE_D0);
|
||||
// idCard = accountDTO.getIdcard();
|
||||
// }
|
||||
Account account = new Account().setUserId(bankCardDTO.getUserId()).setChannelType(Account.CHANNEL_TYPE_D0);
|
||||
account = accountService.getOne(new QueryWrapper<>(account));
|
||||
IdCard accountIdCard = idCardService.getAccountIdCard(bankCardDTO.getUserId(), Account.CHANNEL_TYPE_D0);
|
||||
JSONObject bak = account.getBak();
|
||||
|
||||
Account account = new Account();
|
||||
IdCard accountIdCard;
|
||||
if (4 == channel) {
|
||||
account.setUserId(bankCardDTO.getUserId()).setChannelType(Account.CHANNEL_TYPE_D0);
|
||||
account = accountService.getOne(new QueryWrapper<>(account));
|
||||
accountIdCard = idCardService.getAccountIdCard(bankCardDTO.getUserId(), Account.CHANNEL_TYPE_D0);
|
||||
JSONObject bak = account.getBak();
|
||||
}else {
|
||||
account.setUserId(bankCardDTO.getUserId()).setChannelType(Account.CHANNEL_TYPE_D1);
|
||||
account = accountService.getOne(new QueryWrapper<>(account));
|
||||
accountIdCard = idCardService.getAccountIdCard(bankCardDTO.getUserId(), Account.CHANNEL_TYPE_D1);
|
||||
JSONObject bak = account.getBak();
|
||||
}
|
||||
|
||||
JSONObject param = new JSONObject();
|
||||
param.put(YsConstantV3.NOTIFY_URL, YsConfigV3.AUDIT_NOTIFY_URL);
|
||||
|
|
@ -1270,7 +1257,7 @@ public class YSAuditServiceV3 implements cn.pluss.platform.channel.ys.YSAuditSer
|
|||
|
||||
// String applyImg = entity.getChangeForm();
|
||||
|
||||
RespEntity req = ysServiceV3.req(ReqMethod.changeMercStlAccInfo, param);
|
||||
RespEntity req = ysServiceV3.req(ReqMethod.changeMercStlAccInfo, param, channel);
|
||||
if (!YsConfigV3.BIZ_SUCCESS.equals(req.getSubCode())) {
|
||||
throw new MsgException(req.getSubMsg());
|
||||
}
|
||||
|
|
@ -1702,7 +1689,7 @@ public class YSAuditServiceV3 implements cn.pluss.platform.channel.ys.YSAuditSer
|
|||
* 查询进件结果
|
||||
* @param mcs
|
||||
*/
|
||||
public void auditResult(MerchantChannelStatus mcs) {
|
||||
public void auditResult(MerchantChannelStatus mcs,Integer channel) {
|
||||
if (mcs == null) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -1717,29 +1704,29 @@ public class YSAuditServiceV3 implements cn.pluss.platform.channel.ys.YSAuditSer
|
|||
return;
|
||||
}
|
||||
|
||||
RespEntity respEntity = ysServiceV3.req(ReqMethod.queryCustApply, new JSONObject().fluentPut("sysFlowId", sysFlowId));
|
||||
RespEntity respEntity = ysServiceV3.req(ReqMethod.queryCustApply, new JSONObject().fluentPut("sysFlowId", sysFlowId),channel);
|
||||
if (!Objects.equals(respEntity.getSubCode(), YsConfigV3.BIZ_SUCCESS)) {
|
||||
throw new MsgException("银盛云商服3.0商户信息状态确认失败: {}", respEntity.getSubMsg());
|
||||
}
|
||||
|
||||
Notify.Cust cust = JSON.parseObject(respEntity.getBusinessData(), Notify.Cust.class);
|
||||
auditResultHandle(cust);
|
||||
auditResultHandle(cust,channel);
|
||||
}
|
||||
|
||||
public void result(String sysFlowId){
|
||||
RespEntity respEntity = ysServiceV3.req(ReqMethod.queryCustApply, new JSONObject().fluentPut("sysFlowId", sysFlowId));
|
||||
if (!Objects.equals(respEntity.getSubCode(), YsConfigV3.BIZ_SUCCESS)) {
|
||||
throw new MsgException("银盛云商服3.0商户信息状态确认失败: {}", respEntity.getSubMsg());
|
||||
}
|
||||
}
|
||||
// public void result(String sysFlowId){
|
||||
// RespEntity respEntity = ysServiceV3.req(ReqMethod.queryCustApply, new JSONObject().fluentPut("sysFlowId", sysFlowId));
|
||||
// if (!Objects.equals(respEntity.getSubCode(), YsConfigV3.BIZ_SUCCESS)) {
|
||||
// throw new MsgException("银盛云商服3.0商户信息状态确认失败: {}", respEntity.getSubMsg());
|
||||
// }
|
||||
// }
|
||||
|
||||
/**
|
||||
* 查询签约结果,该操作作为商户最终状态的判断
|
||||
* @param userId 用户id
|
||||
*/
|
||||
public void signResult(String userId) {
|
||||
public void signResult(String userId, Integer channel) {
|
||||
MerchantBaseInfo mbi = mbiService.getMerchantBaseInfoByUserId(userId);
|
||||
MerchantChannelStatus mcs = mcsService.getByMerchantCode(mbi.getMerchantCode(), 4);
|
||||
MerchantChannelStatus mcs = mcsService.getByMerchantCode(mbi.getMerchantCode(), channel);
|
||||
if (mcs == null) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -1756,12 +1743,12 @@ public class YSAuditServiceV3 implements cn.pluss.platform.channel.ys.YSAuditSer
|
|||
JSONObject reqParam = new JSONObject();
|
||||
reqParam.put("authId", authId);
|
||||
|
||||
RespEntity respEntity = ysServiceV3.req(ReqMethod.queryAuthInfo, reqParam);
|
||||
RespEntity respEntity = ysServiceV3.req(ReqMethod.queryAuthInfo, reqParam,channel);
|
||||
if (!Objects.equals(respEntity.getSubCode(), YsConfigV3.BIZ_SUCCESS)) {
|
||||
throw new MsgException("银盛云商服3.0商户签约状态请求失败, {}", respEntity.getSubMsg());
|
||||
}
|
||||
|
||||
signResultHandle(JSON.parseObject(respEntity.getBusinessData(), Notify.Auth.class));
|
||||
signResultHandle(JSON.parseObject(respEntity.getBusinessData(), Notify.Auth.class),channel);
|
||||
}
|
||||
/**
|
||||
* 查询商户变更结果
|
||||
|
|
|
|||
|
|
@ -99,9 +99,12 @@ public interface DeviceStockService extends IService<DeviceStock> {
|
|||
* @param dto
|
||||
*/
|
||||
void bindDevcieV2(DeviceStockDTO dto);
|
||||
void bindTableCode(DeviceStockDTO dto);
|
||||
|
||||
DeviceStock checkBind(String sn);
|
||||
DeviceStock checkSN(String sn);
|
||||
|
||||
DeviceStock getDeviceBySnNo(String sn);
|
||||
|
||||
void checkDevice(String sn);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ import cn.pluss.platform.mapper.DeviceTypeMapper;
|
|||
import cn.pluss.platform.merchant.MerchantCashPayCodeService;
|
||||
import cn.pluss.platform.merchant.MerchantBaseInfoService;
|
||||
import cn.pluss.platform.merchantDevice.MerchantDeviceService;
|
||||
import cn.pluss.platform.merchantStore.MerchantStoreService;
|
||||
import cn.pluss.platform.userApp.UserAppService;
|
||||
import cn.pluss.platform.util.DateUtils;
|
||||
import cn.pluss.platform.util.StringUtil;
|
||||
|
|
@ -89,6 +90,8 @@ public class DeviceStockServiceImpl extends ServiceImpl<DeviceStockMapper, Devic
|
|||
|
||||
@Resource
|
||||
private MercOrderNewService mercOrderNewService;
|
||||
@Resource
|
||||
private MerchantStoreService merchantStoreService;
|
||||
|
||||
|
||||
@Override
|
||||
|
|
@ -390,6 +393,41 @@ public class DeviceStockServiceImpl extends ServiceImpl<DeviceStockMapper, Devic
|
|||
DeviceOperateInfo operateInfo = new DeviceOperateInfo(userApp, DeviceOperateType.BIND.getCode(), stock.getSnNo(), null);
|
||||
deviceOperateInfoService.save(operateInfo);
|
||||
}
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public void bindTableCode(DeviceStockDTO dto){
|
||||
MerchantStore merchantStore = new MerchantStore();
|
||||
merchantStore.setId(Integer.valueOf(dto.getActMercId()));
|
||||
MerchantStore store = merchantStoreService.queryMerchantStore(merchantStore);
|
||||
//认证
|
||||
MsgException.check(store==null,"未找到商户");
|
||||
MerchantBaseInfo merchant = merchantBaseInfoService.getMerchantBaseInfoByMerchantCode(store.getMerchantCode());
|
||||
//认证是否为商户
|
||||
MsgException.checkNull(merchant, "当前商户还未认证成商户,暂时无法进行绑定操作");
|
||||
DeviceStock stock = new DeviceStock();
|
||||
stock.setActMercName(merchant.getAlias());
|
||||
stock.setActMercId(String.valueOf(merchant.getId()));
|
||||
stock.setStatus("3");
|
||||
stock.setBindTime(DateUtils.currentDate());
|
||||
UpdateWrapper<DeviceStock> deviceStockUpdateWrapper = new UpdateWrapper<>();
|
||||
deviceStockUpdateWrapper.eq("snNo", dto.getQrNo());
|
||||
update(stock,deviceStockUpdateWrapper);
|
||||
//绑定商户
|
||||
UserApp userApp = new UserApp();
|
||||
userApp.setUserId(Long.valueOf(merchant.getUserId()));
|
||||
DeviceOperateInfo operateInfo = new DeviceOperateInfo(userApp, DeviceOperateType.BIND.getCode(), dto.getQrNo(), null);
|
||||
deviceOperateInfoService.save(operateInfo);
|
||||
}
|
||||
@Override
|
||||
public void checkDevice(String sn){
|
||||
MsgException.checkBlank(sn, "缺失设备SN号");
|
||||
DeviceStock deviceBySnNo = baseMapper.getDeviceBySnNo(sn);
|
||||
if (deviceBySnNo == null){
|
||||
throw new MsgException("未找到对应的二维码");
|
||||
}else if (Objects.equals(deviceBySnNo.getStatus(), "3")){
|
||||
throw new MsgException("该设备已被绑定,请勿重复绑定!");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public DeviceStock checkBind(String sn) {
|
||||
|
|
|
|||
|
|
@ -15,10 +15,7 @@ import cn.pluss.platform.dto.*;
|
|||
import cn.pluss.platform.entity.*;
|
||||
import cn.pluss.platform.enums.UserRoleEnum;
|
||||
import cn.pluss.platform.exception.MsgException;
|
||||
import cn.pluss.platform.mapper.ActivityEnrollMapper;
|
||||
import cn.pluss.platform.mapper.MerchantBaseInfoMapper;
|
||||
import cn.pluss.platform.mapper.MerchantMarketMapper;
|
||||
import cn.pluss.platform.mapper.MerchantOrderMapper;
|
||||
import cn.pluss.platform.mapper.*;
|
||||
import cn.pluss.platform.merchant.AccountService;
|
||||
import cn.pluss.platform.merchant.MerchantBaseInfoService;
|
||||
import cn.pluss.platform.merchantChannelStatus.MerchantChannelStatusService;
|
||||
|
|
@ -28,8 +25,10 @@ import cn.pluss.platform.merchantStore.MerchantStoreService;
|
|||
import cn.pluss.platform.region.RegionReflectService;
|
||||
import cn.pluss.platform.roleUserInfo.RoleUserInfoService;
|
||||
import cn.pluss.platform.systemConfig.SystemConfigService;
|
||||
import cn.pluss.platform.task.SxfMerAuditHandler;
|
||||
import cn.pluss.platform.userApp.UserAppService;
|
||||
import cn.pluss.platform.userInfo.UserInfoService;
|
||||
import cn.pluss.platform.util.IpUtils;
|
||||
import cn.pluss.platform.util.MD5Util;
|
||||
import cn.pluss.platform.util.RegexUtils;
|
||||
import cn.pluss.platform.util.StringUtil;
|
||||
|
|
@ -49,10 +48,14 @@ import org.springframework.context.annotation.Lazy;
|
|||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.net.URLEncoder;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
|
|
@ -119,7 +122,11 @@ public class MerchantBaseInfoServiceImpl extends ServiceImpl<MerchantBaseInfoMap
|
|||
|
||||
@Autowired
|
||||
private DictService dictService;
|
||||
@Resource
|
||||
private MerchantStoreMapper merchantStoreMapper;
|
||||
|
||||
@Resource
|
||||
private MerchantImageMapper merchantImageMapper;
|
||||
@Override
|
||||
public MerchantBaseInfoVO apiGetMchDetail(String userId) {
|
||||
// 先判断是不是直推或间推
|
||||
|
|
@ -337,10 +344,44 @@ public class MerchantBaseInfoServiceImpl extends ServiceImpl<MerchantBaseInfoMap
|
|||
merchantStore.setStatus("1");
|
||||
merchantStore.setCreateDt(new Date());
|
||||
merchantStoreService.saveMerchantStore(merchantStore);
|
||||
|
||||
} else {
|
||||
merchantStore.setStoreName(mbi.getAlias());
|
||||
merchantStore.setMerchantName(mbi.getAlias());
|
||||
merchantStoreService.updateMerchantStore(merchantStore);
|
||||
|
||||
MerchantChannelStatus merchantChannelStatus = new MerchantChannelStatus();
|
||||
merchantStore = merchantStoreMapper.selectOne(new QueryWrapper<>(merchantStore));
|
||||
MerchantBaseInfo merchantBaseInfo = getMerchantBaseInfoByMerchantCode(merchantChannelStatus.getMerchantCode());
|
||||
QueryWrapper<MerchantImage> queryWrapper = new QueryWrapper<MerchantImage>()
|
||||
.eq("merchantCode", merchantChannelStatus.getMerchantCode()).eq("photoType", "06");
|
||||
MerchantImage merchantImage = merchantImageMapper.selectOne(queryWrapper);
|
||||
//String baseUrl = "https://life.sxczgkj.cn/web/wmerchant.php?c=site&a=entry&ctrl=store&ac=oauth&op=add_merchan&do=web&m=we7_wmall&i=1";
|
||||
String baseUrl = "https://kysh.sxczgkj.cn/javaApi/java-api/add-store";
|
||||
StringBuilder sb = new StringBuilder(baseUrl);
|
||||
sb.append("?title=").append(mbi.getAlias());
|
||||
sb.append("&syb_m_id=").append(merchantStore.getId());
|
||||
sb.append("&addressNo=").append(merchantBaseInfo.getAddressNo());
|
||||
String address = merchantBaseInfo.getProvince() + merchantBaseInfo.getCity() + merchantBaseInfo.getDistrict() + merchantBaseInfo.getAddress();
|
||||
String area = merchantBaseInfo.getProvince() +"-"+ merchantBaseInfo.getCity() +"-"+ merchantBaseInfo.getDistrict();
|
||||
try {
|
||||
String decodeAddress = URLEncoder.encode(address, "UTF-8");
|
||||
sb.append("&address=").append(decodeAddress);
|
||||
String decodeArea = URLEncoder.encode(area, "UTF-8");
|
||||
sb.append("&area=").append(decodeArea);
|
||||
String logo = URLEncoder.encode(merchantImage.getPicUrl(), "GBK");
|
||||
sb.append("&logo=").append(logo);
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
Map<String, String> lnxMap = IpUtils.getLocationByAddress(address);
|
||||
if (lnxMap != null) {
|
||||
sb.append("&location_x=").append(lnxMap.get("x"));
|
||||
sb.append("&location_y=").append(lnxMap.get("y"));
|
||||
}
|
||||
// 请求生成店铺j
|
||||
RestTemplate restTemplate = new RestTemplate();
|
||||
String result = restTemplate.getForObject(sb.toString(), String.class);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ public interface MerchantChannelStatusService extends IService<MerchantChannelSt
|
|||
LambdaQueryWrapper<MerchantChannelStatus> qWrapper = Wrappers.lambdaQuery();
|
||||
qWrapper.eq(MerchantChannelStatus::getVirChannelFlag, channelType);
|
||||
qWrapper.eq(MerchantChannelStatus::getMerchantCode, merchantCode);
|
||||
qWrapper.eq(MerchantChannelStatus::getAuthorizationStatus,1);
|
||||
|
||||
return getOne(qWrapper);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -737,7 +737,8 @@ public class UserAppServiceImpl extends ServiceImpl<UserAppMapper, UserApp> impl
|
|||
|
||||
return result;
|
||||
}
|
||||
@Resource
|
||||
@Autowired
|
||||
@Lazy
|
||||
LaKalaInterfaceImpl laKalaInterface;
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
|
|
@ -802,13 +803,13 @@ public class UserAppServiceImpl extends ServiceImpl<UserAppMapper, UserApp> impl
|
|||
case "4":
|
||||
// 银盛
|
||||
//ysAuditServiceV2.merchantAudit(userId, false);
|
||||
ysAuditServiceV3.merchantAuditV3(userId, false);
|
||||
ysAuditServiceV3.merchantAuditV3(userId, false, 4);
|
||||
break;
|
||||
case "5":
|
||||
laKalaInterface.createTuoKeInfo(userId);
|
||||
break;
|
||||
case "6":
|
||||
ysAuditServiceV3.merchantAuditV3(userId, false);
|
||||
ysAuditServiceV3.merchantAuditV3(userId, false, 6);
|
||||
default:
|
||||
MsgException.throwException("未知的进件通道");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,6 +34,14 @@ public class YsConfigV3 {
|
|||
|
||||
@Value("agentNoV2")
|
||||
private String agentNo;
|
||||
@Value("agentNoD1")
|
||||
private String agentNoD1;
|
||||
@Value("srcMerchantNoD1")
|
||||
private String srcMerchantNoD1;
|
||||
@Value("priKeyV2D1")
|
||||
private String priKeyV2D1;
|
||||
@Value("pubKeyV2D1")
|
||||
private String pubKeyV2D1;
|
||||
|
||||
public static final String INTERFACE_VERSION = "v3";
|
||||
|
||||
|
|
@ -42,6 +50,8 @@ public class YsConfigV3 {
|
|||
public static final String BIZ_SUCCESS = "0000";
|
||||
//银盛进件回调
|
||||
public static final String AUDIT_NOTIFY_URL = "https://ky.sxczgkj.cn/api/auditCallback/ysV3";
|
||||
//银盛进件回调D1
|
||||
public static final String AUDIT_NOTIFY_URL_D1 = "https://ky.sxczgkj.cn/api/auditCallback/ysV3D1";
|
||||
//银盛签约回调
|
||||
public static final String AUDIT_SIGN_NOTIFY_URL = "https://ky.sxczgkj.cn/api/auditCallback/ysSignV3";
|
||||
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ import org.springframework.util.MultiValueMap;
|
|||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.*;
|
||||
|
|
@ -46,6 +47,8 @@ public class YsServiceV3 {
|
|||
private YsConfig ysConfig;
|
||||
@Autowired
|
||||
private RestTemplate restTemplate;
|
||||
@Resource
|
||||
private YsConfigV3 ysConfigV3;
|
||||
/**
|
||||
* 只用于新的进件接口
|
||||
*
|
||||
|
|
@ -53,18 +56,28 @@ public class YsServiceV3 {
|
|||
* @param reqData 请求参数
|
||||
* @return
|
||||
*/
|
||||
public RespEntity req(ReqMethod reqMethod, JSONObject reqData) {
|
||||
public RespEntity req(ReqMethod reqMethod, JSONObject reqData, Integer channel) {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
int i = calendar.get(Calendar.HOUR_OF_DAY);
|
||||
|
||||
if (i < 8 || i >= 21) {
|
||||
throw new MsgException("当前时段暂不支持入网,请于8:00-21:00提交");
|
||||
}
|
||||
|
||||
String key = RandomUtil.randomString(RandomUtil.BASE_NUMBER + "ABCDEF",16);
|
||||
try {
|
||||
ReqEntity request = ReqEntity.get(reqMethod);
|
||||
request.setCertId(ysConfig.getSrcMerchantNo());
|
||||
|
||||
Sign sign = null;
|
||||
if (channel.equals(4)) {
|
||||
request.setCertId(ysConfig.getSrcMerchantNo());
|
||||
RSA rsa = SecureUtil.rsa(ysConfig.getPriKey(), ysConfig.getOldPubKey());
|
||||
request.setCheck(rsa.encryptBase64(key, KeyType.PublicKey));
|
||||
sign = SecureUtil.sign(SignAlgorithm.SHA256withRSA, ysConfig.getPriKey(), ysConfig.getOldPubKey());
|
||||
}else {
|
||||
request.setCertId(ysConfigV3.getSrcMerchantNoD1());
|
||||
RSA rsa = SecureUtil.rsa(ysConfigV3.getPriKeyV2D1(), ysConfigV3.getPubKeyV2D1());
|
||||
request.setCheck(rsa.encryptBase64(key, KeyType.PublicKey));
|
||||
sign = SecureUtil.sign(SignAlgorithm.SHA256withRSA, ysConfigV3.getPriKeyV2D1(), ysConfigV3.getPubKeyV2D1());
|
||||
}
|
||||
request.setBizContent(reqData.toJSONString());
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
headers.setContentType(MediaType.APPLICATION_JSON_UTF8);
|
||||
|
|
@ -72,17 +85,14 @@ public class YsServiceV3 {
|
|||
"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36");
|
||||
|
||||
log.info("业务参数==============>" + JSONObject.toJSONString(reqData));
|
||||
String key = RandomUtil.randomString(RandomUtil.BASE_NUMBER + "ABCDEF",16);
|
||||
|
||||
log.info("key = " + key);
|
||||
AES aes = new AES(key.getBytes(StandardCharsets.UTF_8));
|
||||
String s = aes.encryptBase64(request.getBizContent());
|
||||
request.setBizContent(s);
|
||||
|
||||
RSA rsa = SecureUtil.rsa(ysConfig.getPriKey(), ysConfig.getOldPubKey());
|
||||
request.setCheck(rsa.encryptBase64(key, KeyType.PublicKey));
|
||||
|
||||
String encryptOriginData = SignUtils.getSignContent((JSONObject) JSON.toJSON(request));
|
||||
Sign sign = SecureUtil.sign(SignAlgorithm.SHA256withRSA, ysConfig.getPriKey(), ysConfig.getOldPubKey());
|
||||
|
||||
log.info("加签源数据==============>" + encryptOriginData);
|
||||
request.setSign(Base64.encode(sign.sign(encryptOriginData)));
|
||||
log.warn("请求报文==============>" + JSONObject.toJSONString(request));
|
||||
|
|
|
|||
|
|
@ -0,0 +1,21 @@
|
|||
package cn.pluss.platform.ys.impl.v20220527.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author lyf
|
||||
*/
|
||||
@Data
|
||||
public class RateInfoD1 {
|
||||
private String busOpenType;
|
||||
|
||||
private String contractType;
|
||||
|
||||
private String isSendConMsg;
|
||||
|
||||
private String notifyUrl;
|
||||
|
||||
private RateFeeInfo codeScanT1Fee;
|
||||
|
||||
private String custId;
|
||||
}
|
||||
Loading…
Reference in New Issue