去掉注册审核相关代码
parent
fa6457abb0
commit
bd758b83f3
@ -1,124 +0,0 @@
|
||||
package com.glxp.api.controller.auth;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpSession;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.glxp.api.common.enums.ResultEnum;
|
||||
import com.glxp.api.common.res.BaseResponse;
|
||||
import com.glxp.api.common.util.ResultVOUtils;
|
||||
import com.glxp.api.entity.auth.UserCertEntity;
|
||||
import com.glxp.api.entity.auth.UserPersonEntity;
|
||||
import com.glxp.api.entity.auth.UserRegisterEntity;
|
||||
import com.glxp.api.req.auth.UserRegisterFilterRequest;
|
||||
import com.glxp.api.service.auth.UserCertService;
|
||||
import com.glxp.api.service.auth.UserPersonService;
|
||||
import com.glxp.api.service.auth.UserRegisterService;
|
||||
import com.glxp.api.util.CaptchaUtils;
|
||||
|
||||
import cn.hutool.core.util.ReUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@RestController
|
||||
@Slf4j
|
||||
public class RegisterController {
|
||||
private static final Logger logger = LoggerFactory.getLogger(RegisterController.class);
|
||||
@Resource
|
||||
private UserRegisterService userRegisterService;
|
||||
@Resource
|
||||
private UserPersonService userPersonService;
|
||||
@Resource
|
||||
private UserCertService userCertService;
|
||||
@PostMapping("/admin/auth/register/getCheckcode")
|
||||
public BaseResponse getCheckcode(@RequestBody Map<String,Object> params, HttpSession httpSession) {
|
||||
logger.info("---------------"+JSON.toJSONString(params));
|
||||
return CaptchaUtils.getCheckcode(params,httpSession);
|
||||
}
|
||||
|
||||
@PostMapping("/admin/auth/register/checkCode")
|
||||
public BaseResponse checkCode(@RequestBody Map<String,Object> params) {
|
||||
logger.info("---------------"+JSON.toJSONString(params));
|
||||
return CaptchaUtils.checkCode(params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据手机号获取注册信息
|
||||
*
|
||||
* @param mobile 手机号
|
||||
*/
|
||||
|
||||
@GetMapping("/admin/auth/register/get/{mobile}")
|
||||
public BaseResponse getInfo(@PathVariable String mobile) {
|
||||
UserRegisterEntity userRegisterEntity = userRegisterService.selectByMobile(mobile);
|
||||
if(userRegisterEntity==null) {
|
||||
userRegisterEntity = new UserRegisterEntity();
|
||||
} else {
|
||||
List<UserPersonEntity> userPersons = userPersonService.selectByRegisterId(userRegisterEntity.getId().toString());
|
||||
userRegisterEntity.setUserPersons(userPersons);
|
||||
List<UserCertEntity> userCerts = userCertService.selectByRegisterId(userRegisterEntity.getId().toString());
|
||||
userRegisterEntity.setUserCerts(userCerts);
|
||||
}
|
||||
return ResultVOUtils.success(userRegisterEntity);
|
||||
}
|
||||
|
||||
@PostMapping("/admin/auth/register/save")
|
||||
public BaseResponse saveRegister(@RequestBody @Valid UserRegisterEntity userRegisterEntity, HttpSession httpSession,
|
||||
BindingResult bindingResult) {
|
||||
if (bindingResult.hasErrors()) {
|
||||
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
|
||||
}
|
||||
|
||||
//校验邮箱是否正确
|
||||
if (StrUtil.isNotBlank(userRegisterEntity.getEmail())) {
|
||||
boolean match = ReUtil.isMatch("^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$", userRegisterEntity.getEmail());
|
||||
if (!match) {
|
||||
return ResultVOUtils.error(500, "邮箱格式错误");
|
||||
}
|
||||
}
|
||||
UserRegisterEntity userRegisterEntity2 = userRegisterService.selectByCompanyName(userRegisterEntity.getCompanyName());
|
||||
if (userRegisterEntity2 !=null ) {
|
||||
if(userRegisterEntity.getId()==null)
|
||||
return ResultVOUtils.error(500, "该单位已被注册!");
|
||||
if(userRegisterEntity2.getId()!=userRegisterEntity.getId())
|
||||
return ResultVOUtils.error(500, "该单位已被注册!");
|
||||
}
|
||||
if(StringUtils.isEmpty(userRegisterEntity.getCheckStatus()))
|
||||
userRegisterEntity.setCheckStatus("0");
|
||||
boolean b = false;
|
||||
if(userRegisterEntity.getId()==null) {
|
||||
b = userRegisterService.updateUserRegister(userRegisterEntity);
|
||||
} else {
|
||||
b = userRegisterService.insertUserRegister(userRegisterEntity);
|
||||
}
|
||||
|
||||
if (!b) {
|
||||
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);
|
||||
}
|
||||
|
||||
return ResultVOUtils.success();
|
||||
}
|
||||
|
||||
@GetMapping("/admin/auth/register/list")
|
||||
public BaseResponse list(UserRegisterFilterRequest userResisterFilterRequest, BindingResult bindingResult) {
|
||||
if (bindingResult.hasErrors()) {
|
||||
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
|
||||
}
|
||||
return ResultVOUtils.success(userRegisterService.filterUserRegisters(userResisterFilterRequest));
|
||||
}
|
||||
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
package com.glxp.api.dao.auth;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.glxp.api.dao.BaseMapperPlus;
|
||||
import com.glxp.api.entity.auth.UserPersonEntity;
|
||||
import com.glxp.api.req.auth.UserPersonFilterRequest;
|
||||
|
||||
public interface UserPersonDao extends BaseMapperPlus<UserPersonDao, UserPersonEntity, UserPersonEntity> {
|
||||
|
||||
List<UserPersonEntity> filterUserPersons(UserPersonFilterRequest userPersonFilterRequest);
|
||||
List<UserPersonEntity> selectByRegisterId(@Param("registerId") String registerId);
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
package com.glxp.api.dao.auth;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.glxp.api.entity.auth.UserRegisterEntity;
|
||||
import com.glxp.api.req.auth.UserRegisterFilterRequest;
|
||||
|
||||
@Mapper
|
||||
public interface UserRegisterDao {
|
||||
|
||||
List<UserRegisterEntity> filterUserRegisters(UserRegisterFilterRequest userResisterFilterRequest);
|
||||
|
||||
UserRegisterEntity selectByCompanyName(String companyName);
|
||||
|
||||
UserRegisterEntity selectByUserName(String userName);
|
||||
|
||||
boolean insertUserRegister(UserRegisterEntity userRegisterEntity);
|
||||
|
||||
boolean updateUserRegister(UserRegisterEntity userRegisterEntity);
|
||||
|
||||
boolean deleteById(String id);
|
||||
boolean deleteByMobile(@Param("mobile")String mobile , @Param("checkStatus")String checkStatus);
|
||||
|
||||
UserRegisterEntity selectById(String id);
|
||||
|
||||
UserRegisterEntity selectByCustomerId(@Param("id") String id);
|
||||
|
||||
UserRegisterEntity selectByMobile(String mobile);
|
||||
|
||||
boolean deleteByCustomerId(String id);
|
||||
|
||||
String isExit(String mobile);
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
package com.glxp.api.dao.auth;
|
||||
package com.glxp.api.dao.sup;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.glxp.api.entity.auth.UserCompanyEntity;
|
||||
import com.glxp.api.entity.sup.UserCompanyEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
@ -1,29 +0,0 @@
|
||||
package com.glxp.api.entity.auth;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@TableName("user_cert")
|
||||
public class UserCertEntity {
|
||||
|
||||
private Long id;
|
||||
private Long registerId;
|
||||
private Long companyId;
|
||||
private String name;
|
||||
private String code;
|
||||
private String filePath;
|
||||
private String validDate;
|
||||
private String expireDate;
|
||||
private String checkStatus;
|
||||
private String checkTime;
|
||||
private String checkComment;
|
||||
private String status;
|
||||
private String remark;
|
||||
private String createUser;
|
||||
private String createTime;
|
||||
private String updateUser;
|
||||
private String updateTime;
|
||||
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
package com.glxp.api.entity.auth;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
@Data
|
||||
@TableName("user_person")
|
||||
public class UserPersonEntity {
|
||||
private Long id;
|
||||
private Long registerId;
|
||||
private Long companyId;
|
||||
private String name;
|
||||
private String tel;
|
||||
private String mobile;
|
||||
private String qq;
|
||||
private String weChart;
|
||||
private String email;
|
||||
private String createTime;
|
||||
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
package com.glxp.api.entity.auth;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class UserRegisterEntity {
|
||||
|
||||
private Long id;
|
||||
private Long companyId;
|
||||
private String mobile;
|
||||
private String email;
|
||||
private String userId;
|
||||
private String realName;
|
||||
private String contactWay;
|
||||
private String companyName;
|
||||
private String creditNum;
|
||||
private String registerAddress;
|
||||
private String bussinessStatus;
|
||||
private String legalPerson;
|
||||
private String legalIdCard;
|
||||
private String checkStatus;
|
||||
private String registerTime;
|
||||
private String checkTime;
|
||||
private String comments;
|
||||
private List<UserPersonEntity> userPersons;
|
||||
private List<UserCertEntity> userCerts;
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package com.glxp.api.entity.auth;
|
||||
package com.glxp.api.entity.sup;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
@ -0,0 +1,12 @@
|
||||
package com.glxp.api.req.basic;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class UdiSelectRequest {
|
||||
|
||||
List<String> keys;
|
||||
private Long companyId;
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
package com.glxp.api.service.auth;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.glxp.api.entity.auth.UserCertEntity;
|
||||
import com.glxp.api.req.auth.UserCertFilterRequest;
|
||||
|
||||
public interface UserCertService {
|
||||
|
||||
List<UserCertEntity> filterUserCerts(UserCertFilterRequest userCertFilterRequest);
|
||||
List<UserCertEntity> selectByRegisterId(String registerId);
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
package com.glxp.api.service.auth;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.glxp.api.entity.auth.UserPersonEntity;
|
||||
import com.glxp.api.req.auth.UserPersonFilterRequest;
|
||||
|
||||
public interface UserPersonService {
|
||||
|
||||
List<UserPersonEntity> filterUserPersons(UserPersonFilterRequest userPersonFilterRequest);
|
||||
List<UserPersonEntity> selectByRegisterId(String registerId);
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
package com.glxp.api.service.auth;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.glxp.api.entity.auth.UserRegisterEntity;
|
||||
import com.glxp.api.req.auth.UserRegisterFilterRequest;
|
||||
|
||||
public interface UserRegisterService {
|
||||
|
||||
List<UserRegisterEntity> filterUserRegisters(UserRegisterFilterRequest userResisterFilterRequest);
|
||||
|
||||
boolean insertUserRegister(UserRegisterEntity userRegisterEntity);
|
||||
|
||||
UserRegisterEntity selectByCompanyName(String companyName);
|
||||
|
||||
boolean updateUserRegister(UserRegisterEntity userRegisterEntity);
|
||||
|
||||
boolean deleteById(String id);
|
||||
|
||||
UserRegisterEntity selectByUserName(String userName);
|
||||
|
||||
boolean deleteByMobile(String mobile,String checkStatus);
|
||||
|
||||
UserRegisterEntity selectById(String id);
|
||||
|
||||
UserRegisterEntity selectByMobile(String mobile);
|
||||
|
||||
boolean isExit(String mobile);
|
||||
|
||||
boolean deleteByCustomerId(String id);
|
||||
|
||||
UserRegisterEntity selectByCustomerId(String id);
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
package com.glxp.api.service.auth.impl;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.glxp.api.dao.auth.UserCertDao;
|
||||
import com.glxp.api.entity.auth.UserCertEntity;
|
||||
import com.glxp.api.req.auth.UserCertFilterRequest;
|
||||
import com.glxp.api.service.auth.UserCertService;
|
||||
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class UserCertServiceImpl implements UserCertService {
|
||||
@Resource
|
||||
UserCertDao userCertDao;
|
||||
@Override
|
||||
public List<UserCertEntity> filterUserCerts(UserCertFilterRequest userCertFilterRequest) {
|
||||
if (userCertFilterRequest == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
int offset = (userCertFilterRequest.getPage() - 1) * userCertFilterRequest.getLimit();
|
||||
PageHelper.offsetPage(offset, userCertFilterRequest.getLimit());
|
||||
return userCertDao.filterUserCerts(userCertFilterRequest);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserCertEntity> selectByRegisterId(String registerId) {
|
||||
return userCertDao.selectByRegisterId(registerId);
|
||||
}
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
package com.glxp.api.service.auth.impl;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.glxp.api.dao.auth.UserPersonDao;
|
||||
import com.glxp.api.entity.auth.UserPersonEntity;
|
||||
import com.glxp.api.req.auth.UserPersonFilterRequest;
|
||||
import com.glxp.api.service.auth.UserPersonService;
|
||||
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class UserPersonServiceImpl implements UserPersonService {
|
||||
@Resource
|
||||
UserPersonDao userPersonDao;
|
||||
@Override
|
||||
public List<UserPersonEntity> filterUserPersons(UserPersonFilterRequest userPersonFilterRequest) {
|
||||
if (userPersonFilterRequest == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
int offset = (userPersonFilterRequest.getPage() - 1) * userPersonFilterRequest.getLimit();
|
||||
PageHelper.offsetPage(offset, userPersonFilterRequest.getLimit());
|
||||
return userPersonDao.filterUserPersons(userPersonFilterRequest);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserPersonEntity> selectByRegisterId(String registerId) {
|
||||
return userPersonDao.selectByRegisterId(registerId);
|
||||
}
|
||||
}
|
@ -1,95 +0,0 @@
|
||||
package com.glxp.api.service.auth.impl;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.glxp.api.dao.auth.UserRegisterDao;
|
||||
import com.glxp.api.entity.auth.UserRegisterEntity;
|
||||
import com.glxp.api.req.auth.UserRegisterFilterRequest;
|
||||
import com.glxp.api.service.auth.UserRegisterService;
|
||||
import com.glxp.api.util.DateUtil;
|
||||
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class UserRegisterServiceImpl implements UserRegisterService {
|
||||
|
||||
@Resource
|
||||
private UserRegisterDao userRegisterDao;
|
||||
|
||||
@Override
|
||||
public List<UserRegisterEntity> filterUserRegisters(UserRegisterFilterRequest userRegisterFilterRequest) {
|
||||
if (userRegisterFilterRequest == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
int offset = (userRegisterFilterRequest.getPage() - 1) * userRegisterFilterRequest.getLimit();
|
||||
PageHelper.offsetPage(offset, userRegisterFilterRequest.getLimit());
|
||||
return userRegisterDao.filterUserRegisters(userRegisterFilterRequest);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean insertUserRegister(UserRegisterEntity userRegisterEntity) {
|
||||
userRegisterEntity.setRegisterTime(DateUtil.getDateTime());
|
||||
return userRegisterDao.insertUserRegister(userRegisterEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserRegisterEntity selectByCompanyName(String companyName) {
|
||||
return userRegisterDao.selectByCompanyName(companyName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateUserRegister(UserRegisterEntity userRegisterEntity) {
|
||||
return userRegisterDao.updateUserRegister(userRegisterEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteById(String id) {
|
||||
return userRegisterDao.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserRegisterEntity selectByUserName(String userName) {
|
||||
return userRegisterDao.selectByUserName(userName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteByMobile(String mobile, String checkStatus) {
|
||||
return userRegisterDao.deleteByMobile(mobile,checkStatus);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public UserRegisterEntity selectById(String id) {
|
||||
return userRegisterDao.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserRegisterEntity selectByMobile(String mobile) {
|
||||
return userRegisterDao.selectByMobile(mobile);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isExit(String mobile) {
|
||||
String data = userRegisterDao.isExit(mobile);
|
||||
if (data != null)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean deleteByCustomerId(String id) {
|
||||
return userRegisterDao.deleteByCustomerId(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserRegisterEntity selectByCustomerId(String id) {
|
||||
return userRegisterDao.selectByCustomerId(id);
|
||||
}
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
package com.glxp.api.service.auth;
|
||||
package com.glxp.api.service.sup;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.glxp.api.entity.auth.UserCompanyEntity;
|
||||
import com.glxp.api.entity.sup.UserCompanyEntity;
|
||||
|
||||
public interface UserCompanyService extends IService<UserCompanyEntity>{
|
||||
|
@ -1,10 +1,10 @@
|
||||
package com.glxp.api.service.auth.impl;
|
||||
package com.glxp.api.service.sup.impl;
|
||||
|
||||
import com.glxp.api.entity.auth.UserCompanyEntity;
|
||||
import com.glxp.api.entity.sup.UserCompanyEntity;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.glxp.api.dao.auth.UserCompanyMapper;
|
||||
import com.glxp.api.service.auth.UserCompanyService;
|
||||
import com.glxp.api.dao.sup.UserCompanyMapper;
|
||||
import com.glxp.api.service.sup.UserCompanyService;
|
||||
@Service
|
||||
public class UserCompanyServiceImpl extends ServiceImpl<UserCompanyMapper, UserCompanyEntity> implements UserCompanyService{
|
||||
|
@ -1,55 +0,0 @@
|
||||
<?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.glxp.api.dao.auth.UserCertDao">
|
||||
|
||||
<select id="filterUserCerts" parameterType="com.glxp.api.req.auth.UserCertFilterRequest"
|
||||
resultType="com.glxp.api.entity.auth.UserCertEntity">
|
||||
SELECT *
|
||||
FROM user_cert
|
||||
<where>
|
||||
<if test="registerId != null and ''!=registerId">
|
||||
AND registerId = #{registerId}
|
||||
</if>
|
||||
<if test="companyId != null and ''!=companyId">
|
||||
AND companyId = #{companyId}
|
||||
</if>
|
||||
|
||||
<if test="name != null and ''!=name">
|
||||
AND name = #{name}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectByRegisterId" parameterType="java.lang.String"
|
||||
resultType="com.glxp.api.entity.auth.UserCertEntity">
|
||||
SELECT *
|
||||
FROM user_cert
|
||||
where registerId=#{registerId}
|
||||
</select>
|
||||
|
||||
<insert id="insert" keyProperty="roleId" useGeneratedKeys="true"
|
||||
parameterType="com.glxp.api.entity.auth.UserCertEntity">
|
||||
|
||||
</insert>
|
||||
|
||||
|
||||
<update id="updateById" parameterType="com.glxp.api.entity.auth.UserCertEntity">
|
||||
|
||||
</update>
|
||||
|
||||
<delete id="deleteBatchIds" parameterType="java.util.List"
|
||||
>
|
||||
|
||||
</delete>
|
||||
|
||||
|
||||
<delete id="deleteById" parameterType="java.lang.Long">
|
||||
|
||||
</delete>
|
||||
|
||||
|
||||
|
||||
|
||||
</mapper>
|
@ -1,57 +0,0 @@
|
||||
<?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.glxp.api.dao.auth.UserPersonDao">
|
||||
|
||||
<select id="filterUserPersons" parameterType="com.glxp.api.req.auth.UserPersonFilterRequest"
|
||||
resultType="com.glxp.api.entity.auth.UserPersonEntity">
|
||||
SELECT *
|
||||
FROM user_person
|
||||
<where>
|
||||
<if test="registerId != null and ''!=registerId">
|
||||
AND registerId = #{registerId}
|
||||
</if>
|
||||
<if test="companyId != null and ''!=companyId">
|
||||
AND companyId = #{companyId}
|
||||
</if>
|
||||
<if test="mobile != null and ''!=mobile">
|
||||
AND mobile = #{mobile}
|
||||
</if>
|
||||
<if test="name != null and ''!=name">
|
||||
AND name = #{name}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectByRegisterId" parameterType="java.lang.String"
|
||||
resultType="com.glxp.api.entity.auth.UserPersonEntity">
|
||||
SELECT *
|
||||
FROM user_person
|
||||
where registerId=#{registerId}
|
||||
</select>
|
||||
|
||||
<insert id="insert" keyProperty="roleId" useGeneratedKeys="true"
|
||||
parameterType="com.glxp.api.entity.auth.UserPersonEntity">
|
||||
|
||||
</insert>
|
||||
|
||||
|
||||
<update id="updateById" parameterType="com.glxp.api.entity.auth.UserPersonEntity">
|
||||
|
||||
</update>
|
||||
|
||||
<delete id="deleteBatchIds" parameterType="java.util.List"
|
||||
>
|
||||
|
||||
</delete>
|
||||
|
||||
|
||||
<delete id="deleteById" parameterType="java.lang.Long">
|
||||
|
||||
</delete>
|
||||
|
||||
|
||||
|
||||
|
||||
</mapper>
|
@ -1,128 +0,0 @@
|
||||
<?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.glxp.api.dao.auth.UserRegisterDao">
|
||||
|
||||
<select id="filterUserRegisters" parameterType="com.glxp.api.req.auth.UserRegisterFilterRequest"
|
||||
resultType="com.glxp.api.entity.auth.UserRegisterEntity">
|
||||
SELECT *
|
||||
FROM user_register
|
||||
<where>
|
||||
<if test="companyName != null and '' !=companyName">
|
||||
AND companyName like concat('%',#{companyName},'%')
|
||||
</if>
|
||||
<if test="checkSatus != null and ''!=checkSatus">
|
||||
AND checkSatus = #{checkSatus}
|
||||
</if>
|
||||
<if test="companyId != null and ''!=companyId">
|
||||
AND companyId = #{companyId}
|
||||
</if>
|
||||
<if test="mobile != null and ''!=mobile">
|
||||
AND mobile = #{mobile}
|
||||
</if>
|
||||
<if test="bussinessStatus != null and ''!=bussinessStatus">
|
||||
AND bussinessStatus = #{bussinessStatus}
|
||||
</if>
|
||||
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectByCompanyName" parameterType="java.lang.String"
|
||||
resultType="com.glxp.api.entity.auth.UserRegisterEntity">
|
||||
SELECT *
|
||||
FROM user_register
|
||||
where companyName=#{companyName}
|
||||
</select>
|
||||
|
||||
<select id="selectByUserName" parameterType="java.lang.String"
|
||||
resultType="com.glxp.api.entity.auth.UserRegisterEntity">
|
||||
SELECT *
|
||||
FROM user_register
|
||||
where userName=#{userName}
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<insert id="insertUserRegister" keyProperty="id" parameterType="com.glxp.api.entity.auth.UserRegisterEntity">
|
||||
INSERT INTO user_register
|
||||
(companyId,mobile,email,userId,realName,contactWay,companyName,creditNum,
|
||||
registerAddress,bussinessStatus,legalPerson,legalIdCard,checkStatus,registerTime,
|
||||
checkTime,comments)
|
||||
values (#{companyId,jdbcType=VARCHAR},#{mobile,jdbcType=VARCHAR},
|
||||
#{email,jdbcType=VARCHAR},#{userId,jdbcType=VARCHAR},#{realName,jdbcType=VARCHAR},
|
||||
#{contactWay,jdbcType=VARCHAR},#{companyName,jdbcType=VARCHAR},#{creditNum,jdbcType=VARCHAR},
|
||||
#{registerAddress,jdbcType=VARCHAR},#{bussinessStatus,jdbcType=VARCHAR},#{legalPerson,jdbcType=VARCHAR},
|
||||
#{legalIdCard,jdbcType=VARCHAR},#{checkStatus,jdbcType=VARCHAR},#{registerTime,jdbcType=TIMESTAMP},
|
||||
#{checkTime,jdbcType=TIMESTAMP},#{comments,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
|
||||
<update id="updateUserRegister" parameterType="com.glxp.api.entity.auth.UserRegisterEntity">
|
||||
UPDATE user_register
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<if test="companyId != null">`companyId`=#{companyId},</if>
|
||||
<if test="mobile != null">mobile=#{mobile},</if>
|
||||
<if test="email != null">`email`=#{email},</if>
|
||||
<if test="userId != null">userId=#{userId},</if>
|
||||
<if test="realName != null">realName=#{realName},</if>
|
||||
<if test="companyName != null">companyName=#{companyName},</if>
|
||||
<if test="contactWay != null">contactWay=#{contactWay},</if>
|
||||
<if test="creditNum != null">creditNum=#{creditNum},</if>
|
||||
<if test="registerAddress != null">registerAddress=#{registerAddress},</if>
|
||||
<if test="bussinessStatus != null">bussinessStatus=#{bussinessStatus},</if>
|
||||
<if test="checkStatus != null">checkStatus=#{checkStatus},</if>
|
||||
<if test="legalPerson != null">legalPerson=#{legalPerson},</if>
|
||||
<if test="legalIdCard != null">legalIdCard=#{legalIdCard},</if>
|
||||
<if test="checkStatus != null">checkStatus=#{checkStatus},</if>
|
||||
<if test="registerTime != null">registerTime=#{registerTime},</if>
|
||||
<if test="checkTime != null">checkTime=#{checkTime},</if>
|
||||
<if test="comments != null">comments=#{comments},</if>
|
||||
</trim>
|
||||
WHERE id=#{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteById" parameterType="java.lang.Long">
|
||||
delete
|
||||
from user_register
|
||||
where id = #{id}
|
||||
</delete>
|
||||
<delete id="deleteByMobile" parameterType="map">
|
||||
delete
|
||||
from user_register
|
||||
where mobile = #{mobile} and checkStatus=#{checkStatus}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByCustomerId" parameterType="java.lang.String">
|
||||
delete
|
||||
from user_register
|
||||
where userId = #{userId}
|
||||
</delete>
|
||||
<select id="selectById" parameterType="java.lang.Integer"
|
||||
resultType="com.glxp.api.entity.auth.UserRegisterEntity">
|
||||
SELECT *
|
||||
FROM user_register
|
||||
WHERE id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectByMobile" parameterType="java.lang.String"
|
||||
resultType="com.glxp.api.entity.auth.UserRegisterEntity">
|
||||
SELECT *
|
||||
FROM user_register
|
||||
WHERE mobile = #{mobile}
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<select id="selectByCustomerId" parameterType="java.lang.String"
|
||||
resultType="com.glxp.api.entity.auth.UserRegisterEntity">
|
||||
SELECT *
|
||||
FROM user_register
|
||||
WHERE companyId = #{id}
|
||||
</select>
|
||||
|
||||
<select id="isExit" parameterType="java.lang.String" resultType="java.lang.String">
|
||||
SELECT 1
|
||||
FROM user_register
|
||||
WHERE (
|
||||
mobile = #{mobile} and checkStatus !='2' ) limit 1
|
||||
|
||||
</select>
|
||||
</mapper>
|
@ -1,4 +1,4 @@
|
||||
<?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.glxp.api.dao.auth.UserCompanyMapper">
|
||||
<mapper namespace="com.glxp.api.dao.sup.UserCompanyMapper">
|
||||
</mapper>
|
Loading…
Reference in New Issue