银盛修复部分代码

This commit is contained in:
lyf
2023-04-01 17:31:52 +08:00
parent a3e96fa81a
commit 39eb6237f8
7 changed files with 118 additions and 35 deletions

View File

@@ -5,6 +5,7 @@ import cn.pluss.platform.api.ResultGenerator;
import cn.pluss.platform.entity.MerchantCashPayCode; import cn.pluss.platform.entity.MerchantCashPayCode;
import cn.pluss.platform.entity.MerchantCashPlace; import cn.pluss.platform.entity.MerchantCashPlace;
import cn.pluss.platform.entity.MerchantCashPlaceStaff; import cn.pluss.platform.entity.MerchantCashPlaceStaff;
import cn.pluss.platform.exception.MsgException;
import cn.pluss.platform.merchant.MerchantCashPlaceService; import cn.pluss.platform.merchant.MerchantCashPlaceService;
import cn.pluss.platform.merchant.MerchantCashPlaceStaffService; import cn.pluss.platform.merchant.MerchantCashPlaceStaffService;
import cn.pluss.platform.vo.MerchantCashPlaceStaffVO; import cn.pluss.platform.vo.MerchantCashPlaceStaffVO;
@@ -33,6 +34,9 @@ public class MerchantCashPlaceController {
@PostMapping @PostMapping
public Result<Object> add(@RequestBody MerchantCashPlace merchantCashPlace) { public Result<Object> add(@RequestBody MerchantCashPlace merchantCashPlace) {
//判定字符位数
size(merchantCashPlace.getAddress());
size(merchantCashPlace.getName());
cashPlaceService.saveOrUpdate(merchantCashPlace); cashPlaceService.saveOrUpdate(merchantCashPlace);
return ResultGenerator.genSuccessResult("保存成功", merchantCashPlace); return ResultGenerator.genSuccessResult("保存成功", merchantCashPlace);
} }
@@ -101,4 +105,9 @@ public class MerchantCashPlaceController {
Page<MerchantCashPlaceStaffVO> pageData = cashPlaceStaffService.getRecord(page, condition, orderItem); Page<MerchantCashPlaceStaffVO> pageData = cashPlaceStaffService.getRecord(page, condition, orderItem);
return ResultGenerator.genSuccessResult(pageData); return ResultGenerator.genSuccessResult(pageData);
} }
private void size(String character){
if (character.length() >= 50){
throw new MsgException("输入内容过长");
}
}
} }

View File

@@ -58,9 +58,11 @@ public class TokenUtil {
} }
public static void main(String[] args) { public static void main(String[] args) {
System.out.println(System.currentTimeMillis()); String s = String.valueOf(System.currentTimeMillis());
System.out.println(UUID.randomUUID().toString()); System.out.println(s);
Map<String, String> token = getToken("1679974421445", "704b7ccf-216b-4c8b-9bba-b1b131e88858"); String s1 = UUID.randomUUID().toString();
System.out.println(s1);
Map<String, String> token = getToken(s, s1);
System.out.println(token); System.out.println(token);
} }

View File

@@ -7,6 +7,7 @@ import cn.pluss.platform.api.Result;
import cn.pluss.platform.api.ResultGenerator; import cn.pluss.platform.api.ResultGenerator;
import cn.pluss.platform.channel.BaseMerchantAuditService; import cn.pluss.platform.channel.BaseMerchantAuditService;
import cn.pluss.platform.channel.MerchantAuditService; import cn.pluss.platform.channel.MerchantAuditService;
import cn.pluss.platform.channel.ys.YSAuditServiceV3;
import cn.pluss.platform.common.CommonRemarkService; import cn.pluss.platform.common.CommonRemarkService;
import cn.pluss.platform.common.RiskBlacklistService; import cn.pluss.platform.common.RiskBlacklistService;
import cn.pluss.platform.converter.Converter; import cn.pluss.platform.converter.Converter;
@@ -172,6 +173,8 @@ public class UserAppServiceImpl extends ServiceImpl<UserAppMapper, UserApp> impl
@Autowired @Autowired
private UserRoleMapper userRoleMapper; private UserRoleMapper userRoleMapper;
@Autowired
private YSAuditServiceV3 ysAuditServiceV3;
@Override @Override
@@ -794,7 +797,8 @@ public class UserAppServiceImpl extends ServiceImpl<UserAppMapper, UserApp> impl
break; break;
case "4": case "4":
// 银盛 // 银盛
ysAuditServiceV2.merchantAudit(userId, false); //ysAuditServiceV2.merchantAudit(userId, false);
ysAuditServiceV3.merchantAuditV3(userId, false);
break; break;
default: default:
MsgException.throwException("未知的进件通道"); MsgException.throwException("未知的进件通道");

View File

