Commit a7225eca by Java-聂换换

修改支付得bug

parent d9a1fe75
...@@ -108,27 +108,27 @@ public class JuHeZhongPayJFenService { ...@@ -108,27 +108,27 @@ public class JuHeZhongPayJFenService {
// subMchId = B105244442 // subMchId = B105244442
// //
// 聂换换 B105247024 // 聂换换 B105247024
// dto.put("serviceType",1); dto.put("serviceType",1);
// dto.put("subMerchantName","kklsubMerchantName32"); dto.put("subMerchantName","kklsubMerchantName32");
// dto.put("subMerchantType","PERSON"); dto.put("subMerchantType","PERSON");
// dto.put("businessLicense","businessLicense23"); dto.put("businessLicense","businessLicense23");
// dto.put("legalPersonName","聂换换"); dto.put("legalPersonName","聂换换");
// dto.put("legalPersonID","130434199212214429"); dto.put("legalPersonID","130434199212214429");
// dto.put("subMerchantPersonName","聂换换"); dto.put("subMerchantPersonName","聂换换");
// dto.put("subMerchantPersonPhone","13722537737"); dto.put("subMerchantPersonPhone","13722537737");
// dto.put("bankType","TOPRIVATE"); dto.put("bankType","TOPRIVATE");
//
// dto.put("accountName","聂换换"); dto.put("accountName","聂换换");
// dto.put("accountNo","6217000060031684713"); dto.put("accountNo","6217000060031684713");
// dto.put("bankName","中国建设银行"); dto.put("bankName","中国建设银行");
// dto.put("bankProv","天津"); dto.put("bankProv","天津");
// dto.put("bankCity","天津市"); dto.put("bankCity","天津市");
// dto.put("bankBranch","开户地址new"); dto.put("bankBranch","开户地址new");
// dto.put("bankCode","105100000017"); dto.put("bankCode","105100000017");
//
// dto.put("timestamp",System.currentTimeMillis()); dto.put("timestamp",System.currentTimeMillis());
//
// juHeZhongPayJFenService.merchantIn(dto); juHeZhongPayJFenService.merchantIn(dto);
......
...@@ -408,9 +408,13 @@ public class PayApiService { ...@@ -408,9 +408,13 @@ public class PayApiService {
dto.put("accountName",userDetailEntity.getRealName()); dto.put("accountName",userDetailEntity.getRealName());
dto.put("accountNo",cardEntityDebit.getCardNo()); dto.put("accountNo",cardEntityDebit.getCardNo());
dto.put("bankName",cardEntityDebit.getBankName()); dto.put("bankName",cardEntityDebit.getBankName());
dto.put("bankProv",cardEntityDebit.getCity()); dto.put("bankProv","天津市");
dto.put("bankCity",cardEntityDebit.getCity()); dto.put("bankCity","天津市");
dto.put("bankBranch",cardEntityDebit.getCardPlace()); dto.put("bankBranch","天津市职场");
// dto.put("bankProv",cardEntityDebit.getCity());
// dto.put("bankCity",cardEntityDebit.getCity());
// dto.put("bankBranch",cardEntityDebit.getCardPlace());
dto.put("bankCode",cardEntityDebit.getBelongBank()); dto.put("bankCode",cardEntityDebit.getBelongBank());
dto.put("timestamp",System.currentTimeMillis()); dto.put("timestamp",System.currentTimeMillis());
...@@ -605,51 +609,55 @@ public class PayApiService { ...@@ -605,51 +609,55 @@ public class PayApiService {
userSubMchId = userService.getUserSubmchid(userSubMchId); userSubMchId = userService.getUserSubmchid(userSubMchId);
// 如果没有注册 则先注册 // 如果没有注册 则先注册
if(userSubMchId == null){ if(userSubMchId == null){
UserEntity userEntity = userService.getUserInfo(request); throw new MyException("未开卡,请先开卡");
UserDetailEntity userDetailEntity = userService.getUserDetailByCode(request.getSubMerchantCode()); // UserEntity userEntity = userService.getUserInfo(request);
CardEntity cardEntityDebit = userService.getCardInfoByCode(userEntity); // UserDetailEntity userDetailEntity = userService.getUserDetailByCode(request.getSubMerchantCode());
JSONObject dto = new JSONObject(); // CardEntity cardEntityDebit = userService.getCardInfoByCode(userEntity);
// JSONObject dto = new JSONObject();
String orderId = MakeOrderNum.makeOrderNum(); //
// String orderId = MakeOrderNum.makeOrderNum();
dto.put("orderId", MakeOrderNum.makeOrderNum()); //
// dto.put("orderId", MakeOrderNum.makeOrderNum());
dto.put("serviceType",1); //
dto.put("subMerchantName",userDetailEntity.getRealName()+orderId); // dto.put("serviceType",1);
dto.put("subMerchantType","PERSON"); // dto.put("subMerchantName",userDetailEntity.getRealName()+orderId);
dto.put("businessLicense",userDetailEntity.getRealName()+orderId); // dto.put("subMerchantType","PERSON");
dto.put("legalPersonName",userDetailEntity.getRealName()); // dto.put("businessLicense",userDetailEntity.getRealName()+orderId);
dto.put("legalPersonID",userDetailEntity.getIdCard()); // dto.put("legalPersonName",userDetailEntity.getRealName());
dto.put("subMerchantPersonName",userDetailEntity.getRealName()); // dto.put("legalPersonID",userDetailEntity.getIdCard());
dto.put("subMerchantPersonPhone",userEntity.getMobile()); // dto.put("subMerchantPersonName",userDetailEntity.getRealName());
dto.put("bankType","TOPRIVATE"); // dto.put("subMerchantPersonPhone",userEntity.getMobile());
// dto.put("bankType","TOPRIVATE");
dto.put("accountName",userDetailEntity.getRealName()); //
dto.put("accountNo",cardEntityDebit.getCardNo()); // dto.put("accountName",userDetailEntity.getRealName());
dto.put("bankName",cardEntityDebit.getBankName()); // dto.put("accountNo",cardEntityDebit.getCardNo());
dto.put("bankProv",cardEntityDebit.getProvince()); // dto.put("bankName",cardEntityDebit.getBankName());
dto.put("bankCity",cardEntityDebit.getCity()); // dto.put("bankProv",cardEntityDebit.getProvince());
dto.put("bankBranch",cardEntityDebit.getCardPlace()); // dto.put("bankCity",cardEntityDebit.getCity());
dto.put("bankCode",cardEntityDebit.getBelongBank()); // dto.put("bankBranch",cardEntityDebit.getCardPlace());
// dto.put("bankCode",cardEntityDebit.getBelongBank());
dto.put("timestamp",System.currentTimeMillis()); //
// dto.put("timestamp",System.currentTimeMillis());
JSONObject jsonObject = null; //
try { // JSONObject jsonObject = null;
jsonObject = juHeZhongPayJFenService.merchantIn(dto); // try {
} catch (Exception e) { // jsonObject = juHeZhongPayJFenService.merchantIn(dto);
// } catch (Exception e) {
} //
if (!"0000".equals(jsonObject.getString("code"))) { // }
new MyException(jsonObject.getString("msg")); // if (!"0000".equals(jsonObject.getString("code"))) {
} // new MyException(jsonObject.getString("msg"));
String subMchId = jsonObject.getString("subMchId"); // }
userSubMchId = new UserSubMchId(); // String subMchId = jsonObject.getString("subMchId");
userSubMchId.setUserCode(request.getSubMerchantCode()); // userSubMchId = new UserSubMchId();
userSubMchId.setPayChannel(ComCode.PAYCHANNEL_HL2); // userSubMchId.setUserCode(request.getSubMerchantCode());
userSubMchId.setSubmchid(subMchId); // userSubMchId.setPayChannel(ComCode.PAYCHANNEL_HL2);
userService.addUserSubmchid(userSubMchId); // userSubMchId.setSubmchid(subMchId);
// userService.addUserSubmchid(userSubMchId);
} }
// if(){
//
// }
OrderEntity orderEntity = this.getOrder(request.getPayNo()); OrderEntity orderEntity = this.getOrder(request.getPayNo());
PayBackDto payBackDto = new PayBackDto(); PayBackDto payBackDto = new PayBackDto();
......
...@@ -316,28 +316,28 @@ public class UserApiController { ...@@ -316,28 +316,28 @@ public class UserApiController {
Response resp = new Response(); Response resp = new Response();
try { try {
// 判断业务入参是否为空 // 判断业务入参是否为空
if (StringUtils.isBlank(request.getSubMerchantCode()) || StringUtils.isBlank(request.getIdentityCode()) || StringUtils.isBlank(request.getFunction()) || StringUtils.isBlank(request.getCardType()) || StringUtils.isBlank(request.getCardNo()) || StringUtils.isBlank(request.getCardMobile()) || StringUtils.isBlank(request.getBelongBank()) || StringUtils.isBlank(request.getCardBank()) || StringUtils.isBlank(request.getCardPlace())) { if (StringUtils.isBlank(request.getSubMerchantCode()) || StringUtils.isBlank(request.getIdentityCode()) || StringUtils.isBlank(request.getFunction()) || StringUtils.isBlank(request.getCardType()) || StringUtils.isBlank(request.getCardNo()) || StringUtils.isBlank(request.getCardMobile()) || StringUtils.isBlank(request.getBelongBank()) || StringUtils.isBlank(request.getCardBank())) {
resp.setStatus(ComCode.STATUS_CODE_4001); resp.setStatus(ComCode.STATUS_CODE_4001);
resp.setMessage(ComCode.STATUS_CODE_4001_DESC); resp.setMessage(ComCode.STATUS_CODE_4001_DESC);
return resp; return resp;
} }
// 根据手机号 + 使用场景 + 验证码查询 // 根据手机号 + 使用场景 + 验证码查询
request.setMobile(request.getCardMobile()); request.setMobile(request.getCardMobile());
IdentityCodeEntity identityCodeEntity = userService.getIdentifyCode(request); // IdentityCodeEntity identityCodeEntity = userService.getIdentifyCode(request);
// 验证码使用场景 // // 验证码使用场景
if (identityCodeEntity == null // 未查询到 // if (identityCodeEntity == null // 未查询到
|| ("5".equals(request.getFunction()) && !"D".equals(request.getCardType())) // function = 储蓄卡,但cardType = 信用卡 // || ("5".equals(request.getFunction()) && !"D".equals(request.getCardType())) // function = 储蓄卡,但cardType = 信用卡
|| ("6".equals(request.getFunction()) && !"C".equals(request.getCardType()))) { // function = 信用卡,但cardType = 储蓄卡 // || ("6".equals(request.getFunction()) && !"C".equals(request.getCardType()))) { // function = 信用卡,但cardType = 储蓄卡
resp.setStatus(ComCode.STATUS_CODE_4010); // resp.setStatus(ComCode.STATUS_CODE_4010);
resp.setMessage(ComCode.STATUS_CODE_4010_DESC); // resp.setMessage(ComCode.STATUS_CODE_4010_DESC);
return resp; // return resp;
} // }
// 验证码是否过期 // // 验证码是否过期
if (!userService.checkIdentifyCodeExpired(identityCodeEntity)) { // if (!userService.checkIdentifyCodeExpired(identityCodeEntity)) {
resp.setStatus(ComCode.STATUS_CODE_4009); // resp.setStatus(ComCode.STATUS_CODE_4009);
resp.setMessage(ComCode.STATUS_CODE_4009_DESC); // resp.setMessage(ComCode.STATUS_CODE_4009_DESC);
return resp; // return resp;
} // }
userService.addNewCard(request); userService.addNewCard(request);
resp.setStatus(ComCode.STATUS_CODE_2000); resp.setStatus(ComCode.STATUS_CODE_2000);
resp.setMessage(ComCode.STATUS_CODE_2000_DESC); resp.setMessage(ComCode.STATUS_CODE_2000_DESC);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment