Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
49771d2cd7
|
|
@ -19,6 +19,7 @@ import org.springframework.context.annotation.Bean;
|
|||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
|
||||
|
|
@ -33,6 +34,7 @@ import org.springframework.web.client.RestTemplate;
|
|||
@MapperScan(basePackageClasses ={Shell.class,DaoConfig.class, OssServiceConfig.class, CommonConfig.class, AliPayServiceConfig.class} )
|
||||
@ComponentScan(basePackageClasses ={ Shell.class, DaoConfig.class, OssServiceConfig.class, CommonConfig.class, AliPayServiceConfig.class})
|
||||
@Slf4j
|
||||
@Transactional
|
||||
public class Shell {
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -92,9 +92,10 @@ public class AgencyController {
|
|||
@RequestParam("agencyCode") String agencyCode,@RequestParam("pageNum") Integer pageNum,@RequestParam("pageSzie") Integer pageSize,
|
||||
@RequestParam("userType") String userType,@RequestParam("isExtend") String isExtend,
|
||||
@RequestParam("merchantCode") String merchantCode,@RequestParam("status") String status,
|
||||
@RequestParam("merchantType") String merchantType,@RequestParam("reqUserId") String reqUserId
|
||||
@RequestParam("merchantType") String merchantType,@RequestParam("reqUserId") String reqUserId,
|
||||
@RequestParam("phone") String phone
|
||||
){
|
||||
return agencyService.queryCustormFlow(userId, userType, agencyCode, isExtend,merchantCode,status,merchantType,reqUserId, pageNum, pageSize);
|
||||
return agencyService.queryCustormFlow(userId, userType, agencyCode, isExtend,merchantCode,status,merchantType,reqUserId, pageNum, pageSize,phone);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -2,8 +2,12 @@ package com.chaozhanggui.admin.system.controller;
|
|||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.chaozhanggui.admin.system.service.AccountService;
|
||||
import com.chaozhanggui.admin.system.service.MerchantInfoService;
|
||||
import com.chaozhanggui.admin.system.service.SxfMccInfoService;
|
||||
import com.chaozhanggui.common.system.config.RespBody;
|
||||
import com.chaozhanggui.dao.system.dao.TbPlussBankCodeSxfMapper;
|
||||
import com.chaozhanggui.dao.system.entity.*;
|
||||
import com.chaozhanggui.dao.system.entity.DTO.AccountDTO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
|
@ -12,7 +16,9 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author lyf
|
||||
|
|
@ -25,6 +31,12 @@ public class MerchantInfoController {
|
|||
|
||||
@Resource
|
||||
private MerchantInfoService merchantInfoService;
|
||||
@Resource
|
||||
private TbPlussBankCodeSxfMapper bankCodeSxfMapper;
|
||||
@Resource
|
||||
private SxfMccInfoService sxfMccInfoService;
|
||||
@Resource
|
||||
private AccountService accountService;
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -98,33 +110,69 @@ public class MerchantInfoController {
|
|||
public RespBody merchBaseAccount(@PathVariable("userId") Integer userId){
|
||||
return merchantInfoService.merchantAccount(userId);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取对应的银行
|
||||
*/
|
||||
@GetMapping(value = "/getBranchList")
|
||||
public Map<String, Object> getBranchList(@RequestParam("bankName")String bankName, @RequestParam("cityName")String cityName) {
|
||||
if ("浦发银行".equals(bankName)) {
|
||||
bankName = "上海浦东发展银行";
|
||||
}
|
||||
QueryWrapper<TbPlussBankCodeSxf> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("city_name", cityName);
|
||||
if (!"其他银行".equals(bankName)) {
|
||||
queryWrapper.likeLeft("bank_name", bankName);
|
||||
}
|
||||
|
||||
List<TbPlussBankCodeSxf> data = bankCodeSxfMapper.selectList(queryWrapper);
|
||||
|
||||
Map<String, Object> result = new HashMap<>(8);
|
||||
result.put("branchList", data);
|
||||
result.put("code", 200);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* mcc分页数据
|
||||
* @param current
|
||||
* @param size
|
||||
* @param keyWord
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/mccPageData")
|
||||
public RespBody pageData(@RequestParam("current")Integer current, @RequestParam("size")Integer size,@RequestParam("keyWord")String keyWord) {
|
||||
return sxfMccInfoService.pageData(current,size,keyWord);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// @PostMapping("/updateMerchantSettlement2")
|
||||
// @Transactional
|
||||
// @ResponseBody
|
||||
// public RespBody updateMerchantSettlement2(AccountDTO accountDTO) {
|
||||
// public RespBody updateMerchantSettlement2(@RequestBody 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填写结算信息!");
|
||||
//
|
||||
// // 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);
|
||||
//// }
|
||||
// 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) {
|
||||
// //修改结算人与收银台合照
|
||||
|
|
|
|||
|
|
@ -4,7 +4,9 @@ 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.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.chaozhanggui.admin.system.model.CommonError;
|
||||
import com.chaozhanggui.admin.system.util.Converter;
|
||||
import com.chaozhanggui.common.system.config.MsgException;
|
||||
import com.chaozhanggui.dao.system.dao.*;
|
||||
import com.chaozhanggui.dao.system.entity.*;
|
||||
|
|
@ -73,7 +75,7 @@ public class AccountService {
|
|||
throw new MsgException("未知的结算类型");
|
||||
}
|
||||
account = accountMapper.selectByAccount(account);
|
||||
AccountDTO accountDTO = toDTO(account);
|
||||
AccountDTO accountDTO = Converter.toDTO(account);
|
||||
TbPlussMerchantBaseInfo mbi = new TbPlussMerchantBaseInfo();
|
||||
mbi.setUserid(Integer.valueOf(userId));
|
||||
mbi = merchantBaseInfoMapper.selectByUserId(userId);
|
||||
|
|
@ -131,153 +133,31 @@ public class AccountService {
|
|||
|
||||
return accountDTO;
|
||||
}
|
||||
public AccountDTO toDTO(TbPlussAccount account) {
|
||||
if ( account == null ) {
|
||||
return null;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param accountDTO
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void saveV4(AccountDTO accountDTO) {
|
||||
TbPlussMerchantBaseInfo mbi = merchantBaseInfoMapper.selectByUserId(accountDTO.getUserid());
|
||||
if (StringUtils.isEmpty(accountDTO.getChanneltype())) {
|
||||
//D1相关
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
AccountDTO accountDTO = new AccountDTO();
|
||||
|
||||
accountDTO.setId( account.getId() );
|
||||
accountDTO.setUserid( account.getUserid() );
|
||||
accountDTO.setCertificateurl( account.getCertificateurl() );
|
||||
accountDTO.setSettletype( account.getSettletype() );
|
||||
accountDTO.setIdcardid( account.getIdcardid() );
|
||||
accountDTO.setBankcardid( account.getBankcardid() );
|
||||
accountDTO.setChanneltype( account.getChanneltype() );
|
||||
accountDTO.setCreatetime( account.getCreatetime() );
|
||||
accountDTO.setUpdatetime( account.getUpdatetime() );
|
||||
String jSONObject = account.getBak();
|
||||
if ( jSONObject != null ) {
|
||||
accountDTO.setBak( jSONObject );
|
||||
}
|
||||
accountDTO.setValid( account.getValid() );
|
||||
|
||||
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)) {
|
||||
// // 执行银行卡四要素校验
|
||||
|
|
@ -285,42 +165,8 @@ public class AccountService {
|
|||
// , 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);
|
||||
// }
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验银行卡信息是否合法
|
||||
|
|
@ -351,33 +197,29 @@ public class AccountService {
|
|||
* @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());
|
||||
// }
|
||||
//
|
||||
// }
|
||||
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());
|
||||
Integer countIdCardUsedAccount = accountMapper.selectCountIdCardId(userId,account.getIdcardid());
|
||||
if (countIdCardUsedAccount == null || countIdCardUsedAccount == 0) {
|
||||
// idCard如果没有再被使用
|
||||
idCardMapper.deleteByPrimaryKey(Integer.valueOf(account.getIdcardid()));
|
||||
}
|
||||
}
|
||||
Integer countBankCardUsedAccount = accountMapper.selectCountBankCard(account.getBankcardid(),userId);
|
||||
if (countBankCardUsedAccount == null || countBankCardUsedAccount == 0) {
|
||||
// bankCard如果没有再被使用
|
||||
bankCardMapper.deleteByPrimaryKey(Integer.valueOf(account.getBankcardid()));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -163,9 +163,9 @@ public class AgencyService {
|
|||
|
||||
public RespBody queryCustormFlow(String userId,String userType,String agencyCode,String isExtend,
|
||||
String merchantCode,String status,String merchantType,String reqUserId,
|
||||
Integer pageNum,Integer pageSize){
|
||||
Integer pageNum,Integer pageSize,String phone){
|
||||
PageHelper.startPage(pageNum, pageSize);
|
||||
List<Map<String,Object>> list=userPromotionMapper.selectOrderByUserIdOrAgecyCode(userId,userType,agencyCode,isExtend,merchantCode,status,merchantType,reqUserId);
|
||||
List<Map<String,Object>> list=userPromotionMapper.selectOrderByUserIdOrAgecyCode(userId,userType,agencyCode,isExtend,merchantCode,status,merchantType,reqUserId,phone);
|
||||
if(ObjectUtil.isNotEmpty(list)&&list.size()>0){
|
||||
list.stream().forEach(it->{
|
||||
String id= it.get("id")+"";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.chaozhanggui.admin.system.service;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
|
|
@ -28,6 +29,7 @@ import static com.chaozhanggui.dao.system.entity.TbPlussIdCard.TYPE_CERT;
|
|||
* @author lyf
|
||||
*/
|
||||
@Service
|
||||
@Transactional
|
||||
public class MerchantInfoService {
|
||||
@Resource
|
||||
private TbPlussIdCardMapper idCardMapper;
|
||||
|
|
@ -60,6 +62,9 @@ public class MerchantInfoService {
|
|||
TbPlussIdCard idCard = idCardMapper.selectCertByUserId(userId,TYPE_CERT);
|
||||
//银行卡
|
||||
TbPlussBankCard bankCard = bankCardMapper.selectByUserIdCert(userId, ACCOUNT_TYPE_CERT);
|
||||
TbPlussUserApp tbPlussUserApp = userAppMapper.selectByUserId(userId);
|
||||
map.put("status",tbPlussUserApp.getStatus());
|
||||
map.put("id",tbPlussUserApp.getId());
|
||||
map.put("idCard",idCard);
|
||||
map.put("bankCard",bankCard);
|
||||
return new RespBody("000000",map);
|
||||
|
|
@ -122,19 +127,6 @@ public class MerchantInfoService {
|
|||
}
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public RespBody updatePromoterInformation(TbPlussUserApp userApp){
|
||||
//修改推广员名称和登录账号
|
||||
TbPlussUserApp appUser = new TbPlussUserApp();
|
||||
TbPlussUserInfo userInfo = new TbPlussUserInfo();
|
||||
userInfo.setLoginname(userApp.getLoginname());
|
||||
userInfo.setPhone(userApp.getLoginname());
|
||||
userInfo.setTruename(userApp.getUsername());
|
||||
userInfo.setId(Long.valueOf(userApp.getUserid()));
|
||||
appUser.setLoginname(userApp.getLoginname());
|
||||
appUser.setUsername(userApp.getUsername());
|
||||
appUser.setUserid(userApp.getUserid());
|
||||
userAppMapper.updateByPrimaryKeySelective(appUser);
|
||||
userInfoMapper.updateByPrimaryKeySelective(userInfo);
|
||||
|
||||
if (Objects.equals(userApp.getStatus(), 3)) {
|
||||
//保存实名认证的其他信息
|
||||
UpdateWrapper<TbPlussBankCard> bankCardUpdateWrapper = new UpdateWrapper<TbPlussBankCard>().eq("userId", userApp.getUserid());
|
||||
|
|
@ -165,7 +157,7 @@ public class MerchantInfoService {
|
|||
.last("limit 1");
|
||||
TbPlussBankCodeSxf bankCodeSxf = bankCodeSxfMapper.selectOne(sxfQueryWrapper);
|
||||
if (bankCodeSxf == null) {
|
||||
throw new MsgException("未找到支行信息");
|
||||
return new RespBody("000072");
|
||||
}
|
||||
userApp.getBankCard().setContactline(bankCodeSxf.getCnapsCode());
|
||||
bankCardMapper.updateByPrimaryKeySelective(userApp.getBankCard());
|
||||
|
|
@ -179,6 +171,23 @@ public class MerchantInfoService {
|
|||
userApp.getIdCard().setVirtypeflag("");
|
||||
idCardMapper.updateByPrimaryKeySelective(userApp.getIdCard());
|
||||
}
|
||||
//修改推广员名称和登录账号
|
||||
TbPlussUserApp appUser = userAppMapper.selectByUserId(userApp.getUserid());
|
||||
|
||||
TbPlussUserInfo userInfo = userInfoMapper.selectByPrimaryKey(userApp.getUserid().longValue());
|
||||
if(ObjectUtil.isEmpty(appUser)||ObjectUtil.isEmpty(userInfo)){
|
||||
return new RespBody("000001");
|
||||
}
|
||||
|
||||
userInfo.setLoginname(userApp.getLoginname());
|
||||
userInfo.setPhone(userApp.getLoginname());
|
||||
userInfo.setTruename(userApp.getUsername());
|
||||
userInfo.setId(Long.valueOf(userApp.getUserid()));
|
||||
appUser.setLoginname(userApp.getLoginname());
|
||||
appUser.setUsername(userApp.getUsername());
|
||||
appUser.setUserid(userApp.getUserid());
|
||||
// userAppMapper.updateByPrimaryKey(appUser);
|
||||
// userInfoMapper.updateByPrimaryKey(userInfo);
|
||||
return new RespBody("000000");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,29 @@
|
|||
package com.chaozhanggui.admin.system.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.chaozhanggui.common.system.config.RespBody;
|
||||
import com.chaozhanggui.dao.system.dao.TbPlussBankCodeSxfMapper;
|
||||
import com.chaozhanggui.dao.system.dao.TbPlussSxfMccInfoMapper;
|
||||
import com.chaozhanggui.dao.system.entity.TbPlussSxfMccInfo;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @author lyf
|
||||
*/
|
||||
@Service
|
||||
public class SxfMccInfoService{
|
||||
@Resource
|
||||
private TbPlussBankCodeSxfMapper bankCodeSxfMapper;
|
||||
|
||||
public RespBody pageData(Integer current, Integer size,String keyWord){
|
||||
current = (current-1)*size;
|
||||
return new RespBody("000000",bankCodeSxfMapper.pageData(current,size,keyWord));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
package com.chaozhanggui.admin.system.util;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.chaozhanggui.dao.system.entity.DTO.AccountDTO;
|
||||
import com.chaozhanggui.dao.system.entity.TbPlussAccount;
|
||||
|
||||
public class Converter {
|
||||
public static TbPlussAccount toEntity(AccountDTO accountDTO) {
|
||||
if ( accountDTO == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
TbPlussAccount account = new TbPlussAccount();
|
||||
|
||||
account.setId( accountDTO.getId() );
|
||||
account.setUserid( accountDTO.getUserid() );
|
||||
account.setCertificateurl( accountDTO.getCertificateurl() );
|
||||
account.setSettletype( accountDTO.getSettletype() );
|
||||
account.setIdcardid( accountDTO.getIdcardid() );
|
||||
account.setBankcardid( accountDTO.getBankcardid() );
|
||||
account.setChanneltype( accountDTO.getChanneltype() );
|
||||
account.setCreatetime( accountDTO.getCreatetime() );
|
||||
account.setCreateTimeStart( accountDTO.getCreateTimeStart() );
|
||||
account.setCreateTimeEnd( accountDTO.getCreateTimeEnd() );
|
||||
account.setUpdatetime( accountDTO.getUpdatetime() );
|
||||
account.setUpdateTimeStart( accountDTO.getUpdateTimeStart() );
|
||||
account.setUpdateTimeEnd( accountDTO.getUpdateTimeEnd() );
|
||||
String jSONObject = accountDTO.getBak();
|
||||
if ( jSONObject != null ) {
|
||||
account.setBak( new String( jSONObject ) );
|
||||
}
|
||||
account.setValid( accountDTO.getValid() );
|
||||
|
||||
return account;
|
||||
}
|
||||
public static AccountDTO toDTO(TbPlussAccount account) {
|
||||
if ( account == null ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
AccountDTO accountDTO = new AccountDTO();
|
||||
|
||||
accountDTO.setId( account.getId() );
|
||||
accountDTO.setUserid( account.getUserid() );
|
||||
accountDTO.setCertificateurl( account.getCertificateurl() );
|
||||
accountDTO.setSettletype( account.getSettletype() );
|
||||
accountDTO.setIdcardid( account.getIdcardid() );
|
||||
accountDTO.setBankcardid( account.getBankcardid() );
|
||||
accountDTO.setChanneltype( account.getChanneltype() );
|
||||
accountDTO.setCreatetime( account.getCreatetime() );
|
||||
accountDTO.setCreateTimeStart( account.getCreateTimeStart() );
|
||||
accountDTO.setCreateTimeEnd( account.getCreateTimeEnd() );
|
||||
accountDTO.setUpdatetime( account.getUpdatetime() );
|
||||
accountDTO.setUpdateTimeStart( account.getUpdateTimeStart() );
|
||||
accountDTO.setUpdateTimeEnd( account.getUpdateTimeEnd() );
|
||||
String jSONObject = account.getBak();
|
||||
if ( jSONObject != null ) {
|
||||
accountDTO.setBak( new String( jSONObject ) );
|
||||
}
|
||||
accountDTO.setValid( account.getValid() );
|
||||
|
||||
return accountDTO;
|
||||
}
|
||||
}
|
||||
|
|
@ -76,6 +76,7 @@ public class ExceptionUtil {
|
|||
|
||||
map.put("000070","对应字典项不匹配");
|
||||
map.put("000071","支付宝资金不足");
|
||||
map.put("000072","未找到支行信息");
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -25,5 +25,7 @@ public interface TbPlussAccountMapper {
|
|||
|
||||
int updateByPrimaryKey(TbPlussAccount record);
|
||||
|
||||
Integer selectCount(String idCardId,String userId);
|
||||
Integer selectCountIdCardId(@Param("idCardId")String idCardId, @Param("userId")String userId);
|
||||
|
||||
Integer selectCountBankCard(@Param("bankCardId")String bankCardId, @Param("userId")String userId);
|
||||
}
|
||||
|
|
@ -12,7 +12,7 @@ import org.springframework.stereotype.Component;
|
|||
*/
|
||||
@Component
|
||||
@Mapper
|
||||
public interface TbPlussBankCardMapper extends IService<TbPlussBankCard> {
|
||||
public interface TbPlussBankCardMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(TbPlussBankCard record);
|
||||
|
|
@ -25,4 +25,6 @@ public interface TbPlussBankCardMapper extends IService<TbPlussBankCard> {
|
|||
int updateByPrimaryKeySelective(TbPlussBankCard record);
|
||||
|
||||
int updateByPrimaryKey(TbPlussBankCard record);
|
||||
|
||||
Integer selectCount(@Param("bankCardId")String bankCardId, @Param("userId")String userId);
|
||||
}
|
||||
|
|
@ -3,9 +3,13 @@ package com.chaozhanggui.dao.system.dao;
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.chaozhanggui.dao.system.entity.TbPlussBankCodeSxf;
|
||||
|
||||
import com.chaozhanggui.dao.system.entity.TbPlussSxfMccInfo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
@Mapper
|
||||
public interface TbPlussBankCodeSxfMapper extends BaseMapper<TbPlussBankCodeSxf> {
|
||||
|
|
@ -17,6 +21,8 @@ public interface TbPlussBankCodeSxfMapper extends BaseMapper<TbPlussBankCodeSxf>
|
|||
|
||||
TbPlussBankCodeSxf selectByPrimaryKey(Integer id);
|
||||
|
||||
List<TbPlussSxfMccInfo> pageData(@Param("current") Integer current, @Param("size") Integer size, @Param("keyWord") String keyWord);
|
||||
|
||||
int updateByPrimaryKeySelective(TbPlussBankCodeSxf record);
|
||||
|
||||
int updateByPrimaryKey(TbPlussBankCodeSxf record);
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import org.springframework.stereotype.Component;
|
|||
|
||||
@Component
|
||||
@Mapper
|
||||
public interface TbPlussIdCardMapper extends IService<TbPlussIdCard> {
|
||||
public interface TbPlussIdCardMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(TbPlussIdCard record);
|
||||
|
|
|
|||
|
|
@ -35,6 +35,8 @@ public interface TbPlussMerchantChannelStatusMapper {
|
|||
|
||||
TbPlussMerchantChannelStatus getValidData(String merchantCode);
|
||||
|
||||
Integer selectCount(TbPlussMerchantChannelStatus record);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -29,7 +29,8 @@ public interface TbPlussUserPromotionMapper {
|
|||
|
||||
|
||||
|
||||
List<Map<String,Object>> selectOrderByUserIdOrAgecyCode(@Param("userId") String userId,@Param("userType") String userType,@Param("agencyCode") String agencyCode,@Param("isExtend") String isExtend, @Param("merchantCode") String merchantCode,@Param("status") String status, @Param("merchantType") String merchantType,@Param("reqUserId") String reqUserId);
|
||||
List<Map<String,Object>> selectOrderByUserIdOrAgecyCode(@Param("userId") String userId,@Param("userType") String userType,@Param("agencyCode") String agencyCode,@Param("isExtend") String isExtend, @Param("merchantCode") String merchantCode,
|
||||
@Param("status") String status, @Param("merchantType") String merchantType,@Param("reqUserId") String reqUserId,@Param("phone")String phone);
|
||||
|
||||
Map<String,Object> selectByUserId(String userId);
|
||||
|
||||
|
|
|
|||
|
|
@ -50,6 +50,27 @@ public class TbPlussAccount implements Serializable {
|
|||
|
||||
private String channeltype;
|
||||
|
||||
/**
|
||||
* 创建时间 开始时间
|
||||
*/
|
||||
@TableField(select = false, value = "createTime")
|
||||
private Date createTimeStart;
|
||||
|
||||
/**
|
||||
* 创建时间 截止时间
|
||||
*/
|
||||
@TableField(select = false, value = "createTime")
|
||||
private Date createTimeEnd;
|
||||
|
||||
@TableField(select = false, value = "updateTime")
|
||||
private Date updateTimeStart;
|
||||
|
||||
/**
|
||||
* 更新时间 截止时间
|
||||
*/
|
||||
@TableField(select = false, value = "updateTime")
|
||||
private Date updateTimeEnd;
|
||||
|
||||
private Integer valid;
|
||||
|
||||
private String bak;
|
||||
|
|
@ -143,4 +164,36 @@ public class TbPlussAccount implements Serializable {
|
|||
public void setBak(String bak) {
|
||||
this.bak = bak == null ? null : bak.trim();
|
||||
}
|
||||
|
||||
public Date getCreateTimeStart() {
|
||||
return createTimeStart;
|
||||
}
|
||||
|
||||
public void setCreateTimeStart(Date createTimeStart) {
|
||||
this.createTimeStart = createTimeStart;
|
||||
}
|
||||
|
||||
public Date getCreateTimeEnd() {
|
||||
return createTimeEnd;
|
||||
}
|
||||
|
||||
public void setCreateTimeEnd(Date createTimeEnd) {
|
||||
this.createTimeEnd = createTimeEnd;
|
||||
}
|
||||
|
||||
public Date getUpdateTimeStart() {
|
||||
return updateTimeStart;
|
||||
}
|
||||
|
||||
public void setUpdateTimeStart(Date updateTimeStart) {
|
||||
this.updateTimeStart = updateTimeStart;
|
||||
}
|
||||
|
||||
public Date getUpdateTimeEnd() {
|
||||
return updateTimeEnd;
|
||||
}
|
||||
|
||||
public void setUpdateTimeEnd(Date updateTimeEnd) {
|
||||
this.updateTimeEnd = updateTimeEnd;
|
||||
}
|
||||
}
|
||||
|
|
@ -51,6 +51,42 @@ public class TbPlussBankCard implements Serializable {
|
|||
private Date createtime;
|
||||
|
||||
private Date updatetime;
|
||||
/**
|
||||
* 省码
|
||||
*/
|
||||
private String branchProvinceCode;
|
||||
/**
|
||||
* 市码
|
||||
*/
|
||||
private String branchCityCode;
|
||||
/**
|
||||
* 区码
|
||||
*/
|
||||
private String branchAreaCode;
|
||||
|
||||
public String getBranchProvinceCode() {
|
||||
return branchProvinceCode;
|
||||
}
|
||||
|
||||
public void setBranchProvinceCode(String branchProvinceCode) {
|
||||
this.branchProvinceCode = branchProvinceCode;
|
||||
}
|
||||
|
||||
public String getBranchCityCode() {
|
||||
return branchCityCode;
|
||||
}
|
||||
|
||||
public void setBranchCityCode(String branchCityCode) {
|
||||
this.branchCityCode = branchCityCode;
|
||||
}
|
||||
|
||||
public String getBranchAreaCode() {
|
||||
return branchAreaCode;
|
||||
}
|
||||
|
||||
public void setBranchAreaCode(String branchAreaCode) {
|
||||
this.branchAreaCode = branchAreaCode;
|
||||
}
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
|
|
|||
|
|
@ -72,7 +72,30 @@
|
|||
limit 1
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectCount" resultType="java.lang.Integer"></select>
|
||||
<select id="selectCountIdCardId" resultType="java.lang.Integer">
|
||||
SELECT COUNT( 1 )
|
||||
FROM tb_pluss_account
|
||||
<where>
|
||||
<if test="userId != null">
|
||||
userId = #{userId}
|
||||
</if>
|
||||
<if test="idCardId!= null">
|
||||
and idcardId = #{idCardId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="selectCountBankCard" resultType="java.lang.Integer">
|
||||
SELECT COUNT( 1 )
|
||||
FROM tb_pluss_account
|
||||
<where>
|
||||
<if test="userId != null">
|
||||
userId = #{userId}
|
||||
</if>
|
||||
<if test="bankCardId!= null">
|
||||
and bankCardId = #{bankCardId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from tb_pluss_account
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
|
|
|
|||
|
|
@ -19,11 +19,14 @@
|
|||
<result column="licenseUrl" jdbcType="VARCHAR" property="licenseurl" />
|
||||
<result column="createTime" jdbcType="TIMESTAMP" property="createtime" />
|
||||
<result column="updateTime" jdbcType="TIMESTAMP" property="updatetime" />
|
||||
<result column="branchProvinceCode" jdbcType="VARCHAR" property="branchProvinceCode" />
|
||||
<result column="branchCityCode" jdbcType="VARCHAR" property="branchCityCode" />
|
||||
<result column="branchAreaCode" jdbcType="VARCHAR" property="branchAreaCode" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, userId, bankHolder, bankCardNo, bankName, branchName, accountType, contactLine,
|
||||
branchProvince, branchCity, branchArea, bankAddressNo, phone, imgUrl, licenseUrl,
|
||||
createTime, updateTime
|
||||
createTime, updateTime,branchProvinceCode,branchCityCode,branchAreaCode
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
select
|
||||
|
|
@ -38,6 +41,19 @@
|
|||
where `userId` = #{userId}
|
||||
AND `accountType` = #{type}
|
||||
</select>
|
||||
<select id="selectCount" resultType="java.lang.Integer">
|
||||
SELECT COUNT( 1 )
|
||||
FROM tb_pluss_bank_card
|
||||
<where>
|
||||
<if test="userId != null">
|
||||
userId = #{userId}
|
||||
</if>
|
||||
<if test="bankCardId!= null">
|
||||
and idcardId = #{bankCardId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from tb_pluss_bank_card
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
|
|
@ -216,6 +232,15 @@
|
|||
<if test="updatetime != null">
|
||||
updateTime = #{updatetime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="branchProvinceCode != null">
|
||||
branchProvinceCode = #{branchProvinceCode},
|
||||
</if>
|
||||
<if test="branchCityCode != null">
|
||||
branchCityCode = #{branchCityCode},
|
||||
</if>
|
||||
<if test="branchAreaCode != null">
|
||||
branchAreaCode = #{branchAreaCode},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
|
|
|
|||
|
|
@ -23,7 +23,20 @@
|
|||
from tb_pluss_bank_code_sxf
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
<select id="pageData" resultType="com.chaozhanggui.dao.system.entity.TbPlussSxfMccInfo">
|
||||
SELECT F_ID AS fId, F_mcc_code AS fMccCode, F_grandpa_txt AS fGrandpaTxt, F_father_txt AS fFatherTxt, F_mcc_txt AS fMccTxt, F_mcc_type AS fMccType
|
||||
FROM tb_pluss_sxf_mcc_info
|
||||
<where>
|
||||
F_mcc_type != '线上'
|
||||
<if test="keyWord != null and keyWord != ''">
|
||||
AND F_grandpa_txt LIKE #{keyWord}
|
||||
OR F_mcc_txt LIKE #{keyWord}
|
||||
OR F_father_txt LIKE #{keyWord}
|
||||
</if>
|
||||
</where>
|
||||
LIMIT #{size} offSET #{current}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from tb_pluss_bank_code_sxf
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
|
|
|
|||
|
|
@ -396,4 +396,17 @@
|
|||
and authorizationStatus="1"
|
||||
order by valid desc, id asc limit 1
|
||||
</select>
|
||||
<select id="selectCount" resultType="java.lang.Integer">
|
||||
SELECT COUNT( id )
|
||||
FROM tb_pluss_merchant_channel_status
|
||||
<where>
|
||||
<if test="status !=null and status !=''">
|
||||
status = #{status}
|
||||
</if>
|
||||
<if test="thirdstatus !=null and thirdstatus !=''">
|
||||
and thirdstatus = #{thirdstatus}
|
||||
</if>
|
||||
</where>
|
||||
order by id desc
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -397,6 +397,9 @@
|
|||
<if test="reqUserId != null and reqUserId!=''">
|
||||
and p.user_id = #{reqUserId}
|
||||
</if>
|
||||
<if test="phone != null and phone != ''">
|
||||
and u.phone = #{phone}
|
||||
</if>
|
||||
ORDER BY
|
||||
user_id desc
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue