后台实名、商户基本信息,结算信息相关
This commit is contained in:
@@ -1,10 +1,13 @@
|
||||
package com.chaozhanggui.admin.system.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.chaozhanggui.admin.system.service.MerchantInfoService;
|
||||
import com.chaozhanggui.common.system.config.RespBody;
|
||||
import com.chaozhanggui.dao.system.entity.*;
|
||||
import com.chaozhanggui.dao.system.entity.DTO.AccountDTO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -46,15 +49,20 @@ public class MerchantInfoController {
|
||||
}
|
||||
return merchantInfoService.updatePromoterInformation(userApp);
|
||||
}
|
||||
// @PostMapping("/updateMerchantInformation")
|
||||
// @ResponseBody
|
||||
// public RespBody updateMerchantInformation(TbPlussUserApp userApp, TbPlussMerchantImage merchantImage){
|
||||
// if (userApp == null || merchantImage == null){
|
||||
// log.error("参数错误");
|
||||
// return new RespBody("000019");
|
||||
// }
|
||||
// return merchantInfoService.updateMerchantInformation(userApp,merchantImage);
|
||||
// }
|
||||
|
||||
/**
|
||||
* 修改商户相关信息
|
||||
* @param merchantBaseInfo
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/updateMerchantInformation")
|
||||
public RespBody updateMerchantInformation(@RequestBody TbPlussMerchantBaseInfo merchantBaseInfo){
|
||||
if (merchantBaseInfo == null ){
|
||||
log.error("参数错误");
|
||||
return new RespBody("000019");
|
||||
}
|
||||
return merchantInfoService.updateMerchantInformation(merchantBaseInfo);
|
||||
}
|
||||
@PostMapping("/updateIdCard")
|
||||
public RespBody updateIdCard(@RequestBody TbPlussIdCard idCard){
|
||||
if (idCard == null){
|
||||
@@ -90,7 +98,66 @@ public class MerchantInfoController {
|
||||
public RespBody merchBaseAccount(@PathVariable("userId") Integer userId){
|
||||
return merchantInfoService.merchantAccount(userId);
|
||||
}
|
||||
|
||||
// @PostMapping("/updateMerchantSettlement2")
|
||||
// @Transactional
|
||||
// @ResponseBody
|
||||
// public RespBody updateMerchantSettlement2(AccountDTO accountDTO) {
|
||||
// if (accountDTO != null && accountDTO.getUserid() != null) {
|
||||
// accountService.saveV4(accountDTO, false);
|
||||
// }
|
||||
//
|
||||
// // System.out.println(JSON.toJSONString(accountDTO));
|
||||
//// BankCard editBankCard = accountDTO.getBankCard();
|
||||
//// if (editBankCard != null) {
|
||||
//// MsgException.checkNull(editBankCard.getId(), "无结算银行卡信息,请先从通过app填写结算信息!");
|
||||
////
|
||||
//// LambdaQueryWrapper<BankCodeSxf> qWrapper = new LambdaQueryWrapper<BankCodeSxf>()
|
||||
//// .eq(BankCodeSxf::getCnapsCode, editBankCard.getContactLine());
|
||||
//// BankCodeSxf bankCodeSxf = bankCodeSxfMapper.selectOne(qWrapper);
|
||||
//// editBankCard.setBranchName(bankCodeSxf.getCnapsName());
|
||||
////
|
||||
//// bankCardService.updateById(editBankCard);
|
||||
//// }
|
||||
////
|
||||
//// IdCard editIdCard = accountDTO.getIdcard();
|
||||
//// if (editIdCard != null) {
|
||||
//// MsgException.checkNull(editBankCard.getId(), "无结算身份证信息,请先从通过app填写结算信息!");
|
||||
////
|
||||
//// idCardService.updateById(editIdCard);
|
||||
//// }
|
||||
//
|
||||
// if (merchantImage.getMerchantCode() != null) {
|
||||
// //修改结算人与收银台合照
|
||||
// if (!StringUtils.isEmpty(merchantImage.getPicUrl999())) {
|
||||
// merchantImage.setPicUrl(merchantImage.getPicUrl999());
|
||||
// merchantImage.setPhotoType(MerchantImage.ImageType.CASH_DESK_WITH_PERSON);
|
||||
//
|
||||
// UpdateWrapper<MerchantImage> merchantImageUpdateWrapper = new UpdateWrapper<MerchantImage>()
|
||||
// .eq("merchantCode", merchantImage.getMerchantCode()).eq("photoType", merchantImage.getPhotoType());
|
||||
// boolean update = merchantImageService.update(merchantImage, merchantImageUpdateWrapper);
|
||||
// if (!update) {
|
||||
// merchantImage.setMerchantCode(merchantImage.getMerchantCode());
|
||||
// merchantImageService.save(merchantImage);
|
||||
// }
|
||||
// }
|
||||
// //修改结算人手持身份证照
|
||||
// if (!StringUtils.isEmpty(merchantImage.getPicUrl11())) {
|
||||
// merchantImage.setPicUrl(merchantImage.getPicUrl11());
|
||||
// merchantImage.setPhotoType(MerchantImage.ImageType.HAND_IDCARD_PHOTO);
|
||||
//
|
||||
// UpdateWrapper<MerchantImage> merchantImageUpdateWrapper = new UpdateWrapper<MerchantImage>()
|
||||
// .eq("merchantCode", merchantImage.getMerchantCode()).eq("photoType", merchantImage.getPhotoType());
|
||||
// boolean update = merchantImageService.update(merchantImage, merchantImageUpdateWrapper);
|
||||
// if (!update) {
|
||||
// merchantImage.setMerchantCode(merchantImage.getMerchantCode());
|
||||
// merchantImageService.save(merchantImage);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// // throw new MsgException("终止操作");
|
||||
// return ResultGenerator.genSuccessResult("保存成功!", null);
|
||||
// }
|
||||
// /**
|
||||
// * 进件相关信息
|
||||
// * @param userId
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.chaozhanggui.admin.system.model;
|
||||
|
||||
public class CommonError {
|
||||
|
||||
private CommonError(){}
|
||||
|
||||
public static final String NO_AUTHORIZATION = "拒绝访问";
|
||||
|
||||
public static final String NO_LOGIN = "请先登录账号";
|
||||
|
||||
public static final String NO_EXIST_ACCOUNT = "账号不存在";
|
||||
|
||||
public static final String PHONE_HAS_REGISTER = "手机号已被注册!";
|
||||
|
||||
public static final String NO_LEGAL_ID_CARD_INFO = "请填写法人身份证信息";
|
||||
|
||||
public static final String NO_ACC_ID_CARD_INFO = "请填写结算人身份证信息";
|
||||
|
||||
public static final String NO_USER_ID = "缺少userId";
|
||||
|
||||
public static final String NO_BANK_PHONE = "缺少银行卡预留手机号";
|
||||
|
||||
public static final String NO_ACCOUNT_ID_CARD = "缺少结算身份证信息";
|
||||
|
||||
public static final String NO_PART_ACCOUNT_ID_CARD = "结算身份证信息不全";
|
||||
|
||||
public static final String NO_PART_ACCOUNT_ID_CARD_HEAD = "缺少结算身份证信息人头面";
|
||||
|
||||
public static final String NO_PART_ACCOUNT_ID_CARD_EMBLEM = "缺少结算身份证信息国徽面";
|
||||
|
||||
public static final String NO_ACCOUNT_BANK_CARD = "缺少结算银行卡信息";
|
||||
|
||||
public static final String NO_ACCOUNT_BANK_CARD_LICENSE = "对公结算卡缺少开户许可证";
|
||||
|
||||
public static final String NO_ACCOUNT_BANK_CARD_IMG = "对私结算卡缺少银行卡卡号面图";
|
||||
|
||||
public static final String NO_PART_ACCOUNT_BANK_CARD = "结算银行卡信息不全";
|
||||
|
||||
public static final String NO_ILLEGAL_ACCOUNT_CERTIFICATE_URL = "非法人结算缺少非法人结算授权函";
|
||||
|
||||
public static final String CHANNEL_TYPE_ILLEGAL = "通道类型错误";
|
||||
|
||||
public static final String BANK_NAME_EMPTY = "缺少银行名称";
|
||||
|
||||
public static final String BANK_BRANCH_PROVINCE_EMPTY = "缺少开户支行所在省份";
|
||||
|
||||
public static final String BANK_BRANCH_CITY_EMPTY = "缺少开户支行所在市";
|
||||
|
||||
public static final String BANK_BRANCH_AREA_EMPTY = "缺少开户支行所在县/区";
|
||||
|
||||
public static final String BANK_BRANCH_NAME_EMPTY = "缺少开户支行名称";
|
||||
|
||||
public static final String BANK_BRANCH_CNAPS_EMPTY = "缺少开户支行联行号";
|
||||
|
||||
public static final String ACCOUNT_EMPTY = "缺少结算信息";
|
||||
|
||||
public static final String ERROR_STATUS = "当前状态不允许操作";
|
||||
}
|
||||
@@ -1,17 +1,23 @@
|
||||
package com.chaozhanggui.admin.system.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.chaozhanggui.admin.system.model.CommonError;
|
||||
import com.chaozhanggui.common.system.config.MsgException;
|
||||
import com.chaozhanggui.dao.system.dao.*;
|
||||
import com.chaozhanggui.dao.system.entity.*;
|
||||
import com.chaozhanggui.dao.system.entity.DTO.AccountDTO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
@@ -34,6 +40,11 @@ public class AccountService {
|
||||
private TbPlussMerchantImageMapper merchantImageMapper;
|
||||
@Resource
|
||||
private TbPlussMerchantChannelStatusMapper merchantChannelStatusMapper;
|
||||
@Resource
|
||||
private TbPlussBankCodeSxfMapper bankCodeSxfMapper;
|
||||
@Resource
|
||||
private TbPlussRiskBlacklistMapper riskBlacklistMapper;
|
||||
|
||||
|
||||
public AccountDTO getRealAccount(String userId) {
|
||||
return getRealAccount(userId, TbPlussAccount.CHANNEL_TYPE_D1);
|
||||
@@ -145,4 +156,228 @@ public class AccountService {
|
||||
return accountDTO;
|
||||
}
|
||||
|
||||
// @Transactional(rollbackFor = Exception.class)
|
||||
// public void saveV4(AccountDTO accountDTO, boolean checkFlag) {
|
||||
// TbPlussMerchantBaseInfo mbi = merchantBaseInfoMapper.selectByUserId(accountDTO.getUserid());
|
||||
// if (StringUtils.isEmpty(accountDTO.getChanneltype())) {
|
||||
// TbPlussMerchantChannelStatus mcsD1 = merchantChannelStatusMapper.getByMerchantCodeAndChannelType(mbi.getMerchantcode(), TbPlussAccount.CHANNEL_TYPE_D1);
|
||||
// mcsD1 = Optional.ofNullable(mcsD1).orElse(new TbPlussMerchantChannelStatus());
|
||||
// if (Objects.equals(mcsD1.getStatus(), TbPlussMerchantChannelStatus.AUDIT_STATUS_SUCCESS)
|
||||
// || Objects.equals(mcsD1.getStatus(), TbPlussMerchantChannelStatus.AUDIT_STATUS_EXAMINING)
|
||||
// || Objects.equals(mcsD1.getStatus(), TbPlussMerchantChannelStatus.AUDIT_STATUS_DATA_EDIT)) {
|
||||
// accountDTO.setChanneltype(TbPlussAccount.CHANNEL_TYPE_D0);
|
||||
// } else {
|
||||
// accountDTO.setChanneltype(TbPlussAccount.CHANNEL_TYPE_D1);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (checkFlag) {
|
||||
// TbPlussMerchantChannelStatus mcs = merchantChannelStatusMapper.getByMerchantCodeAndChannelType(mbi.getMerchantcode(), accountDTO.getSettletype());
|
||||
// mcs = Optional.ofNullable(mcs).orElse(new TbPlussMerchantChannelStatus());
|
||||
// if (Objects.equals(mcs.getStatus(), TbPlussMerchantChannelStatus.AUDIT_STATUS_SUCCESS)
|
||||
// || Objects.equals(mcs.getStatus(), TbPlussMerchantChannelStatus.AUDIT_STATUS_EXAMINING)
|
||||
// || Objects.equals(mcs.getStatus(), TbPlussMerchantChannelStatus.AUDIT_STATUS_DATA_EDIT)) {
|
||||
// throw new MsgException("当前状态不允许修改结算卡信息");
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// List<String> channelTypeList = new ArrayList<>();
|
||||
// channelTypeList.add(TbPlussAccount.CHANNEL_TYPE_D0);
|
||||
// channelTypeList.add(TbPlussAccount.CHANNEL_TYPE_D1);
|
||||
//
|
||||
// if (!channelTypeList.contains(accountDTO.getChanneltype())) {
|
||||
// throw new MsgException("通道类型错误");
|
||||
// }
|
||||
//
|
||||
// if (TbPlussAccount.SETTLE_TYPE_PRIVATE_ILLEGAL.equals(accountDTO.getSettletype())) {
|
||||
// MsgException.checkNull(accountDTO.getIdcard(), CommonError.NO_ACC_ID_CARD_INFO);
|
||||
// } else {
|
||||
// // 小微,如果未传身份证信息,则获取对私身份信息
|
||||
// if (accountDTO.getIdcard() == null && TbPlussAccount.SETTLE_TYPE_MICRO_STORE.equals(accountDTO.getSettletype())) {
|
||||
// TbPlussAccount account = new TbPlussAccount();
|
||||
// account.setChanneltype(accountDTO.getChanneltype());
|
||||
// account.setUserid(accountDTO.getUserid());
|
||||
//
|
||||
// account = accountMapper.selectByAccount(account);
|
||||
//
|
||||
// if (account != null) {
|
||||
// TbPlussIdCard accIdCard = idCardMapper.getById(account.getIdcardid());
|
||||
// MsgException.checkNull(accIdCard, "缺少结算人身份信息");
|
||||
// accountDTO.setIdcard(accIdCard);
|
||||
// } else {
|
||||
// LambdaQueryWrapper<TbPlussIdCard> idCardQueryWrapper = Wrappers.lambdaQuery();
|
||||
// idCardQueryWrapper.eq(TbPlussIdCard::getUserid, accountDTO.getUserid())
|
||||
// .eq(TbPlussIdCard::getUsertype, TbPlussIdCard.TYPE_ACCOUNT);
|
||||
// TbPlussIdCard accIdCard = idCardMapper.getOne(idCardQueryWrapper);
|
||||
// MsgException.checkNull(accIdCard, "缺少结算人身份信息");
|
||||
// accountDTO.setIdcard(accIdCard);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// accountDTO.paramCheck();
|
||||
// //校验银行卡信息是否合法
|
||||
// checkBankInfo(accountDTO.getBankCard());
|
||||
//
|
||||
// TbPlussIdCard accIdCard = Optional.ofNullable(accountDTO.getIdcard()).orElseGet(() -> {
|
||||
// // 没有身份证信息说明是法人进件
|
||||
// return idCardMapper.getLegalIdCard(accountDTO.getUserid());
|
||||
// });
|
||||
//
|
||||
// // 原则上这里不需要再做空判断
|
||||
// TbPlussRiskBlacklist riskBlacklist = new TbPlussRiskBlacklist();
|
||||
// riskBlacklist.setIdcardno(accIdCard.getCertno());
|
||||
// Integer count = riskBlacklistMapper.selectCount(accIdCard.getCertno());
|
||||
// if (count > 0) {
|
||||
// throw new MsgException("当前结算人已在风控黑名单中,请更换结算信息");
|
||||
// }
|
||||
//
|
||||
//
|
||||
// delAccount(accountDTO.getUserId(), accountDTO.getChannelType());
|
||||
//
|
||||
// Account account = Converter.INSTANCE.toEntity(accountDTO);
|
||||
//
|
||||
// if (Account.SETTLE_TYPE_CORPORATE.equals(accountDTO.getSettleType())) {
|
||||
// IdCard legalIdCard = idCardService.getLegalIdCard(account.getUserId());
|
||||
// MsgException.checkNull(legalIdCard, CommonError.NO_LEGAL_ID_CARD_INFO);
|
||||
// accountDTO.setIdcard(legalIdCard);
|
||||
// account.setIdCardId(legalIdCard.getId() + "");
|
||||
// accountDTO.getBankCard().setBankHolder(mbi.getBussAuthName());
|
||||
// } else if (accountDTO.getSettleType().startsWith(Account.SETTLE_TYPE_PRIVATE_LEGAL)) {
|
||||
// IdCard legalIdCard = idCardService.getLegalIdCard(account.getUserId());
|
||||
// if (legalIdCard == null) {
|
||||
// throw new MsgException(CommonError.NO_LEGAL_ID_CARD_INFO);
|
||||
// }
|
||||
//
|
||||
// if (accIdCard == null) {
|
||||
// accIdCard = legalIdCard;
|
||||
// idCardService.save(accIdCard);
|
||||
// } else {
|
||||
// accIdCard.setId(legalIdCard.getId());
|
||||
// idCardService.updateById(accIdCard);
|
||||
// }
|
||||
// account.setIdCardId(accIdCard.getId() + "");
|
||||
// accountDTO.setIdcard(accIdCard);
|
||||
// accountDTO.getBankCard().setBankHolder(accIdCard.getCertName());
|
||||
// } else {
|
||||
// idCardService.save(accountDTO.getIdcard());
|
||||
// accountDTO.getBankCard().setBankHolder(accountDTO.getIdcard().getCertName());
|
||||
// account.setIdCardId(accountDTO.getIdcard().getId() + "");
|
||||
// }
|
||||
//
|
||||
// IdCard certIdCard = idCardService.getCertIdCard(accountDTO.getUserId());
|
||||
//
|
||||
// if (mbi.getMerchantType().equals(MerchantBaseInfo.MERCH_TYPE_MICRO)) {
|
||||
// // 小微需要结算人与实名人是同一个人
|
||||
// IdCard idcard = accountDTO.getIdcard();
|
||||
// if (idcard != null) {
|
||||
// if (!idcard.getCertNo().equals(certIdCard.getCertNo())) {
|
||||
// throw new MsgException("小微商户结算人必须是自己");
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// boolean settleTypeFlag = Account.SETTLE_TYPE_CORPORATE.equals(accountDTO.getSettleType());
|
||||
// //TODO 测试时先注掉
|
||||
// if (checkFlag && !(settleTypeFlag)) {
|
||||
// // 执行银行卡四要素校验
|
||||
// aliyunService.checkBankCorrectNow(accountDTO.getBankCard().getPhone(), accountDTO.getBankCard().getBankCardNo()
|
||||
// , accountDTO.getIdcard().getCertNo()
|
||||
// , accountDTO.getBankCard().getBankHolder(), "结算人与结算银行卡不匹配,请核对结算信息");
|
||||
// }
|
||||
//
|
||||
// bankCardService.save(accountDTO.getBankCard());
|
||||
// account.setBankCardId(accountDTO.getBankCard().getId() + "");
|
||||
// this.baseMapper.insert(account);
|
||||
// //如果注册了一个通道给他默认
|
||||
// LambdaQueryWrapper<Account> qWrapperAccountD1 = Wrappers.lambdaQuery();
|
||||
// qWrapperAccountD1.eq(Account::getUserId, accountDTO.getUserId());
|
||||
// int count = baseMapper.selectCount(qWrapperAccountD1);
|
||||
// if (count == 1) {
|
||||
// account.setValid(1);
|
||||
// this.baseMapper.updateById(account);
|
||||
// }
|
||||
//// if (!accountDTO.getChannelType().equals(Account.CHANNEL_TYPE_D1)) {
|
||||
//// return;
|
||||
//// }
|
||||
//
|
||||
// // 如果不存在D0的结算信息,则直接将D1的结算信息带过来
|
||||
// LambdaQueryWrapper<Account> qWrapperAccountD1New = Wrappers.lambdaQuery();
|
||||
// qWrapperAccountD1New.eq(Account::getUserId, accountDTO.getUserId()).eq(Account::getChannelType, Account.CHANNEL_TYPE_D0);
|
||||
// int countNew = baseMapper.selectCount(qWrapperAccountD1New);
|
||||
// if (countNew == 0) {
|
||||
// account.setChannelType(Account.CHANNEL_TYPE_D0);
|
||||
// account.setValid(0);
|
||||
// save(account);
|
||||
// }
|
||||
// //TODO
|
||||
// // 如果不存在D1的结算信息,则直接将D0的结算信息带过来
|
||||
// LambdaQueryWrapper<Account> qWrapperAccountD0 = Wrappers.lambdaQuery();
|
||||
// qWrapperAccountD0.eq(Account::getUserId, accountDTO.getUserId()).eq(Account::getChannelType, Account.CHANNEL_TYPE_D1);
|
||||
// int countD0 = baseMapper.selectCount(qWrapperAccountD0);
|
||||
// if (countD0 == 0) {
|
||||
// account.setChannelType(Account.CHANNEL_TYPE_D1);
|
||||
// account.setValid(0);
|
||||
// save(account);
|
||||
// }
|
||||
// }
|
||||
|
||||
/**
|
||||
* 校验银行卡信息是否合法
|
||||
* @param bankCard
|
||||
*/
|
||||
public void checkBankInfo(TbPlussBankCard bankCard) {
|
||||
TbPlussBankCodeSxf bankCodeSxf = new TbPlussBankCodeSxf();
|
||||
bankCodeSxf.setCnapsCode(bankCard.getContactline());
|
||||
bankCodeSxf = bankCodeSxfMapper.selectOne(new QueryWrapper<>(bankCodeSxf));
|
||||
|
||||
String bankName = bankCard.getBankname().replace("银行", "");
|
||||
|
||||
if ("浦发".equals(bankName)) {
|
||||
bankName = "浦东发展";
|
||||
}
|
||||
|
||||
if("长安".equals(bankName)){
|
||||
bankName="城市商业银行";
|
||||
}
|
||||
|
||||
if (!bankCodeSxf.getBankName().contains(bankName) && !"其他".equals(bankName)) {
|
||||
MsgException.throwException("开户行与支行信息不匹配,请检查银行卡信息");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 清理指定用户的结算信息
|
||||
* @param userId
|
||||
* @param channelType
|
||||
*/
|
||||
// public void delAccount(String userId, String channelType) {
|
||||
// TbPlussAccount account = accountMapper.selectByUser(Integer.valueOf(userId),channelType);
|
||||
// if (account == null) {
|
||||
// return;
|
||||
// }
|
||||
// accountMapper.deleteByPrimaryKey(account.getId());
|
||||
//
|
||||
// if (!account.getSettletype().equals(TbPlussAccount.SETTLE_TYPE_CORPORATE)
|
||||
// && !account.getSettletype().startsWith(TbPlussAccount.SETTLE_TYPE_PRIVATE_LEGAL)) {
|
||||
// LambdaQueryWrapper<TbPlussAccount> queryWrapper2 = Wrappers.lambdaQuery();
|
||||
// queryWrapper2.eq(TbPlussAccount::getUserid, userId)
|
||||
// .eq(TbPlussAccount::getIdcardid, account.getIdcardid());
|
||||
// accountMapper.
|
||||
// Integer countIdCardUsedAccount = baseMapper.selectCount(queryWrapper2);
|
||||
// if (countIdCardUsedAccount == null || countIdCardUsedAccount == 0) {
|
||||
// // idCard如果没有再被使用
|
||||
// idCardService.removeById(account.getIdCardId());
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// LambdaQueryWrapper<Account> queryWrapper2 = Wrappers.lambdaQuery();
|
||||
// queryWrapper2.eq(Account::getUserId, userId).eq(Account::getBankCardId, account.getBankCardId());
|
||||
// Integer countBankCardUsedAccount = baseMapper.selectCount(queryWrapper2);
|
||||
// if (countBankCardUsedAccount == null || countBankCardUsedAccount == 0) {
|
||||
// // bankCard如果没有再被使用
|
||||
// bankCardService.removeById(account.getBankCardId());
|
||||
// }
|
||||
//
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.chaozhanggui.admin.system.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.chaozhanggui.common.system.config.MsgException;
|
||||
import com.chaozhanggui.dao.system.dao.TbPlussBankCodeSxfMapper;
|
||||
import com.chaozhanggui.dao.system.entity.TbPlussBankCard;
|
||||
import com.chaozhanggui.dao.system.entity.TbPlussBankCodeSxf;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
public class BankCardService {
|
||||
@Resource
|
||||
private TbPlussBankCodeSxfMapper bankCodeSxfMapper;
|
||||
|
||||
/**
|
||||
* 校验银行卡信息是否合法
|
||||
* @param bankCard
|
||||
*/
|
||||
public void checkBankInfo(TbPlussBankCard bankCard) {
|
||||
TbPlussBankCodeSxf bankCodeSxf = new TbPlussBankCodeSxf();
|
||||
bankCodeSxf.setCnapsCode(bankCard.getContactline());
|
||||
bankCodeSxf = bankCodeSxfMapper.selectOne(new QueryWrapper<>(bankCodeSxf));
|
||||
|
||||
String bankName = bankCard.getBankname().replace("银行", "");
|
||||
|
||||
if ("浦发".equals(bankName)) {
|
||||
bankName = "浦东发展";
|
||||
}
|
||||
|
||||
if("长安".equals(bankName)){
|
||||
bankName="城市商业银行";
|
||||
}
|
||||
|
||||
if (!bankCodeSxf.getBankName().contains(bankName) && !"其他".equals(bankName)) {
|
||||
MsgException.throwException("开户行与支行信息不匹配,请检查银行卡信息");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,9 @@
|
||||
package com.chaozhanggui.admin.system.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.chaozhanggui.dao.system.entity.TbPlussMerchantChannelStatus;
|
||||
import com.chaozhanggui.dao.system.entity.VO.UserInfoVO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -74,4 +77,14 @@ public class MerchantChannelService {
|
||||
//
|
||||
// return pageResult;
|
||||
// }
|
||||
|
||||
|
||||
// public TbPlussMerchantChannelStatus getByMerchantCodeAndChannelType(String merchantCode, String channelType) {
|
||||
// LambdaQueryWrapper<TbPlussMerchantChannelStatus> qWrapper = Wrappers.lambdaQuery();
|
||||
// qWrapper.eq(TbPlussMerchantChannelStatus::getVirchannelflag, channelType);
|
||||
// qWrapper.eq(TbPlussMerchantChannelStatus::getMerchantcode, merchantCode);
|
||||
// qWrapper.eq(TbPlussMerchantChannelStatus::getAuthorizationstatus,1);
|
||||
//
|
||||
// return getOne(qWrapper);
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -168,7 +168,7 @@ public class MerchantInfoService {
|
||||
throw new MsgException("未找到支行信息");
|
||||
}
|
||||
userApp.getBankCard().setContactline(bankCodeSxf.getCnapsCode());
|
||||
bankCardMapper.update(userApp.getBankCard(), bankCardUpdateWrapper);
|
||||
bankCardMapper.updateByPrimaryKeySelective(userApp.getBankCard());
|
||||
UpdateWrapper<TbPlussIdCard> idCardUpdateWrapper = new UpdateWrapper<TbPlussIdCard>().eq("userId", userApp.getUserid()).eq("userType", TbPlussIdCard.TYPE_CERT);
|
||||
if ("".equals(userApp.getIdCard().getImgpositive())) {
|
||||
userApp.getIdCard().setImgpositive(null);
|
||||
@@ -176,7 +176,8 @@ public class MerchantInfoService {
|
||||
if ("".equals(userApp.getIdCard().getImgnegative())) {
|
||||
userApp.getIdCard().setImgnegative(null);
|
||||
}
|
||||
idCardMapper.update(userApp.getIdCard(), idCardUpdateWrapper);
|
||||
userApp.getIdCard().setVirtypeflag("");
|
||||
idCardMapper.updateByPrimaryKeySelective(userApp.getIdCard());
|
||||
}
|
||||
return new RespBody("000000");
|
||||
}
|
||||
@@ -195,70 +196,68 @@ public class MerchantInfoService {
|
||||
}
|
||||
return new RespBody("999943");
|
||||
}
|
||||
|
||||
// public RespBody updateMerchantInformation(TbPlussUserApp userApp, TbPlussMerchantImage merchantImage){
|
||||
// if (userApp.getMerchantBaseInfo() != null) {
|
||||
// QueryWrapper<TbPlussAreaCity> areaCityQueryWrapper = new QueryWrapper<TbPlussAreaCity>().
|
||||
// in("areaCode", userApp.getMerchantBaseInfo().getProvince(),
|
||||
// userApp.getMerchantBaseInfo().getCity(), userApp.getMerchantBaseInfo().getDistrict());
|
||||
// List<TbPlussAreaCity> areaCityList = areaCityMapper.selectList(areaCityQueryWrapper);
|
||||
// for (TbPlussAreaCity areaCity : areaCityList) {
|
||||
// if ("1".equals(areaCity.getType())) {
|
||||
// userApp.getMerchantBaseInfo().setProvince(areaCity.getAreaname());
|
||||
// } else if ("2".equals(areaCity.getType())) {
|
||||
// userApp.getMerchantBaseInfo().setCity(areaCity.getAreaname());
|
||||
// } else if ("3".equals(areaCity.getType()) || "4".equals(areaCity.getType())) {
|
||||
// userApp.getMerchantBaseInfo().setDistrict(areaCity.getAreaname());
|
||||
// }
|
||||
// }
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public RespBody updateMerchantInformation(TbPlussMerchantBaseInfo merchantBaseInfo){
|
||||
if (merchantBaseInfo != null) {
|
||||
QueryWrapper<TbPlussAreaCity> areaCityQueryWrapper = new QueryWrapper<TbPlussAreaCity>().
|
||||
in("areaCode", merchantBaseInfo.getProvince(),
|
||||
merchantBaseInfo.getCity(), merchantBaseInfo.getDistrict());
|
||||
List<TbPlussAreaCity> areaCityList = areaCityMapper.selectList(areaCityQueryWrapper);
|
||||
for (TbPlussAreaCity areaCity : areaCityList) {
|
||||
if ("1".equals(areaCity.getType())) {
|
||||
merchantBaseInfo.setProvince(areaCity.getAreaname());
|
||||
} else if ("2".equals(areaCity.getType())) {
|
||||
merchantBaseInfo.setCity(areaCity.getAreaname());
|
||||
} else if ("3".equals(areaCity.getType()) || "4".equals(areaCity.getType())) {
|
||||
merchantBaseInfo.setDistrict(areaCity.getAreaname());
|
||||
}
|
||||
}
|
||||
// UpdateWrapper<TbPlussMerchantBaseInfo> merchantBaseInfoUpdateWrapper = new UpdateWrapper<TbPlussMerchantBaseInfo>()
|
||||
// .eq("userId", userApp.getUserid());
|
||||
// merchantChannelMapper.update(userApp.getMerchantBaseInfo(), merchantBaseInfoUpdateWrapper);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// if (userApp.getMerchantcode() != null) {
|
||||
// UpdateWrapper<TbPlussMerchantImage> merchantImageUpdateWrapper;
|
||||
// if (!"".equals(merchantImage.getPicUrl6())) {
|
||||
// merchantImage.setPicurl(merchantImage.getPicUrl6());
|
||||
// merchantImage.setPhotoType(TbPlussMerchantImage.SHOP_FRONT_DOOR);
|
||||
// merchantImageUpdateWrapper = new UpdateWrapper<TbPlussMerchantImage>()
|
||||
// .eq("merchantCode", userApp.getMerchantcode()).eq("photoType", merchantImage.getPhotoType());
|
||||
// merchantChannelMapper.saveOrUpdate(merchantImage, merchantImageUpdateWrapper);
|
||||
// }
|
||||
//
|
||||
// if (!"".equals(merchantImage.getPicUrl8())) {
|
||||
// merchantImage.setPicurl(merchantImage.getPicUrl8());
|
||||
// merchantImage.setPhotoType(TbPlussMerchantImage.CASH_DESK_PHOTO);
|
||||
// merchantImageUpdateWrapper = new UpdateWrapper<TbPlussMerchantImage>()
|
||||
// .eq("merchantCode", userApp.getMerchantcode()).eq("photoType", merchantImage.getPhotoType());
|
||||
// merchantChannelMapper.saveOrUpdate(merchantImage, merchantImageUpdateWrapper);
|
||||
// }
|
||||
// if (!"".equals(merchantImage.getPicUrl9())) {
|
||||
// merchantImage.setPicurl(merchantImage.getPicUrl9());
|
||||
// merchantImage.setPhotoType(TbPlussMerchantImage.STORE_INTERIOR_PHOTO);
|
||||
// merchantImageUpdateWrapper = new UpdateWrapper<TbPlussMerchantImage>()
|
||||
// .eq("merchantCode", userApp.getMerchantcode()).eq("photoType", merchantImage.getPhotoType());
|
||||
// merchantChannelMapper.saveOrUpdate(merchantImage, merchantImageUpdateWrapper);
|
||||
// }
|
||||
//
|
||||
// if (!"".equals(merchantImage.getPicUrl101())) {
|
||||
// merchantImage.setPicurl(merchantImage.getPicUrl101());
|
||||
// merchantImage.setPhotoType(TbPlussMerchantImage.MERCHANT_PROTOCOL);
|
||||
// merchantImageUpdateWrapper = new UpdateWrapper<TbPlussMerchantImage>()
|
||||
// .eq("merchantCode", userApp.getMerchantcode()).eq("photoType", merchantImage.getPhotoType());
|
||||
// merchantChannelMapper.saveOrUpdate(merchantImage, merchantImageUpdateWrapper);
|
||||
// }
|
||||
//
|
||||
// if (!"".equals(merchantImage.getPicUrl102())) {
|
||||
// merchantImage.setPicurl(merchantImage.getPicUrl102());
|
||||
// merchantImage.setPhotoType(TbPlussMerchantImage.MERCHANT_SUB_PROTOCOL);
|
||||
// merchantImageUpdateWrapper = new UpdateWrapper<TbPlussMerchantImage>()
|
||||
// .eq("merchantCode", userApp.getMerchantcode()).eq("photoType", merchantImage.getPhotoType());
|
||||
// merchantChannelMapper.saveOrUpdate(merchantImage, merchantImageUpdateWrapper);
|
||||
// }
|
||||
// }
|
||||
// return new RespBody("000000");
|
||||
// }
|
||||
merchantBaseInfoMapper.updateByPrimaryKeySelective(merchantBaseInfo);
|
||||
}
|
||||
if (merchantBaseInfo.getMerchantcode() != null) {
|
||||
if (!"".equals(merchantBaseInfo.getPicUrl6())) {
|
||||
TbPlussMerchantImage merchantImage = new TbPlussMerchantImage();
|
||||
merchantImage.setPicurl(merchantBaseInfo.getPicUrl6());
|
||||
merchantImage.setPhotoType(TbPlussMerchantImage.SHOP_FRONT_DOOR);
|
||||
merchantImage.setMerchantcode(merchantBaseInfo.getMerchantcode());
|
||||
merchantImageMapper.updateByCodeAndType(merchantImage);
|
||||
}
|
||||
|
||||
if (!"".equals(merchantBaseInfo.getPicUrl8())) {
|
||||
TbPlussMerchantImage merchantImage = new TbPlussMerchantImage();
|
||||
merchantImage.setPicurl(merchantBaseInfo.getPicUrl8());
|
||||
merchantImage.setPhotoType(TbPlussMerchantImage.CASH_DESK_PHOTO);
|
||||
merchantImage.setMerchantcode(merchantBaseInfo.getMerchantcode());
|
||||
merchantImageMapper.updateByCodeAndType(merchantImage);
|
||||
}
|
||||
if (!"".equals(merchantBaseInfo.getPicUrl9())) {
|
||||
TbPlussMerchantImage merchantImage = new TbPlussMerchantImage();
|
||||
merchantImage.setPicurl(merchantBaseInfo.getPicUrl9());
|
||||
merchantImage.setPhotoType(TbPlussMerchantImage.STORE_INTERIOR_PHOTO);
|
||||
merchantImage.setMerchantcode(merchantBaseInfo.getMerchantcode());
|
||||
merchantImageMapper.updateByCodeAndType(merchantImage);
|
||||
}
|
||||
|
||||
if (!"".equals(merchantBaseInfo.getPicUrl101())) {
|
||||
TbPlussMerchantImage merchantImage = new TbPlussMerchantImage();
|
||||
merchantImage.setPicurl(merchantBaseInfo.getPicUrl101());
|
||||
merchantImage.setPhotoType(TbPlussMerchantImage.MERCHANT_PROTOCOL);
|
||||
merchantImage.setMerchantcode(merchantBaseInfo.getMerchantcode());
|
||||
merchantImageMapper.updateByCodeAndType(merchantImage);
|
||||
}
|
||||
|
||||
if (!"".equals(merchantBaseInfo.getPicUrl102())) {
|
||||
TbPlussMerchantImage merchantImage = new TbPlussMerchantImage();
|
||||
merchantImage.setPicurl(merchantBaseInfo.getPicUrl102());
|
||||
merchantImage.setPhotoType(TbPlussMerchantImage.MERCHANT_SUB_PROTOCOL);
|
||||
merchantImage.setMerchantcode(merchantBaseInfo.getMerchantcode());
|
||||
merchantImageMapper.updateByCodeAndType(merchantImage);
|
||||
}
|
||||
}
|
||||
return new RespBody("000000");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -24,4 +24,6 @@ public interface TbPlussAccountMapper {
|
||||
int updateByPrimaryKeyWithBLOBs(TbPlussAccount record);
|
||||
|
||||
int updateByPrimaryKey(TbPlussAccount record);
|
||||
|
||||
Integer selectCount(String idCardId,String userId);
|
||||
}
|
||||
@@ -7,6 +7,9 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author lyf
|
||||
*/
|
||||
@Component
|
||||
@Mapper
|
||||
public interface TbPlussBankCardMapper extends IService<TbPlussBankCard> {
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.chaozhanggui.dao.system.entity.TbPlussIdCard;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
@@ -21,4 +22,10 @@ public interface TbPlussIdCardMapper extends IService<TbPlussIdCard> {
|
||||
int updateByPrimaryKeySelective(TbPlussIdCard record);
|
||||
|
||||
int updateByPrimaryKey(TbPlussIdCard record);
|
||||
|
||||
/**
|
||||
* 法人进件
|
||||
* @return
|
||||
*/
|
||||
TbPlussIdCard getLegalIdCard(@Param("userId") String userId);
|
||||
}
|
||||
@@ -23,5 +23,7 @@ public interface TbPlussMerchantImageMapper {
|
||||
|
||||
int updateByPrimaryKeySelective(TbPlussMerchantImage record);
|
||||
|
||||
int updateByCodeAndType(TbPlussMerchantImage record);
|
||||
|
||||
int updateByPrimaryKey(TbPlussMerchantImage record);
|
||||
}
|
||||
@@ -1,13 +1,18 @@
|
||||
package com.chaozhanggui.dao.system.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.chaozhanggui.dao.system.entity.TbPlussRiskBlacklist;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author lyf
|
||||
*/
|
||||
@Component
|
||||
@Mapper
|
||||
public interface TbPlussRiskBlacklistMapper {
|
||||
public interface TbPlussRiskBlacklistMapper extends IService<TbPlussRiskBlacklist> {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(TbPlussRiskBlacklist record);
|
||||
@@ -19,4 +24,6 @@ public interface TbPlussRiskBlacklistMapper {
|
||||
int updateByPrimaryKeySelective(TbPlussRiskBlacklist record);
|
||||
|
||||
int updateByPrimaryKey(TbPlussRiskBlacklist record);
|
||||
|
||||
int selectCount(@Param("idCardNo") String idCardNo);
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.chaozhanggui.dao.system.entity.DTO;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.chaozhanggui.dao.system.entity.TbPlussAccount;
|
||||
import com.chaozhanggui.dao.system.entity.TbPlussBankCard;
|
||||
import com.chaozhanggui.dao.system.entity.TbPlussIdCard;
|
||||
@@ -45,6 +46,29 @@ public class AccountDTO extends TbPlussAccount {
|
||||
*/
|
||||
private String merchantType;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String picUrl1;
|
||||
@TableField(exist = false)
|
||||
private String picUrl2;
|
||||
@TableField(exist = false)
|
||||
private String picUrl3;
|
||||
@TableField(exist = false)
|
||||
private String picUrl6;
|
||||
@TableField(exist = false)
|
||||
private String picUrl7;
|
||||
@TableField(exist = false)
|
||||
private String picUrl8;
|
||||
@TableField(exist = false)
|
||||
private String picUrl9;
|
||||
@TableField(exist = false)
|
||||
private String picUrl999;
|
||||
@TableField(exist = false)
|
||||
private String picUrl101;
|
||||
@TableField(exist = false)
|
||||
private String picUrl102;
|
||||
@TableField(exist = false)
|
||||
private String picUrl11;
|
||||
|
||||
/**
|
||||
* 通过数据获取进件类型
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.chaozhanggui.dao.system.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@@ -97,6 +99,116 @@ public class TbPlussMerchantBaseInfo implements Serializable {
|
||||
private Byte splitflag;
|
||||
|
||||
private Byte validflag;
|
||||
@TableField(exist = false)
|
||||
private String picUrl1;
|
||||
@TableField(exist = false)
|
||||
private String picUrl2;
|
||||
@TableField(exist = false)
|
||||
private String picUrl3;
|
||||
@TableField(exist = false)
|
||||
private String picUrl6;
|
||||
@TableField(exist = false)
|
||||
private String picUrl7;
|
||||
@TableField(exist = false)
|
||||
private String picUrl8;
|
||||
@TableField(exist = false)
|
||||
private String picUrl9;
|
||||
@TableField(exist = false)
|
||||
private String picUrl999;
|
||||
@TableField(exist = false)
|
||||
private String picUrl101;
|
||||
@TableField(exist = false)
|
||||
private String picUrl102;
|
||||
@TableField(exist = false)
|
||||
private String picUrl11;
|
||||
|
||||
public String getPicUrl1() {
|
||||
return picUrl1;
|
||||
}
|
||||
|
||||
public void setPicUrl1(String picUrl1) {
|
||||
this.picUrl1 = picUrl1;
|
||||
}
|
||||
|
||||
public String getPicUrl2() {
|
||||
return picUrl2;
|
||||
}
|
||||
|
||||
public void setPicUrl2(String picUrl2) {
|
||||
this.picUrl2 = picUrl2;
|
||||
}
|
||||
|
||||
public String getPicUrl3() {
|
||||
return picUrl3;
|
||||
}
|
||||
|
||||
public void setPicUrl3(String picUrl3) {
|
||||
this.picUrl3 = picUrl3;
|
||||
}
|
||||
|
||||
public String getPicUrl6() {
|
||||
return picUrl6;
|
||||
}
|
||||
|
||||
public void setPicUrl6(String picUrl6) {
|
||||
this.picUrl6 = picUrl6;
|
||||
}
|
||||
|
||||
public String getPicUrl7() {
|
||||
return picUrl7;
|
||||
}
|
||||
|
||||
public void setPicUrl7(String picUrl7) {
|
||||
this.picUrl7 = picUrl7;
|
||||
}
|
||||
|
||||
public String getPicUrl8() {
|
||||
return picUrl8;
|
||||
}
|
||||
|
||||
public void setPicUrl8(String picUrl8) {
|
||||
this.picUrl8 = picUrl8;
|
||||
}
|
||||
|
||||
public String getPicUrl9() {
|
||||
return picUrl9;
|
||||
}
|
||||
|
||||
public void setPicUrl9(String picUrl9) {
|
||||
this.picUrl9 = picUrl9;
|
||||
}
|
||||
|
||||
public String getPicUrl999() {
|
||||
return picUrl999;
|
||||
}
|
||||
|
||||
public void setPicUrl999(String picUrl999) {
|
||||
this.picUrl999 = picUrl999;
|
||||
}
|
||||
|
||||
public String getPicUrl101() {
|
||||
return picUrl101;
|
||||
}
|
||||
|
||||
public void setPicUrl101(String picUrl101) {
|
||||
this.picUrl101 = picUrl101;
|
||||
}
|
||||
|
||||
public String getPicUrl102() {
|
||||
return picUrl102;
|
||||
}
|
||||
|
||||
public void setPicUrl102(String picUrl102) {
|
||||
this.picUrl102 = picUrl102;
|
||||
}
|
||||
|
||||
public String getPicUrl11() {
|
||||
return picUrl11;
|
||||
}
|
||||
|
||||
public void setPicUrl11(String picUrl11) {
|
||||
this.picUrl11 = picUrl11;
|
||||
}
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ import java.util.List;
|
||||
|
||||
public class TbPlussUserApp implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private String loginname;
|
||||
|
||||
private Integer userid;
|
||||
@@ -114,6 +113,29 @@ public class TbPlussUserApp implements Serializable {
|
||||
@ApiModelProperty(value = "")
|
||||
@TableField(exist = false)
|
||||
private String merchantReason;
|
||||
/**
|
||||
* 商户信息
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private TbPlussMerchantBaseInfo merchantBaseInfo;
|
||||
/**
|
||||
* 结算信息
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private TbPlussMerchantBankCard merchantBankCard;
|
||||
|
||||
/**
|
||||
* 银行卡信息
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private TbPlussBankCard bankCard;
|
||||
|
||||
/**
|
||||
* 证件信息
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private TbPlussIdCard idCard;
|
||||
|
||||
|
||||
public TbPlussIdCard getIdCard() {
|
||||
return idCard;
|
||||
@@ -436,29 +458,6 @@ public class TbPlussUserApp implements Serializable {
|
||||
@TableField(exist = false)
|
||||
private String merchantAuditStatus;
|
||||
|
||||
/**
|
||||
* 商户信息
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private TbPlussMerchantBaseInfo merchantBaseInfo;
|
||||
/**
|
||||
* 结算信息
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private TbPlussMerchantBankCard merchantBankCard;
|
||||
|
||||
/**
|
||||
* 银行卡信息
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private TbPlussBankCard bankCard;
|
||||
|
||||
/**
|
||||
* 证件信息
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private TbPlussIdCard idCard;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Date startDate;
|
||||
|
||||
|
||||
@@ -72,6 +72,7 @@
|
||||
limit 1
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectCount" resultType="java.lang.Integer"></select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from tb_pluss_account
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
where `userId` = #{userId}
|
||||
AND `accountType` = #{type}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from tb_pluss_bank_card
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
|
||||
@@ -34,6 +34,14 @@
|
||||
where `userId` = #{userId}
|
||||
AND `userType` = #{type}
|
||||
</select>
|
||||
<select id="getLegalIdCard" resultType="com.chaozhanggui.dao.system.entity.TbPlussIdCard">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from tb_pluss_id_card
|
||||
where `userId` = #{userId}
|
||||
AND `userType` = '03'
|
||||
Limit 1
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from tb_pluss_id_card
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
@@ -180,7 +188,7 @@
|
||||
<if test="imgnegative != null">
|
||||
imgNegative = #{imgnegative,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="virtypeflag != null">
|
||||
<if test="virtypeflag != null and virtypeflag != ''">
|
||||
virTypeFlag = #{virtypeflag,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
|
||||
@@ -139,4 +139,27 @@
|
||||
aisleSwitch = #{aisleswitch,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByCodeAndType" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantImage">
|
||||
update tb_pluss_merchant_image
|
||||
<set>
|
||||
<if test="photourl != null">
|
||||
photoUrl = #{photourl,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="picurl != null">
|
||||
picUrl = #{picurl,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createdt != null">
|
||||
createDt = #{createdt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updatedt != null">
|
||||
updateDt = #{updatedt,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="aisleswitch != null">
|
||||
aisleSwitch = #{aisleswitch,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where
|
||||
merchantCode = #{merchantcode,jdbcType=VARCHAR}
|
||||
AND photoType = #{photoType,jdbcType=VARCHAR}
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -24,7 +24,12 @@
|
||||
from tb_pluss_risk_blacklist
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
<select id="selectCount" resultType="java.lang.Integer">
|
||||
select count(idcardNo)
|
||||
FROM tb_pluss_risk_blacklist
|
||||
WHERE idcardNo = #{idCardNo}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from tb_pluss_risk_blacklist
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
|
||||
@@ -467,7 +467,6 @@
|
||||
|
||||
|
||||
<select id="selectProfitByDay" resultType="java.util.Map">
|
||||
|
||||
SELECT
|
||||
d.a AS times,
|
||||
IFNULL( k.price, 0 ) AS price
|
||||
@@ -497,29 +496,9 @@
|
||||
FROM
|
||||
tb_pluss_merchant_profit o
|
||||
WHERE
|
||||
o.userId IN (
|
||||
SELECT
|
||||
p.user_id
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
@ids AS _ids,
|
||||
( SELECT @ids := GROUP_CONCAT( user_id ) FROM tb_pluss_user_promotion WHERE FIND_IN_SET( parent_user_id, @ids ) ) AS cids,
|
||||
@l := @l + 1 AS LEVEL
|
||||
FROM
|
||||
tb_pluss_user_promotion,
|
||||
( SELECT @ids := #{userId}, @l := 0 ) b
|
||||
WHERE
|
||||
@ids IS NOT NULL
|
||||
) ID,
|
||||
tb_pluss_user_promotion p
|
||||
WHERE
|
||||
FIND_IN_SET( p.user_id, ID._ids )
|
||||
ORDER BY
|
||||
user_id
|
||||
)
|
||||
GROUP BY
|
||||
o.recordDate
|
||||
o.userId = #{userId}
|
||||
GROUP BY
|
||||
o.recordDate
|
||||
) k ON d.a = k.recordDate
|
||||
</select>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user