创客审核相关,关闭定时任务,更改实名信息

This commit is contained in:
liuyingfang
2023-08-23 10:20:10 +08:00
parent 1d0655f4ef
commit 96df607aa4
30 changed files with 844 additions and 165 deletions

View File

@@ -180,10 +180,11 @@ public class AgencyController {
* @param remark 驳回备注
* @return
*/
@GetMapping("updateUserMark")
public RespBody moddifyMark(@RequestHeader("loginName") String loginName, @RequestHeader("token") String token, @RequestHeader("userId") String userId,
@RequestParam("id") String id, @RequestParam("status") String status,@RequestParam("remark") String remark
@RequestParam("id") Integer id, @RequestParam("status") String status,@RequestParam("remark") String remark
){
return null;
return agencyService.updateUserMark(id,status,remark);
}

View File

@@ -2,6 +2,9 @@ package com.chaozhanggui.admin.system.controller;
import com.chaozhanggui.admin.system.service.MerchantInfoService;
import com.chaozhanggui.common.system.config.RespBody;
import com.chaozhanggui.dao.system.entity.TbPlussBankCard;
import com.chaozhanggui.dao.system.entity.TbPlussIdCard;
import com.chaozhanggui.dao.system.entity.TbPlussMerchantImage;
import com.chaozhanggui.dao.system.entity.TbPlussUserApp;
import lombok.extern.slf4j.Slf4j;
import org.springframework.transaction.annotation.Transactional;
@@ -31,22 +34,45 @@ public class MerchantInfoController {
return merchantInfoService.merchantReal(userId);
}
// /**
// * 更改实名认证信息
// * @param userApp
// * @return
// */
// @PostMapping("/updatePromoterInformation")
// @Transactional
/**
* 更改实名认证信息
* @param userApp
* @return
*/
@PostMapping("/updatePromoterInformation")
public RespBody updatePromoterInformation(@RequestBody TbPlussUserApp userApp){
if (userApp == null){
log.error("参数错误");
return new RespBody("000019");
}
return merchantInfoService.updatePromoterInformation(userApp);
}
// @PostMapping("/updateMerchantInformation")
// @ResponseBody
// public RespBody updatePromoterInformation(TbPlussUserApp userApp){
// if (userApp == null){
// public RespBody updateMerchantInformation(TbPlussUserApp userApp, TbPlussMerchantImage merchantImage){
// if (userApp == null || merchantImage == null){
// log.error("参数错误");
// return new RespBody("000019");
// }
// return merchantInfoService.updatePromoterInformation(userApp);
// return merchantInfoService.updateMerchantInformation(userApp,merchantImage);
// }
@PostMapping("/updateIdCard")
public RespBody updateIdCard(@RequestBody TbPlussIdCard idCard){
if (idCard == null){
log.error("参数错误");
return new RespBody("000019");
}
return merchantInfoService.updateIdCard(idCard);
}
@PostMapping("/updateBankCard")
public RespBody updateBankCard(@RequestBody TbPlussBankCard bankCard){
if (bankCard == null){
log.error("参数错误");
return new RespBody("000019");
}
return merchantInfoService.updateBankCard(bankCard);
}
/**
* 商户基本信息
* @param userId

View File

@@ -0,0 +1,148 @@
package com.chaozhanggui.admin.system.service;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
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.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
/**
* @author lyf
*/
@Service
@Slf4j
public class AccountService {
@Resource
private TbPlussAccountMapper accountMapper;
@Resource
private TbPlussBankCardMapper bankCardMapper;
@Resource
private TbPlussIdCardMapper idCardMapper;
@Resource
private TbPlussMerchantBaseInfoMapper merchantBaseInfoMapper;
@Resource
private TbPlussUserAppMapper userAppMapper;
@Resource
private TbPlussMerchantImageMapper merchantImageMapper;
@Resource
private TbPlussMerchantChannelStatusMapper merchantChannelStatusMapper;
public AccountDTO getRealAccount(String userId) {
return getRealAccount(userId, TbPlussAccount.CHANNEL_TYPE_D1);
}
public AccountDTO getRealAccount(String userId, String channelType) {
if (!TbPlussAccount.CHANNEL_TYPE_D1.equals(channelType) && !TbPlussAccount.CHANNEL_TYPE_D0.equals(channelType)) {
throw new MsgException("未知的通道类型");
}
TbPlussAccount account = new TbPlussAccount();
account.setUserid(userId);
account.setChanneltype(channelType);
return getRealAccount(account);
}
public AccountDTO getRealAccount(TbPlussAccount account) {
String userId = account.getUserid();
if (account.getChanneltype() == null) {
throw new MsgException("缺少结算通道类型");
}
List<String> bloomFilter = new ArrayList<>(2);
bloomFilter.add(TbPlussAccount.CHANNEL_TYPE_D0);
bloomFilter.add(TbPlussAccount.CHANNEL_TYPE_D1);
if (!bloomFilter.contains(account.getChanneltype())) {
throw new MsgException("未知的结算类型");
}
account = accountMapper.selectByAccount(account);
AccountDTO accountDTO = toDTO(account);
TbPlussMerchantBaseInfo mbi = new TbPlussMerchantBaseInfo();
mbi.setUserid(Integer.valueOf(userId));
mbi = merchantBaseInfoMapper.selectByUserId(userId);
if (mbi == null) {
return null;
}
// 用户不存在结算信息
String merchantType = mbi.getMerchanttype();
if (account == null && "1".equals(merchantType)) {
AccountDTO result = new AccountDTO();
result.setUserid(String.valueOf(mbi.getUserid()));
result.setSettletype(TbPlussAccount.SETTLE_TYPE_MICRO_STORE);
return result;
}
// 异或,小微但结算信息不是小微,非小微但结算信息是小微
if (account == null || "1".equals(merchantType) ^ account.getSettletype().equals(TbPlussAccount.SETTLE_TYPE_MICRO_STORE)) {
return null;
}
// 获取身份证信息
TbPlussIdCard idCard = idCardMapper.selectByPrimaryKey(Integer.valueOf(account.getIdcardid()));
accountDTO.setIdcard(idCard);
// 获取银行卡信息
TbPlussBankCard bankCard = bankCardMapper.selectByPrimaryKey(Integer.valueOf(account.getBankcardid()));
accountDTO.setBankCard(bankCard);
if (account.getSettletype() == null) {
throw new MsgException("未知结算类型");
}
Optional.ofNullable(account.getSettletype()).ifPresent(s -> {
if (s.startsWith(TbPlussAccount.SETTLE_TYPE_PRIVATE_ILLEGAL)) {
TbPlussUserApp userApp = userAppMapper.selectByUserId(Integer.valueOf(userId));
TbPlussMerchantImage merchantImage = new TbPlussMerchantImage();
merchantImage.setMerchantcode(userApp.getMerchantcode());
merchantImage.setPhotoType(TbPlussMerchantImage.NON_LEG_SETTLE_AUTH);
merchantImage = merchantImageMapper.selectByMerchantCodeType(userApp.getMerchantcode(), TbPlussMerchantImage.NON_LEG_SETTLE_AUTH);
Optional.ofNullable(merchantImage).ifPresent(v -> accountDTO.setCertificateurl(v.getPicurl()));
}
});
TbPlussMerchantChannelStatus mcs = merchantChannelStatusMapper.getByMerchantCodeAndChannelType(mbi.getMerchantcode(), account.getChanneltype());
if (mcs == null || !TbPlussMerchantChannelStatus.AUDIT_STATUS_DATA_EDIT.equals(mcs.getStatus())) {
account.setBak(null);
}
return accountDTO;
}
public 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.setUpdatetime( account.getUpdatetime() );
String jSONObject = account.getBak();
if ( jSONObject != null ) {
accountDTO.setBak( jSONObject );
}
accountDTO.setValid( account.getValid() );
return accountDTO;
}
}

