Merge branch 'master' of gitee.com:super-shopkeeper/chaozhanggui

This commit is contained in:
zhujunshuai
2023-04-04 11:11:09 +08:00
31 changed files with 253 additions and 80 deletions

View File

@@ -285,12 +285,16 @@ public class AliyunServiceImpl implements AliyunService {
if ("403".equals(verifyBankElementResponse.getBody().getCode())){
throw new MsgException("24小时内重复查询相同信息超过10次已锁定请在12小时后重试。");
}
if ("428".equals(verifyBankElementResponse.getBody().getCode())){
throw new MsgException("请正确输入相关信息");
}
if (!"200".equals(verifyBankElementResponse.getBody().getResultObject().getSubCode())) {
if ("403".equals(verifyBankElementResponse.getBody().getResultObject().getSubCode())) {
throw new MsgException("银行卡认证接口已欠费,请联系平台");
}else if ("201".equals(verifyBankElementResponse.getBody().getResultObject().getSubCode())){
throw new MsgException("用户的身份信息不匹配");
} else {
}else {
throw new MsgException("银行卡认证失败");
}
}

View File

@@ -99,4 +99,6 @@ public interface DeviceStockService extends IService<DeviceStock> {
* @param dto
*/
void bindDevcieV2(DeviceStockDTO dto);
DeviceStock checkBind(String sn);
}

View File

@@ -391,6 +391,14 @@ public class DeviceStockServiceImpl extends ServiceImpl<DeviceStockMapper, Devic
deviceOperateInfoService.save(operateInfo);
}
@Override
public DeviceStock checkBind(String sn) {
MsgException.checkBlank(sn, "缺失设备SN号");
DeviceStock deviceBySnNo = baseMapper.getDeviceBySnNo(sn);
MsgException.checkBlank(deviceBySnNo.getActMercId(),"未绑定扫码pos");
return deviceBySnNo;
}
@Override
public <E extends IPage<DeviceStock>> E page(E page, Wrapper<DeviceStock> queryWrapper) {
DeviceStock deviceStock = queryWrapper.getEntity();

View File

@@ -46,6 +46,12 @@ public interface MerchantBaseInfoService extends IService<MerchantBaseInfo> {
MerchantBaseInfo queryMerchantBaseInfo(MerchantBaseInfo merchantBaseInfo);
/**根据id查找
* @param id
* @return
*/
MerchantBaseInfo getMerchantBaseInfoById(Integer id);
List<MerchantBaseInfo> queryMerchantBaseInfoList(MerchantBaseInfo merchantBaseInfo);
void saveMerchantBaseInfo(MerchantBaseInfo merchantBaseInfo);

View File

@@ -438,6 +438,12 @@ public class MerchantBaseInfoServiceImpl extends ServiceImpl<MerchantBaseInfoMap
return baseMapper.queryMerchantBaseInfo(merchantBaseInfo);
}
@Override
public MerchantBaseInfo getMerchantBaseInfoById(Integer id) {
LambdaQueryWrapper<MerchantBaseInfo> qWrapper = new LambdaQueryWrapper<MerchantBaseInfo>().eq(MerchantBaseInfo::getId, id);
return baseMapper.selectOne(qWrapper);
}
@Override
public List<MerchantBaseInfo> queryMerchantBaseInfoList(MerchantBaseInfo merchantBaseInfo) {
return baseMapper.queryMerchantBaseInfoList(merchantBaseInfo);

View File

@@ -83,7 +83,7 @@ public class MerchantStaffConnServiceImpl extends ServiceImpl<MerchantStaffConnM
if (loginName.contains("@")) {
throw new MsgException("员工账号请不要带@");
}
staffDTO.setLoginName(loginName + "@chaozg");
staffDTO.setLoginName(loginName + "@kuaiyin");
UserInfo existUserInfo = new UserInfo().setLoginName(staffDTO.getLoginName());
existUserInfo = userInfoService.getOne(new QueryWrapper<>(existUserInfo));
if (existUserInfo != null) {

View File

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

View File

@@ -253,7 +253,7 @@ public class YsAuditServiceImpl extends AbstractYsResultService {
param.put(YsConstant.CONTACTS_NAME, account.getIdcard().getCertName());
UserInfo ui = uiService.getById(userId);
param.put(YsConstant.CONTACTS_PHONE, ui.getPhone().substring(0, 11));
param.put(YsConstant.CONTACTS_EMAIL, "18062761507@163.com");
param.put(YsConstant.CONTACTS_EMAIL, "chaozhanggui2023@163.com");
param.put(YsConstant.WECHAT_SIGN_RATE, "0.38");
param.put(YsConstant.WECHAT_SIGN_MIN, "1");
param.put(YsConstant.ALIPAY_SIGN_RATE, "0.38");
@@ -318,7 +318,7 @@ public class YsAuditServiceImpl extends AbstractYsResultService {
} else {
param.put(YsConstant.BALANCE_ACC_TYPE, "11");
}
param.put(YsConstant.EXPANDING_MANAGER, "收银");
param.put(YsConstant.EXPANDING_MANAGER, "快银收银");
// 这里在进件之前再加一次校验
preCheck(userId);

View File

@@ -41,7 +41,7 @@ public class YsConfigV3 {
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";

View File

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

View File

@@ -10,15 +10,17 @@ import lombok.Setter;
@Setter
public class CustInfo {
/**
* 代理商编号,默认同发起方代理商编号
* 代理商编号,默认同发起方代理商编号(不是必填)
*/
private String agtMercId;
/**
* 商户名称
* 商户名称(必填)
*/
private String mercName;
/**
* 商户简称,默认为商户名称若商户名称长度超过20,商户简称必传
*/
private String mercShortName;
/**
@@ -40,14 +42,18 @@ public class CustInfo {
* 联系人电话, 默认同法人电话号码
*/
private String contactMan;
/**
* 客户经理
*/
private String cusMgrNm;
/**
* 是否开通营销,Y开通N不开通,默认不开通
*/
private String isOpenMarket;
/**
* 异步通知地址,银盛通过商户提供的地址下发通知商户可根据异步通知业务参数bizContent中的notifyType确定通知类型具体通知内容、场景以及接口要求详见如下
*/
private String notifyUrl;
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.JftMercBaseInfoService;
import cn.pluss.platform.jft.JftMerchantRateService;
import cn.pluss.platform.mapper.AccountMapper;
import cn.pluss.platform.mapper.BankCodeYsMapper;
import cn.pluss.platform.mapper.JftMercPaymentChannelMapper;
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.merchant.AccountService;
import cn.pluss.platform.merchant.JftMercPaymentChannelService;
import cn.pluss.platform.merchant.MerchantBaseInfoService;
import cn.pluss.platform.notice.NoticeService;
import cn.pluss.platform.region.RegionReflectService;
import cn.pluss.platform.ryx.RyxConstants;
@@ -34,6 +36,7 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.jetbrains.annotations.NotNull;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.core.io.ByteArrayResource;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
@@ -122,6 +125,10 @@ public class YsAuditServiceImpl extends AbstractYsResultService {
@Autowired
private TransactionTemplate transactionTemplate;
@Autowired @Lazy
private MerchantBaseInfoService mbiService;
@Resource
private AccountMapper accountMapper;
@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) {
LambdaQueryWrapper<JftMercPaymentChannel> qWrapper2 = Wrappers.lambdaQuery();
qWrapper2.eq(JftMercPaymentChannel::getUserId, userId);
MerchantBaseInfo mbi = mbiService.getMerchantBaseInfoByUserId(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 (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;
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())) {
throw new MsgException("当前D1通道存在未进件完成的的进件数据不允许进件银盛");
}
if ("1".equals(mbi.getMerchantType())) {
int ysCount = accountMapper.selectYSAuditSmallCount(mbi.getUserId());
if (ysCount >= 2) {
MsgException.throwException("非营业执照商户同一结算人仅可申请两次实时到账");
}
}
final IdCard certIdCard = idCardService.getCertIdCard(userId);
if (certIdCard == null) {
throw new MsgException("实名身份证不能空");
qWrapper.clear();
qWrapper.eq(MerchantChannelStatus::getMerchantCode, mbi.getMerchantCode());
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 (StringUtils.isEmpty(ui.getChannelCode())) {
// 开放接口注册的用户不受限制
final Integer count = jpcMapper.selectCountByCertNo(certIdCard.getCertNo());
if (existD0 != null) {
existD0 = mcsService.getByIdLock(existD0.getId());
if (count > 1) {
throw new MsgException("同一实名信息只能开通一次该功能");
if (existD0.getStatus().equals(MerchantChannelStatus.AUDIT_STATUS_REJECT)) {
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);
}
}