@@ -41,7 +41,7 @@ public class YsConfigV3 {
public static final String BIZ_SUCCESS = "0000"; public static final String BIZ_SUCCESS = "0000";
public static final String AUDIT_NOTIFY_URL = "https://www.shouyinbei.net/api/auditCallback/ysV3"; public static final String AUDIT_NOTIFY_URL = "https://ky.sxczgkj.cn/api/auditCallback/ysV3";
public static final String AUDIT_SIGN_NOTIFY_URL = "https://www.shouyinbei.net/api/auditCallback/ysSignV3"; public static final String AUDIT_SIGN_NOTIFY_URL = "https://www.shouyinbei.net/api/auditCallback/ysSignV3";

View File

@@ -12,6 +12,9 @@ import java.util.List;
@Getter @Getter
@Setter @Setter
public class CrpInfo { public class CrpInfo {
/**
* 法人证件号
*/
private String crpCertNo; private String crpCertNo;
/** /**
@@ -33,11 +36,17 @@ public class CrpInfo {
* 法人国籍,法人国籍(默认中国(249)) * 法人国籍,法人国籍(默认中国(249))
*/ */
private String crpNati; private String crpNati;
/**
* 法人姓名
*/
private String crpNm; private String crpNm;
/**
* 法人手机号
*/
private String crpPhone; private String crpPhone;
/**
* crpAddr 法人地址
*/
private String crpAddr; private String crpAddr;
/** /**

View File

@@ -10,15 +10,17 @@ import lombok.Setter;
@Setter @Setter
public class CustInfo { public class CustInfo {
/** /**
* 代理商编号,默认同发起方代理商编号 * 代理商编号,默认同发起方代理商编号(不是必填)
*/ */
private String agtMercId; private String agtMercId;
/** /**
* 商户名称 * 商户名称(必填)
*/ */
private String mercName; private String mercName;
/**
* 商户简称,默认为商户名称若商户名称长度超过20,商户简称必传
*/
private String mercShortName; private String mercShortName;
/** /**
@@ -40,14 +42,18 @@ public class CustInfo {
* 联系人电话, 默认同法人电话号码 * 联系人电话, 默认同法人电话号码
*/ */
private String contactMan; private String contactMan;
/**
* 客户经理
*/
private String cusMgrNm; private String cusMgrNm;
/** /**
* 是否开通营销,Y开通N不开通,默认不开通 * 是否开通营销,Y开通N不开通,默认不开通
*/ */
private String isOpenMarket; private String isOpenMarket;
/**
* 异步通知地址,银盛通过商户提供的地址下发通知商户可根据异步通知业务参数bizContent中的notifyType确定通知类型具体通知内容、场景以及接口要求详见如下
*/
private String notifyUrl; private String notifyUrl;
private String remark; private String remark;

View File

@@ -7,6 +7,7 @@ import cn.pluss.platform.jft.JftAuditService;
import cn.pluss.platform.jft.JftBankCardService; import cn.pluss.platform.jft.JftBankCardService;
import cn.pluss.platform.jft.JftMercBaseInfoService; import cn.pluss.platform.jft.JftMercBaseInfoService;
import cn.pluss.platform.jft.JftMerchantRateService; import cn.pluss.platform.jft.JftMerchantRateService;
import cn.pluss.platform.mapper.AccountMapper;
import cn.pluss.platform.mapper.BankCodeYsMapper; import cn.pluss.platform.mapper.BankCodeYsMapper;
import cn.pluss.platform.mapper.JftMercPaymentChannelMapper; import cn.pluss.platform.mapper.JftMercPaymentChannelMapper;
import cn.pluss.platform.mcc.MccInfoSortService; import cn.pluss.platform.mcc.MccInfoSortService;
@@ -14,6 +15,7 @@ import cn.pluss.platform.mcc.MccInfoYsService;
import cn.pluss.platform.mcc.MccReflectService; import cn.pluss.platform.mcc.MccReflectService;
import cn.pluss.platform.merchant.AccountService; import cn.pluss.platform.merchant.AccountService;
import cn.pluss.platform.merchant.JftMercPaymentChannelService; import cn.pluss.platform.merchant.JftMercPaymentChannelService;
import cn.pluss.platform.merchant.MerchantBaseInfoService;
import cn.pluss.platform.notice.NoticeService; import cn.pluss.platform.notice.NoticeService;
import cn.pluss.platform.region.RegionReflectService; import cn.pluss.platform.region.RegionReflectService;
import cn.pluss.platform.ryx.RyxConstants; import cn.pluss.platform.ryx.RyxConstants;
@@ -34,6 +36,7 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.core.io.ByteArrayResource; import org.springframework.core.io.ByteArrayResource;
import org.springframework.http.HttpEntity; import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders; import org.springframework.http.HttpHeaders;
@@ -122,6 +125,10 @@ public class YsAuditServiceImpl extends AbstractYsResultService {
@Autowired @Autowired
private TransactionTemplate transactionTemplate; private TransactionTemplate transactionTemplate;
@Autowired @Lazy
private MerchantBaseInfoService mbiService;
@Resource
private AccountMapper accountMapper;
@Override @Override
@@ -169,37 +176,83 @@ public class YsAuditServiceImpl extends AbstractYsResultService {
} }
// public void preCheck(String userId) {
// LambdaQueryWrapper<JftMercPaymentChannel> qWrapper2 = Wrappers.lambdaQuery();
// qWrapper2.eq(JftMercPaymentChannel::getUserId, userId);
//
// final JftMercPaymentChannel one = mpcService.getOne(qWrapper2);
// if (one != null) {
// switch (one.getStatus()) {
// case MerchantChannelStatus.AUDIT_STATUS_SUCCESS:
// throw new MsgException("功能已开通,请勿重复操作");
// case MerchantChannelStatus.AUDIT_STATUS_EXAMINING:
// throw new MsgException("功能开通审核中,请耐心等待审核结果");
// case MerchantChannelStatus.AUDIT_STATUS_REJECT:
// mpcService.removeById(one.getId());
// default:
// break;
// }
// }
//
// final IdCard certIdCard = idCardService.getCertIdCard(userId);
// if (certIdCard == null) {
// throw new MsgException("实名身份证不能空");
// }
//
// UserInfo ui = uiService.getById(userId);
// if (StringUtils.isEmpty(ui.getChannelCode())) {
// // 开放接口注册的用户不受限制
// final Integer count = jpcMapper.selectCountByCertNo(certIdCard.getCertNo());
//
// if (count > 1) {
// throw new MsgException("同一实名信息只能开通一次该功能");
// }
// }
// }
public void preCheck(String userId) { public void preCheck(String userId) {
LambdaQueryWrapper<JftMercPaymentChannel> qWrapper2 = Wrappers.lambdaQuery(); MerchantBaseInfo mbi = mbiService.getMerchantBaseInfoByUserId(userId);
qWrapper2.eq(JftMercPaymentChannel::getUserId, userId); LambdaQueryWrapper<MerchantChannelStatus> qWrapper = Wrappers.lambdaQuery();
qWrapper.eq(MerchantChannelStatus::getMerchantCode, mbi.getMerchantCode());
qWrapper.eq(MerchantChannelStatus::getVirChannelFlag, Account.CHANNEL_TYPE_D1);
MerchantChannelStatus existD1 = mcsService.getOne(qWrapper);
final JftMercPaymentChannel one = mpcService.getOne(qWrapper2); if (existD1 != null && !MerchantChannelStatus.AUDIT_STATUS_SUCCESS.equals(existD1.getStatus()) && !MerchantChannelStatus.AUDIT_STATUS_SIGNED.equals(existD1.getStatus()) && !MerchantChannelStatus.AUDIT_STATUS_WAITING_SIGN.equals(existD1.getStatus())) {
if (one != null) { throw new MsgException("当前D1通道存在未进件完成的的进件数据不允许进件银盛");
switch (one.getStatus()) { }
case MerchantChannelStatus.AUDIT_STATUS_SUCCESS:
throw new MsgException("功能已开通,请勿重复操作"); if ("1".equals(mbi.getMerchantType())) {
case MerchantChannelStatus.AUDIT_STATUS_EXAMINING: int ysCount = accountMapper.selectYSAuditSmallCount(mbi.getUserId());
throw new MsgException("功能开通审核中,请耐心等待审核结果"); if (ysCount >= 2) {
case MerchantChannelStatus.AUDIT_STATUS_REJECT: MsgException.throwException("非营业执照商户同一结算人仅可申请两次实时到账");
mpcService.removeById(one.getId());
default:
break;
} }
} }
final IdCard certIdCard = idCardService.getCertIdCard(userId); qWrapper.clear();
if (certIdCard == null) { qWrapper.eq(MerchantChannelStatus::getMerchantCode, mbi.getMerchantCode());
throw new MsgException("实名身份证不能空"); qWrapper.eq(MerchantChannelStatus::getVirChannelFlag, "D0");
MerchantChannelStatus existD0 = mcsService.getOne(qWrapper);
if (existD0 == null) {
qWrapper.clear();
qWrapper.eq(MerchantChannelStatus::getMerchantCode, mbi.getMerchantCode());
qWrapper.isNull(MerchantChannelStatus::getChannel);
existD0 = mcsService.getOne(qWrapper);
} }
UserInfo ui = uiService.getById(userId); if (existD0 != null) {
if (StringUtils.isEmpty(ui.getChannelCode())) { existD0 = mcsService.getByIdLock(existD0.getId());
// 开放接口注册的用户不受限制
final Integer count = jpcMapper.selectCountByCertNo(certIdCard.getCertNo());
if (count > 1) { if (existD0.getStatus().equals(MerchantChannelStatus.AUDIT_STATUS_REJECT)) {
throw new MsgException("同一实名信息只能开通一次该功能"); return;
} }
if (existD0.getStatus().equals(MerchantChannelStatus.AUDIT_STATUS_EXAMINING) && existD0.getThirdStatus().equals(MerchantChannelStatus.AUDIT_THIRD_STATUS_AUDITING)) {
throw new MsgException("当前商户已经在后台审核中");
}
// 此处先将进件状态锁住
existD0.setChannel(4);
mcsService.saveOrUpdate(existD0);
} }
} }