View File

@@ -17,7 +17,9 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestParam;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.*;
@@ -47,6 +49,8 @@ public class AgencyService {
@Autowired
TbPlussMerchantBaseInfoMapper tbPlussMerchantBaseInfoMapper;
@Resource
private TbPlussUserMarkerMapper userMarkerMapper;
@@ -336,6 +340,38 @@ public class AgencyService {
PageInfo pageInfo=new PageInfo(list);
return new RespBody("000000",pageInfo);
}
@Transactional(rollbackFor = Exception.class)
public RespBody updateUserMark(Integer id, String status, String remark){
TbPlussUserPromotion userPromotion = userPromotionMapper.selectByPrimaryKey(id);
if (ObjectUtil.isEmpty(userPromotion)){
log.error("用户角色信息不存在");
return new RespBody("999940");
}
//是否允许推广 1 初级创客 0 不允许 2 高级创客 3.审核中4通过5驳回
if ( "5".equals(userPromotion.getIsExtend())){
log.error("不允许成为创客");
return new RespBody("999941");
}
if ("1".equals(userPromotion.getIsExtend()) || "4".equals(userPromotion.getIsExtend())){
log.error("已成为创客或者正在审核中");
return new RespBody("999942");
}
TbPlussUserPromotion tbPlussUserPromotion = new TbPlussUserPromotion();
tbPlussUserPromotion.setUserId(id);
tbPlussUserPromotion.setIsExtend(status);
tbPlussUserPromotion.setUpdateTime(new Date());
int i = userPromotionMapper.updateByPrimaryKeySelective(tbPlussUserPromotion);
TbPlussUserMarker userMarker = new TbPlussUserMarker();
userMarker.setUserId(id);
userMarker.setStatus(status);
int u = userMarkerMapper.updateByPrimaryKeySelective(userMarker);
if (i>0 && u>0 ){
return new RespBody("000000");
}
return new RespBody("999943");
}
public RespBody modifyMark(String userId,String id,String status,String remark){
if(ObjectUtil.isEmpty(id)||ObjectUtil.isEmpty(status)){

View File

@@ -1,16 +1,18 @@
package com.chaozhanggui.admin.system.service;
import com.alipay.api.domain.AccountDTO;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.chaozhanggui.common.system.config.MsgException;
import com.chaozhanggui.common.system.config.RespBody;
import com.chaozhanggui.dao.system.dao.*;
import com.chaozhanggui.dao.system.entity.*;
import com.chaozhanggui.dao.system.entity.DTO.AccountDTO;
import com.chaozhanggui.dao.system.entity.VO.AccountVO;
import com.chaozhanggui.dao.system.entity.VO.MerchantBaseVO;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.HashMap;
@@ -43,6 +45,13 @@ public class MerchantInfoService {
private TbPlussUserInfoMapper userInfoMapper;
@Resource
private TbPlussUserAppMapper userAppMapper;
@Resource
private AccountService accountService;
@Resource
private TbPlussAreaCityMapper areaCityMapper;
@Resource
private TbPlussBankCodeSxfMapper bankCodeSxfMapper;
public RespBody merchantReal(Integer userId){
@@ -111,60 +120,145 @@ public class MerchantInfoService {
}
return map;
}
@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);
// 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());
// appUser.setLoginname(userApp.getLoginname());
// appUser.setUsername(userApp.getUsername());
// userAppMapper.updateByPrimaryKeySelective(appUser);
// userInfoMapper.updateByPrimaryKeySelective(userInfo);
//
// if (Objects.equals(userApp.getStatus(), 3)) {
// //判断实名人与结算人是否为同一人
// AccountDTO accountDTO = this.getRealAccount(userApp.getBankCard().getUserid());
// if (accountDTO == null || accountDTO.getIdcard() == null || !userApp.getIdCard().getCertNo().equals(accountDTO.getIdcard().getCertNo())) {
// bankCardUpdateWrapper.eq("accountType", BankCard.ACCOUNT_TYPE_CERT);
// }
// if ("".equals(userApp.getBankCard().getImgUrl())) {
// userApp.getBankCard().setImgUrl(null);
// }
// QueryWrapper<AreaCity> areaCityQueryWrapper = new QueryWrapper<AreaCity>().
// in("areaCode", userApp.getBankCard().getBranchProvince(),
// userApp.getBankCard().getBranchCity(), userApp.getBankCard().getBranchArea());
// List<AreaCity> areaCityList = areaCityMapper.selectList(areaCityQueryWrapper);
// for (AreaCity areaCity : areaCityList) {
if (Objects.equals(userApp.getStatus(), 3)) {
//保存实名认证的其他信息
UpdateWrapper<TbPlussBankCard> bankCardUpdateWrapper = new UpdateWrapper<TbPlussBankCard>().eq("userId", userApp.getUserid());
//判断实名人与结算人是否为同一人
AccountDTO accountDTO = accountService.getRealAccount(userApp.getBankCard().getUserid());
if (accountDTO == null || accountDTO.getIdcard() == null || !userApp.getIdCard().getCertno().equals(accountDTO.getIdcard().getCertno())) {
bankCardUpdateWrapper.eq("accountType", TbPlussBankCard.ACCOUNT_TYPE_CERT);
}
if ("".equals(userApp.getBankCard().getImgurl())) {
userApp.getBankCard().setImgurl(null);
}
QueryWrapper<TbPlussAreaCity> areaCityQueryWrapper = new QueryWrapper<TbPlussAreaCity>().
in("areaCode", userApp.getBankCard().getBranchprovince(),
userApp.getBankCard().getBranchcity(), userApp.getBankCard().getBrancharea());
List<TbPlussAreaCity> areaCityList = areaCityMapper.selectList(areaCityQueryWrapper);
for (TbPlussAreaCity areaCity : areaCityList) {
if ("1".equals(areaCity.getType())) {
userApp.getBankCard().setBranchprovince(areaCity.getAreaname());
} else if ("2".equals(areaCity.getType())) {
userApp.getBankCard().setBranchcity(areaCity.getAreaname());
} else if ("3".equals(areaCity.getType()) || "4".equals(areaCity.getType())) {
userApp.getBankCard().setBrancharea(areaCity.getAreaname());
}
}
LambdaQueryWrapper<TbPlussBankCodeSxf> sxfQueryWrapper = new LambdaQueryWrapper<TbPlussBankCodeSxf>()
.eq(StringUtils.isNotEmpty(userApp.getBankCard().getContactline()), TbPlussBankCodeSxf::getCnapsCode, userApp.getBankCard().getContactline())
.eq(StringUtils.isNotEmpty(userApp.getBankCard().getBranchname()), TbPlussBankCodeSxf::getCnapsName, userApp.getBankCard().getBranchname())
.last("limit 1");
TbPlussBankCodeSxf bankCodeSxf = bankCodeSxfMapper.selectOne(sxfQueryWrapper);
if (bankCodeSxf == null) {
throw new MsgException("未找到支行信息");
}
userApp.getBankCard().setContactline(bankCodeSxf.getCnapsCode());
bankCardMapper.update(userApp.getBankCard(), bankCardUpdateWrapper);
UpdateWrapper<TbPlussIdCard> idCardUpdateWrapper = new UpdateWrapper<TbPlussIdCard>().eq("userId", userApp.getUserid()).eq("userType", TbPlussIdCard.TYPE_CERT);
if ("".equals(userApp.getIdCard().getImgpositive())) {
userApp.getIdCard().setImgpositive(null);
}
if ("".equals(userApp.getIdCard().getImgnegative())) {
userApp.getIdCard().setImgnegative(null);
}
idCardMapper.update(userApp.getIdCard(), idCardUpdateWrapper);
}
return new RespBody("000000");
}
public RespBody updateIdCard(TbPlussIdCard idCard){
int i = idCardMapper.updateByPrimaryKeySelective(idCard);
if (i > 0) {
return new RespBody("000000");
}
return new RespBody("999943");
}
public RespBody updateBankCard(TbPlussBankCard bankCard){
int i = bankCardMapper.updateByPrimaryKeySelective(bankCard);
if (i > 0) {
return new RespBody("000000");
}
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.getBankCard().setBranchProvince(areaCity.getAreaName());
// userApp.getMerchantBaseInfo().setProvince(areaCity.getAreaname());
// } else if ("2".equals(areaCity.getType())) {
// userApp.getBankCard().setBranchCity(areaCity.getAreaName());
// userApp.getMerchantBaseInfo().setCity(areaCity.getAreaname());
// } else if ("3".equals(areaCity.getType()) || "4".equals(areaCity.getType())) {
// userApp.getBankCard().setBranchArea(areaCity.getAreaName());
// userApp.getMerchantBaseInfo().setDistrict(areaCity.getAreaname());
// }
// }
// LambdaQueryWrapper<BankCodeSxf> sxfQueryWrapper = new LambdaQueryWrapper<BankCodeSxf>()
// .eq(StringUtils.isNotEmpty(userApp.getBankCard().getContactLine()), BankCodeSxf::getCnapsCode, userApp.getBankCard().getContactLine())
// .eq(StringUtils.isNotEmpty(userApp.getBankCard().getBranchName()), BankCodeSxf::getCnapsName, userApp.getBankCard().getBranchName())
// .last("limit 1");
// BankCodeSxf bankCodeSxf = bankCodeSxfMapper.selectOne(sxfQueryWrapper);
// if (bankCodeSxf == null) {
// throw new MsgException("未找到支行信息");
// }
// userApp.getBankCard().setContactLine(bankCodeSxf.getCnapsCode());
// bankCardService.update(userApp.getBankCard(), bankCardUpdateWrapper);
// UpdateWrapper<IdCard> idCardUpdateWrapper = new UpdateWrapper<IdCard>().eq("userId", userApp.getUserId()).eq("userType", IdCard.TYPE_CERT);
// if ("".equals(userApp.getIdCard().getImgPositive())) {
// userApp.getIdCard().setImgPositive(null);
// }
// if ("".equals(userApp.getIdCard().getImgNegative())) {
// userApp.getIdCard().setImgNegative(null);
// }
// idCardService.update(userApp.getIdCard(), idCardUpdateWrapper);
// 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");
// }
}

View File

@@ -25,7 +25,7 @@ public class CustomerTask {
@Autowired
private TbPlussUserPromotionMapper tbPlussUserPromotionMapper;
@Scheduled(initialDelay = 6000,fixedDelay = 1800000)
public void customerTask(){
List<TaskOrderSum> list= tbPlussMerchantOrderMapper.selectByUserId();
if(ObjectUtil.isEmpty(list)||list.size()<=0){

View File

@@ -108,6 +108,10 @@ public class ExceptionUtil {
map.put("999977","赠送活动异常");
map.put("999976","解析异常");
map.put("999950","execl异常");
map.put("999940","用户角色信息不存在");
map.put("999941","不允许成为创客");
map.put("999942","已成为创客或者正在审核中");
map.put("999943","失败");
}
}

View File

@@ -39,6 +39,12 @@
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.5.1</version>
</dependency>
<dependency>
<groupId>com.chaozhanggui.system</groupId>
<artifactId>common-api</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
</dependencies>

View File

@@ -17,6 +17,7 @@ public interface TbPlussAccountMapper {
TbPlussAccount selectByPrimaryKey(Integer id);
TbPlussAccount selectByUser(@Param("userId") Integer userId, @Param("channelType")String channelType);
TbPlussAccount selectByAccount(TbPlussAccount record);
int updateByPrimaryKeySelective(TbPlussAccount record);

View File

@@ -1,5 +1,7 @@
package com.chaozhanggui.dao.system.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.chaozhanggui.dao.system.entity.TbPlussArea;
import com.chaozhanggui.dao.system.entity.TbPlussAreaCity;
import org.apache.ibatis.annotations.Mapper;
@@ -7,7 +9,7 @@ import org.springframework.stereotype.Component;
@Component
@Mapper
public interface TbPlussAreaCityMapper {
public interface TbPlussAreaCityMapper extends BaseMapper<TbPlussAreaCity> {
int deleteByPrimaryKey(Integer id);
int insert(TbPlussAreaCity record);

View File

@@ -1,5 +1,6 @@
package com.chaozhanggui.dao.system.dao;
import com.baomidou.mybatisplus.extension.service.IService;
import com.chaozhanggui.dao.system.entity.TbPlussBankCard;
import org.apache.ibatis.annotations.Mapper;
@@ -8,7 +9,7 @@ import org.springframework.stereotype.Component;
@Component
@Mapper
public interface TbPlussBankCardMapper {
public interface TbPlussBankCardMapper extends IService<TbPlussBankCard> {
int deleteByPrimaryKey(Integer id);
int insert(TbPlussBankCard record);

View File

@@ -1,5 +1,6 @@
package com.chaozhanggui.dao.system.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.chaozhanggui.dao.system.entity.TbPlussBankCodeSxf;
import org.apache.ibatis.annotations.Mapper;
@@ -7,7 +8,7 @@ import org.springframework.stereotype.Component;
@Component
@Mapper
public interface TbPlussBankCodeSxfMapper {
public interface TbPlussBankCodeSxfMapper extends BaseMapper<TbPlussBankCodeSxf> {
int deleteByPrimaryKey(Integer id);
int insert(TbPlussBankCodeSxf record);

View File

@@ -1,5 +1,6 @@
package com.chaozhanggui.dao.system.dao;
import com.baomidou.mybatisplus.extension.service.IService;
import com.chaozhanggui.dao.system.entity.TbPlussIdCard;
import org.apache.ibatis.annotations.Mapper;
@@ -7,7 +8,7 @@ import org.springframework.stereotype.Component;
@Component
@Mapper
public interface TbPlussIdCardMapper {
public interface TbPlussIdCardMapper extends IService<TbPlussIdCard> {
int deleteByPrimaryKey(Integer id);
int insert(TbPlussIdCard record);

View File

@@ -1,7 +1,9 @@
package com.chaozhanggui.dao.system.dao;
import com.baomidou.mybatisplus.extension.service.IService;
import com.chaozhanggui.dao.system.entity.TbPlussMerchantChannel;
import com.chaozhanggui.dao.system.entity.TbPlussMerchantChannelStatus;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;
@@ -9,7 +11,7 @@ import java.util.List;
@Component
@Mapper
public interface TbPlussMerchantChannelMapper {
public interface TbPlussMerchantChannelMapper extends IService<TbPlussMerchantChannelStatus> {
int deleteByPrimaryKey(Integer id);
int insert(TbPlussMerchantChannel record);

View File

@@ -25,7 +25,7 @@ public interface TbPlussMerchantChannelStatusMapper {
int updateByPrimaryKeyWithBLOBs(TbPlussMerchantChannelStatus record);
int updateByPrimaryKey(TbPlussMerchantChannelStatus record);
TbPlussMerchantChannelStatus getByMerchantCodeAndChannelType(String merchantCode, String virChannelFlag);
Map<String,Object> selectByUserId(@Param("userId") String userId, @Param("channel") String channel);

View File

@@ -3,6 +3,7 @@ package com.chaozhanggui.dao.system.dao;
import com.chaozhanggui.dao.system.entity.TbPlussMerchantImage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;
import java.util.List;
@@ -18,6 +19,7 @@ public interface TbPlussMerchantImageMapper {
TbPlussMerchantImage selectByPrimaryKey(Integer id);
List<TbPlussMerchantImage> selectByMerchantCode(String merchantCode);
TbPlussMerchantImage selectByMerchantCodeType(@Param("merchantCode") String merchantCode,@Param("photoType") String photoType);
int updateByPrimaryKeySelective(TbPlussMerchantImage record);

View File

@@ -20,6 +20,7 @@ public interface TbPlussUserAppMapper {
int insertSelective(TbPlussUserApp record);
TbPlussUserApp selectByPrimaryKey(Integer id);
TbPlussUserApp selectByUserId(Integer userId);
int updateByPrimaryKeySelective(TbPlussUserApp record);

View File

@@ -0,0 +1,16 @@
package com.chaozhanggui.dao.system.dao;
import com.chaozhanggui.dao.system.entity.TbPlussUserLevel;
import com.chaozhanggui.dao.system.entity.TbPlussUserMarker;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;
/**
* @author 12847
*/
@Component
@Mapper
public interface TbPlussUserMarkerMapper {
int updateByPrimaryKeySelective(TbPlussUserMarker userMarker);
}

View File

@@ -11,6 +11,7 @@ import org.apache.commons.lang3.StringUtils;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.util.Objects;
import com.chaozhanggui.common.system.config.MsgException;
/**
* 结算信息
@@ -20,95 +21,96 @@ import java.util.Objects;
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
public class AccountDTO extends TbPlussAccount {
//
// /**
// * 进件状态。0或无、待审核1、审核中 2、审核失败
// */
// private String status;
//
// /**
// * 结算人银行卡
// */
// @Valid
// @NotNull(message = "请完善银行卡信息")
// private TbPlussBankCard bankCard;
//
// /**
// * 结算人身份信息
// */
// @Valid
// private TbPlussIdCard idcard;
//
// /**
// * 商户类型,-1则表示查询现有信息其他类型则会过滤某些数据
// */
// private String merchantType;
//
// /**
// * 通过数据获取进件类型
// */
// public static void initSettleType(AccountDTO accountDTO) {
// TbPlussBankCard bankCard = accountDTO.getBankCard();
// TbPlussIdCard idCard = accountDTO.getIdcard();
//
// // 对公
// if (TbPlussBankCard.ACCOUNT_TYPE_CORPORATE.equals(bankCard.getAccountType())) {
// accountDTO.setSettleType(Account.SETTLE_TYPE_CORPORATE);
// return;
// }
//
// // 法人-对私法人
// if (BankCard.ACCOUNT_TYPE_PRIVATE.equals(bankCard.getAccountType()) && idCard == null) {
// accountDTO.setSettleType(Account.LEGAL_PRIVATE_LEGAL);
// return;
// }
//
// MsgException.check(idCard == null, "请传递身份证信息");
//
// accountDTO.setSettleType(Account.LEGAL_PRIVATE_ILLEGAL);
// }
//
// /**
// * 请求数据校验
// */
// public void paramCheck() {
// if (StringUtils.isBlank(getSettleType())) {
// // 为空时候,默认为对公
// setSettleType(Account.SETTLE_TYPE_CORPORATE);
//// throw new MsgException("缺少结算类型参数");
// }
//
// if (Objects.equals(getSettleType(), Account.SETTLE_TYPE_PRIVATE_LEGAL) || Objects.equals(getSettleType(), Account.SETTLE_TYPE_CORPORATE)) {
// idcard = null;
// }
//
// if (idcard != null && !Objects.equals(idcard.getUserId(), getUserId())) {
// throw new MsgException("用户id应保持一致");
// }
//
// if (bankCard != null && !bankCard.getUserId().equals(getUserId())) {
// throw new MsgException("用户id应保持一致");
// }
//
// if (bankCard == null) {
// throw new MsgException("缺少银行卡信息");
// }
//
// if (bankCard.getAccountType() == null) {
// bankCard.setAccountType(BankCard.ACCOUNT_TYPE_PRIVATE);
// }
//
// if (BankCard.ACCOUNT_TYPE_CORPORATE.equals(bankCard.getAccountType()) && StringUtils.isBlank(bankCard.getLicenseUrl())) {
// throw new MsgException("对公账户需要传入开户许可证");
// }
//
// if (BankCard.ACCOUNT_TYPE_CERT.equals(bankCard.getAccountType())) {
// // 结算信息这里实名认证的类型作为对私账户来识别
// bankCard.setAccountType(BankCard.ACCOUNT_TYPE_PRIVATE);
// }
//
// if (!BankCard.ACCOUNT_TYPE_PRIVATE.equals(bankCard.getAccountType()) && !BankCard.ACCOUNT_TYPE_CORPORATE.equals(bankCard.getAccountType())) {
// throw new MsgException("请传入正确的银行卡类型");
// }
// }
/**
* 进件状态。0或无、待审核1、审核中 2、审核失败
*/
private String status;
/**
* 结算人银行卡
*/
@Valid
@NotNull(message = "请完善银行卡信息")
private TbPlussBankCard bankCard;
/**
* 结算人身份信息
*/
@Valid
private TbPlussIdCard idcard;
/**
* 商户类型,-1则表示查询现有信息其他类型则会过滤某些数据
*/
private String merchantType;
/**
* 通过数据获取进件类型
*/
public static void initSettleType(AccountDTO accountDTO) {
TbPlussBankCard bankCard = accountDTO.getBankCard();
TbPlussIdCard idCard = accountDTO.getIdcard();
// 对公
if (TbPlussBankCard.ACCOUNT_TYPE_CORPORATE.equals(bankCard.getAccounttype())) {
accountDTO.setSettletype(TbPlussAccount.SETTLE_TYPE_CORPORATE);
return;
}
// 法人-对私法人
if (TbPlussBankCard.ACCOUNT_TYPE_PRIVATE.equals(bankCard.getAccounttype()) && idCard == null) {
accountDTO.setSettletype(TbPlussAccount.LEGAL_PRIVATE_LEGAL);
return;
}
if (idCard == null) {
throw new MsgException("请上传身份证");
}
accountDTO.setSettletype(TbPlussAccount.LEGAL_PRIVATE_ILLEGAL);
}
/**
* 请求数据校验
*/
public void paramCheck() {
if (StringUtils.isBlank(getSettletype())) {
// 为空时候,默认为对公
setSettletype(TbPlussAccount.SETTLE_TYPE_CORPORATE);
// throw new MsgException("缺少结算类型参数");
}
if (Objects.equals(getSettletype(), TbPlussAccount.SETTLE_TYPE_PRIVATE_LEGAL) || Objects.equals(getSettletype(), TbPlussAccount.SETTLE_TYPE_CORPORATE)) {
idcard = null;
}
if (idcard != null && !Objects.equals(idcard.getUserid(), getUserid())) {
throw new MsgException("用户id应保持一致");
}
if (bankCard != null && !bankCard.getUserid().equals(getUserid())) {
throw new MsgException("用户id应保持一致");
}
if (bankCard == null) {
throw new MsgException("缺少银行卡信息");
}
if (bankCard.getAccounttype() == null) {
bankCard.setAccounttype(TbPlussBankCard.ACCOUNT_TYPE_PRIVATE);
}
if (TbPlussBankCard.ACCOUNT_TYPE_CORPORATE.equals(bankCard.getAccounttype()) && StringUtils.isBlank(bankCard.getLicenseurl())) {
throw new MsgException("对公账户需要传入开户许可证");
}
if (TbPlussBankCard.ACCOUNT_TYPE_CERT.equals(bankCard.getAccounttype())) {
// 结算信息这里实名认证的类型作为对私账户来识别
bankCard.setAccounttype(TbPlussBankCard.ACCOUNT_TYPE_PRIVATE);
}
if (!TbPlussBankCard.ACCOUNT_TYPE_PRIVATE.equals(bankCard.getAccounttype()) && !TbPlussBankCard.ACCOUNT_TYPE_CORPORATE.equals(bankCard.getAccounttype())) {
throw new MsgException("请传入正确的银行卡类型");
}
}
}

View File

@@ -1,5 +1,9 @@
package com.chaozhanggui.dao.system.entity;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.util.Date;
@@ -19,6 +23,15 @@ public class TbPlussAccount implements Serializable {
public static final String SETTLE_TYPE_PRIVATE_ILLEGAL = "02";
/** 对公结算 */
public static final String SETTLE_TYPE_CORPORATE = "03";
/** 对私法人-我是法人 */
public static final String LEGAL_PRIVATE_LEGAL = SETTLE_TYPE_PRIVATE_LEGAL + IS_SELF_LEGAL;
/** 对私法人-我不是法人*/
public static final String ILLEGAL_PRIVATE_LEGAL = SETTLE_TYPE_PRIVATE_LEGAL + NOT_SELF_LEGAL;
/** 对私非法人-我是法人*/
public static final String LEGAL_PRIVATE_ILLEGAL = SETTLE_TYPE_PRIVATE_ILLEGAL + IS_SELF_LEGAL;
/** 对私非法人-我不是法人*/
public static final String ILLEGAL_PRIVATE_ILLEGAL = SETTLE_TYPE_PRIVATE_ILLEGAL + NOT_SELF_LEGAL;
private Integer id;
private String userid;

View File

@@ -6,6 +6,74 @@ import java.io.Serializable;
import java.util.Date;
public class TbPlussMerchantChannelStatus implements Serializable {
/**
* 微信认证授权状态 - 未授权
*/
public static final String AUTHORIZATION_STATUS_UNAUTHORIZED = "0";
/**
* 微信认证授权状态 - 已授权
*/
public static final String AUTHORIZATION_STATUS_AUTHORIZED = "1";
/**
* 后台审核驳回
*/
public static final String AUDIT_STATUS_RESET = "0";
/**
* 审核中
*/
public static final String AUDIT_STATUS_EXAMINING = "1";
/**
* 通道人工审核中
*/
public static final String AUDIT_STATUS_ARTIFICIAL_EXAMINING = "11";
/**
* 审核不通过
*/
public static final String AUDIT_STATUS_REJECT = "2";
/**
* 审核通过
*/
public static final String AUDIT_STATUS_SUCCESS = "3";
/**
* 秒审通过
*/
public static final String AUDIT_STATUS_FIRST_TRIAL_SUCCESS = "4";
/**
* 复审不通过
*/
public static final String AUDIT_STATUS_REVIEW_REJECT = "5";
public static final String AUDIT_STATUS_DATA_EDIT = "6";
/**
* D0未开通状态
*/
public static final String AUDIT_STATUS_QUICK_CASH = "7";
/**
* 待签约状态
*/
public static final String AUDIT_STATUS_WAITING_SIGN = "8";
/**
* 已签约
*/
public static final String AUDIT_STATUS_SIGNED = "9";
/**
* 自定义第三方待审核状态
*/
public static final String AUDIT_THIRD_STATUS_WAITING = "-100";
/**
* 进件中
*/
public static final String AUDIT_THIRD_STATUS_AUDITING = "-999";
private Integer id;
private Integer channel;

View File

@@ -1,5 +1,7 @@
package com.chaozhanggui.dao.system.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.util.Date;
@@ -110,6 +112,48 @@ public class TbPlussMerchantImage implements Serializable {
private Date updatedt;
private String aisleswitch;
/**
* 01 身份证正面
* ,02 身份证反面
* ,03 营业执照
* ,04 组织机构代码证
* ,05 开户许可证
* ,06 门头照
* ,07 非法人结算授权书
* ,08 其他
* ,08 收银台照片
* ,09 门店内景照片
* ,10 各大餐饮平台入驻
* ,11 手持身份证合照
* ,12 租赁合同
* ,98 银行卡正面
* ,99银行卡反面
*/
@TableField
private String photoType;
@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;
private static final long serialVersionUID = 1L;
@@ -176,4 +220,100 @@ public class TbPlussMerchantImage implements Serializable {
public void setAisleswitch(String aisleswitch) {
this.aisleswitch = aisleswitch == null ? null : aisleswitch.trim();
}
public String getPhotoType() {
return photoType;
}
public void setPhotoType(String photoType) {
this.photoType = photoType;
}
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;
}
}

View File

@@ -0,0 +1,37 @@
package com.chaozhanggui.dao.system.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/**
* @author lyf
*/
@Data
@TableName("tb_pluss_user_marker")
public class TbPlussUserMarker {
@TableId("id")
private Integer id;
@TableField("user_id")
private Integer userId;
@TableField("name")
private String name;
@TableField("phone")
private String phone;
@TableField("status")
private String status;
@TableField("remark")
private String remark;
@TableField("create_time")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
@TableField("update_time")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
}

View File

@@ -40,7 +40,39 @@
AND channelType = #{channelType}
LIMIT 1
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
<select id="selectByAccount" resultType="com.chaozhanggui.dao.system.entity.TbPlussAccount">
select
<include refid="Base_Column_List" />
from tb_pluss_account
<where>
<if test="id!= null">
and id = #{id}
</if>
<if test="userid!= null">
and userId = #{userid}
</if>
<if test="idcardid!= null">
and idcardId = #{idcardid}
</if>
<if test="bankcardid!= null">
and bankCardId = #{bankcardid}
</if>
<if test="certificateurl!= null">
and certificateUrl = #{certificateurl}
</if>
<if test="settletype!= null">
and settleType = #{settletype}
</if>
<if test="channeltype!= null">
and channelType = #{channeltype}
</if>
<if test="valid!= null">
and valid = #{valid}
</if>
limit 1
</where>
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_pluss_account
where id = #{id,jdbcType=INTEGER}
</delete>

View File

@@ -588,7 +588,6 @@
</update>
<select id="selectByUserId" resultMap="BaseResultMap">
select * from tb_pluss_merchant_base_info where userId=#{userId}
</select>

View File

@@ -389,4 +389,11 @@
select * from tb_pluss_merchant_channel_status where merchantCode=#{merchantCode} and (`status`=3 or `status`=6) order by valid desc, id asc limit 1
</select>
<select id="getByMerchantCodeAndChannelType" resultType="com.chaozhanggui.dao.system.entity.TbPlussMerchantChannelStatus">
select * from tb_pluss_merchant_channel_status
where merchantCode=#{merchantCode}
and virChannelFlag=#{virChannelFlag}
and authorizationStatus="1"
order by valid desc, id asc limit 1
</select>
</mapper>

View File

@@ -27,6 +27,13 @@
where merchantCode = #{merchantCode}
AND photoType IN (06, 08, 09, 101, 102)
</select>
<select id="selectByMerchantCodeType" resultType="com.chaozhanggui.dao.system.entity.TbPlussMerchantImage">
select
<include refid="Base_Column_List" />
from tb_pluss_merchant_image
where merchantCode = #{merchantCode}
AND photoType = #{photoType}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_pluss_merchant_image
where id = #{id,jdbcType=INTEGER}

View File

@@ -367,9 +367,6 @@
<if test="loginname != null">
loginName = #{loginname,jdbcType=VARCHAR},
</if>
<if test="userid != null">
userId = #{userid,jdbcType=INTEGER},
</if>
<if test="username != null">
userName = #{username,jdbcType=VARCHAR},
</if>
@@ -491,7 +488,7 @@
jfShopKey = #{jfshopkey,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
where userId = #{userid}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.dao.system.entity.TbPlussUserApp">
update tb_pluss_user_app
@@ -569,4 +566,10 @@
ORDER BY
p.id DESC
</select>
<select id="selectByUserId" resultType="com.chaozhanggui.dao.system.entity.TbPlussUserApp">
select
<include refid="Base_Column_List" />
from tb_pluss_user_app
where userId = #{userId}
</select>
</mapper>

View File

@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.chaozhanggui.dao.system.dao.TbPlussUserMarkerMapper">
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussUserMarker">
update tb_pluss_user_marker
<set>
<if test="name != null">
`name` = #{name},
</if>
<if test="phone != null">
phone = #{phone},
</if>
<if test="status != null">
status = #{status},
</if>
<if test="remark != null">
remark = #{remark},
</if>
<if test="createTime != null">
create_time = #{createTime},
</if>
<if test="updateTime != null">
update_time = #{updateTime},
</if>
</set>
where user_id = #{userId}
</update>
</mapper>

View File

@@ -80,7 +80,7 @@
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussUserPromotion">
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussUserPromotion" >
update tb_pluss_user_promotion
<set>
<if test="typeCode != null">