From bd758b83f3ec8de6b17e9af53165e946f18d46aa Mon Sep 17 00:00:00 2001 From: anthonywj Date: Tue, 16 May 2023 16:12:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E6=B3=A8=E5=86=8C=E5=AE=A1?= =?UTF-8?q?=E6=A0=B8=E7=9B=B8=E5=85=B3=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/auth/RegisterController.java | 124 ----------------- .../controller/basic/UdiSyncController.java | 37 ++++- .../{auth => sup}/UserComanyController.java | 9 +- .../com/glxp/api/dao/auth/UserCertDao.java | 3 +- .../com/glxp/api/dao/auth/UserPersonDao.java | 15 -- .../glxp/api/dao/auth/UserRegisterDao.java | 36 ----- .../dao/{auth => sup}/UserCompanyMapper.java | 4 +- .../glxp/api/entity/auth/UserCertEntity.java | 29 ---- .../api/entity/auth/UserPersonEntity.java | 22 --- .../api/entity/auth/UserRegisterEntity.java | 29 ---- .../{auth => sup}/UserCompanyEntity.java | 2 +- .../glxp/api/req/basic/UdiSelectRequest.java | 12 ++ .../api/service/auth/UserCertService.java | 12 -- .../api/service/auth/UserPersonService.java | 12 -- .../api/service/auth/UserRegisterService.java | 33 ----- .../service/auth/impl/SysRoleServiceImpl.java | 2 - .../auth/impl/UserCertServiceImpl.java | 36 ----- .../auth/impl/UserPersonServiceImpl.java | 36 ----- .../auth/impl/UserRegisterServiceImpl.java | 95 ------------- .../{auth => sup}/UserCompanyService.java | 4 +- .../impl/UserCompanyServiceImpl.java | 8 +- .../mybatis/mapper/auth/UserCertMapper.xml | 55 -------- .../mybatis/mapper/auth/UserPersonMapper.xml | 57 -------- .../mybatis/mapper/auth/UserRegisterDao.xml | 128 ------------------ .../{auth => sup}/UserCompanyMapper.xml | 2 +- 25 files changed, 61 insertions(+), 741 deletions(-) delete mode 100644 src/main/java/com/glxp/api/controller/auth/RegisterController.java rename src/main/java/com/glxp/api/controller/{auth => sup}/UserComanyController.java (87%) delete mode 100644 src/main/java/com/glxp/api/dao/auth/UserPersonDao.java delete mode 100644 src/main/java/com/glxp/api/dao/auth/UserRegisterDao.java rename src/main/java/com/glxp/api/dao/{auth => sup}/UserCompanyMapper.java (69%) delete mode 100644 src/main/java/com/glxp/api/entity/auth/UserCertEntity.java delete mode 100644 src/main/java/com/glxp/api/entity/auth/UserPersonEntity.java delete mode 100644 src/main/java/com/glxp/api/entity/auth/UserRegisterEntity.java rename src/main/java/com/glxp/api/entity/{auth => sup}/UserCompanyEntity.java (98%) create mode 100644 src/main/java/com/glxp/api/req/basic/UdiSelectRequest.java delete mode 100644 src/main/java/com/glxp/api/service/auth/UserCertService.java delete mode 100644 src/main/java/com/glxp/api/service/auth/UserPersonService.java delete mode 100644 src/main/java/com/glxp/api/service/auth/UserRegisterService.java delete mode 100644 src/main/java/com/glxp/api/service/auth/impl/UserCertServiceImpl.java delete mode 100644 src/main/java/com/glxp/api/service/auth/impl/UserPersonServiceImpl.java delete mode 100644 src/main/java/com/glxp/api/service/auth/impl/UserRegisterServiceImpl.java rename src/main/java/com/glxp/api/service/{auth => sup}/UserCompanyService.java (61%) rename src/main/java/com/glxp/api/service/{auth => sup}/impl/UserCompanyServiceImpl.java (56%) delete mode 100644 src/main/resources/mybatis/mapper/auth/UserCertMapper.xml delete mode 100644 src/main/resources/mybatis/mapper/auth/UserPersonMapper.xml delete mode 100644 src/main/resources/mybatis/mapper/auth/UserRegisterDao.xml rename src/main/resources/mybatis/mapper/{auth => sup}/UserCompanyMapper.xml (72%) diff --git a/src/main/java/com/glxp/api/controller/auth/RegisterController.java b/src/main/java/com/glxp/api/controller/auth/RegisterController.java deleted file mode 100644 index 4c975f4..0000000 --- a/src/main/java/com/glxp/api/controller/auth/RegisterController.java +++ /dev/null @@ -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 params, HttpSession httpSession) { - logger.info("---------------"+JSON.toJSONString(params)); - return CaptchaUtils.getCheckcode(params,httpSession); - } - - @PostMapping("/admin/auth/register/checkCode") - public BaseResponse checkCode(@RequestBody Map 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 userPersons = userPersonService.selectByRegisterId(userRegisterEntity.getId().toString()); - userRegisterEntity.setUserPersons(userPersons); - List 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)); - } - -} diff --git a/src/main/java/com/glxp/api/controller/basic/UdiSyncController.java b/src/main/java/com/glxp/api/controller/basic/UdiSyncController.java index e1e07da..0d3447a 100644 --- a/src/main/java/com/glxp/api/controller/basic/UdiSyncController.java +++ b/src/main/java/com/glxp/api/controller/basic/UdiSyncController.java @@ -5,11 +5,14 @@ import java.util.List; import javax.annotation.Resource; +import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.IdUtil; +import com.glxp.api.controller.BaseController; import com.glxp.api.entity.auth.DeptUserEntity; import com.glxp.api.entity.basic.*; import com.glxp.api.req.auth.FilterDeptUserReqeust; -import com.glxp.api.req.basic.BasicUdiReRequest; +import com.glxp.api.req.basic.*; +import com.glxp.api.req.system.DeleteRequest; import com.glxp.api.res.auth.AuthAdminResponse; import com.glxp.api.res.basic.BasicUdiRelResponse; import com.glxp.api.service.auth.CustomerService; @@ -26,9 +29,6 @@ import com.glxp.api.annotation.AuthRuleAnnotation; import com.glxp.api.common.res.BaseResponse; import com.glxp.api.common.util.ResultVOUtils; import com.glxp.api.constant.AsyncDiDlHelper; -import com.glxp.api.req.basic.FilterUdiRelRequest; -import com.glxp.api.req.basic.ProductInfoFilterRequest; -import com.glxp.api.req.basic.UdiCompanyRequest; import com.glxp.api.res.PageSimpleResponse; import com.glxp.api.service.basic.ProductInfoService; import com.glxp.api.service.basic.SyncUdiService; @@ -43,7 +43,7 @@ import lombok.extern.slf4j.Slf4j; */ @Slf4j @RestController -public class UdiSyncController { +public class UdiSyncController extends BaseController { @Resource SyncUdiService syncUdiService; @@ -158,6 +158,33 @@ public class UdiSyncController { return ResultVOUtils.success("添加成功!"); } + + //产品信息关联新增 + @AuthRuleAnnotation("") + @PostMapping("udi/basic/rel/batch/save") + public BaseResponse batchSaveRel(@RequestBody UdiSelectRequest udiSelectRequest) { + String userId = customerService.getUserId() + ""; + if (CollUtil.isNotEmpty(udiSelectRequest.getKeys())) { + for (String uuid : udiSelectRequest.getKeys()) { + BasicUdiRelEntity basicUdiRelEntity = new BasicUdiRelEntity(); + basicUdiRelEntity.setUuid(uuid); + basicUdiRelEntity.setCompanyIdFk(udiSelectRequest.getCompanyId()); + basicUdiRelEntity.setUpdateTime(new Date()); + basicUdiRelEntity.setUpdateUser(userId); + basicUdiRelEntity.setId(IdUtil.getSnowflakeNextId()); + basicUdiRelService.save(basicUdiRelEntity); + } + } + return ResultVOUtils.success("添加成功!"); + } + + @AuthRuleAnnotation("") + @PostMapping("udi/basic/rel/delete") + public BaseResponse saveRel(@RequestBody DeleteRequest deleteRequest) { + basicUdiRelService.removeById(deleteRequest.getId()); + return ResultVOUtils.success("删除成功!"); + } + //产品信息关联修改 @AuthRuleAnnotation("") @PostMapping("udi/basic/rel/update") diff --git a/src/main/java/com/glxp/api/controller/auth/UserComanyController.java b/src/main/java/com/glxp/api/controller/sup/UserComanyController.java similarity index 87% rename from src/main/java/com/glxp/api/controller/auth/UserComanyController.java rename to src/main/java/com/glxp/api/controller/sup/UserComanyController.java index 9f8f17a..f1b19d5 100644 --- a/src/main/java/com/glxp/api/controller/auth/UserComanyController.java +++ b/src/main/java/com/glxp/api/controller/sup/UserComanyController.java @@ -1,13 +1,13 @@ -package com.glxp.api.controller.auth; +package com.glxp.api.controller.sup; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.glxp.api.annotation.AuthRuleAnnotation; import com.glxp.api.common.res.BaseResponse; import com.glxp.api.common.util.ResultVOUtils; import com.glxp.api.controller.BaseController; -import com.glxp.api.entity.auth.UserCompanyEntity; +import com.glxp.api.entity.sup.UserCompanyEntity; import com.glxp.api.req.auth.FilterUserComapanyRequest; -import com.glxp.api.service.auth.UserCompanyService; +import com.glxp.api.service.sup.UserCompanyService; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; @@ -15,6 +15,9 @@ import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; import java.util.List; +/** + * 客户端企业信息 + */ @RestController @Slf4j public class UserComanyController extends BaseController { diff --git a/src/main/java/com/glxp/api/dao/auth/UserCertDao.java b/src/main/java/com/glxp/api/dao/auth/UserCertDao.java index c92f204..6b7a9aa 100644 --- a/src/main/java/com/glxp/api/dao/auth/UserCertDao.java +++ b/src/main/java/com/glxp/api/dao/auth/UserCertDao.java @@ -5,11 +5,10 @@ import java.util.List; import org.apache.ibatis.annotations.Param; import com.glxp.api.dao.BaseMapperPlus; -import com.glxp.api.entity.auth.UserCertEntity; import com.glxp.api.req.auth.UserCertFilterRequest; public interface UserCertDao extends BaseMapperPlus { - + List filterUserCerts(UserCertFilterRequest userCertFilterRequest); List selectByRegisterId(@Param("registerId") String registerId); } diff --git a/src/main/java/com/glxp/api/dao/auth/UserPersonDao.java b/src/main/java/com/glxp/api/dao/auth/UserPersonDao.java deleted file mode 100644 index 2a5d627..0000000 --- a/src/main/java/com/glxp/api/dao/auth/UserPersonDao.java +++ /dev/null @@ -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 { - - List filterUserPersons(UserPersonFilterRequest userPersonFilterRequest); - List selectByRegisterId(@Param("registerId") String registerId); -} diff --git a/src/main/java/com/glxp/api/dao/auth/UserRegisterDao.java b/src/main/java/com/glxp/api/dao/auth/UserRegisterDao.java deleted file mode 100644 index 08aca9f..0000000 --- a/src/main/java/com/glxp/api/dao/auth/UserRegisterDao.java +++ /dev/null @@ -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 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); -} diff --git a/src/main/java/com/glxp/api/dao/auth/UserCompanyMapper.java b/src/main/java/com/glxp/api/dao/sup/UserCompanyMapper.java similarity index 69% rename from src/main/java/com/glxp/api/dao/auth/UserCompanyMapper.java rename to src/main/java/com/glxp/api/dao/sup/UserCompanyMapper.java index 528f0a1..664dc62 100644 --- a/src/main/java/com/glxp/api/dao/auth/UserCompanyMapper.java +++ b/src/main/java/com/glxp/api/dao/sup/UserCompanyMapper.java @@ -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 diff --git a/src/main/java/com/glxp/api/entity/auth/UserCertEntity.java b/src/main/java/com/glxp/api/entity/auth/UserCertEntity.java deleted file mode 100644 index 5d865d9..0000000 --- a/src/main/java/com/glxp/api/entity/auth/UserCertEntity.java +++ /dev/null @@ -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; - -} diff --git a/src/main/java/com/glxp/api/entity/auth/UserPersonEntity.java b/src/main/java/com/glxp/api/entity/auth/UserPersonEntity.java deleted file mode 100644 index dab8627..0000000 --- a/src/main/java/com/glxp/api/entity/auth/UserPersonEntity.java +++ /dev/null @@ -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; - -} diff --git a/src/main/java/com/glxp/api/entity/auth/UserRegisterEntity.java b/src/main/java/com/glxp/api/entity/auth/UserRegisterEntity.java deleted file mode 100644 index 9253f9d..0000000 --- a/src/main/java/com/glxp/api/entity/auth/UserRegisterEntity.java +++ /dev/null @@ -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 userPersons; - private List userCerts; -} diff --git a/src/main/java/com/glxp/api/entity/auth/UserCompanyEntity.java b/src/main/java/com/glxp/api/entity/sup/UserCompanyEntity.java similarity index 98% rename from src/main/java/com/glxp/api/entity/auth/UserCompanyEntity.java rename to src/main/java/com/glxp/api/entity/sup/UserCompanyEntity.java index ecfe14f..efe63d3 100644 --- a/src/main/java/com/glxp/api/entity/auth/UserCompanyEntity.java +++ b/src/main/java/com/glxp/api/entity/sup/UserCompanyEntity.java @@ -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; diff --git a/src/main/java/com/glxp/api/req/basic/UdiSelectRequest.java b/src/main/java/com/glxp/api/req/basic/UdiSelectRequest.java new file mode 100644 index 0000000..aa53ea8 --- /dev/null +++ b/src/main/java/com/glxp/api/req/basic/UdiSelectRequest.java @@ -0,0 +1,12 @@ +package com.glxp.api.req.basic; + +import lombok.Data; + +import java.util.List; + +@Data +public class UdiSelectRequest { + + List keys; + private Long companyId; +} diff --git a/src/main/java/com/glxp/api/service/auth/UserCertService.java b/src/main/java/com/glxp/api/service/auth/UserCertService.java deleted file mode 100644 index fc80699..0000000 --- a/src/main/java/com/glxp/api/service/auth/UserCertService.java +++ /dev/null @@ -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 filterUserCerts(UserCertFilterRequest userCertFilterRequest); - List selectByRegisterId(String registerId); -} diff --git a/src/main/java/com/glxp/api/service/auth/UserPersonService.java b/src/main/java/com/glxp/api/service/auth/UserPersonService.java deleted file mode 100644 index e5db729..0000000 --- a/src/main/java/com/glxp/api/service/auth/UserPersonService.java +++ /dev/null @@ -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 filterUserPersons(UserPersonFilterRequest userPersonFilterRequest); - List selectByRegisterId(String registerId); -} diff --git a/src/main/java/com/glxp/api/service/auth/UserRegisterService.java b/src/main/java/com/glxp/api/service/auth/UserRegisterService.java deleted file mode 100644 index d7acef7..0000000 --- a/src/main/java/com/glxp/api/service/auth/UserRegisterService.java +++ /dev/null @@ -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 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); -} diff --git a/src/main/java/com/glxp/api/service/auth/impl/SysRoleServiceImpl.java b/src/main/java/com/glxp/api/service/auth/impl/SysRoleServiceImpl.java index 2204e89..8e2a931 100644 --- a/src/main/java/com/glxp/api/service/auth/impl/SysRoleServiceImpl.java +++ b/src/main/java/com/glxp/api/service/auth/impl/SysRoleServiceImpl.java @@ -4,8 +4,6 @@ import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import com.github.pagehelper.PageHelper; -import com.glxp.api.common.res.BaseResponse; -import com.glxp.api.common.util.ResultVOUtils; import com.glxp.api.constant.Constant; import com.glxp.api.dao.auth.SysRoleMapper; import com.glxp.api.dao.auth.SysRoleMenuMapper; diff --git a/src/main/java/com/glxp/api/service/auth/impl/UserCertServiceImpl.java b/src/main/java/com/glxp/api/service/auth/impl/UserCertServiceImpl.java deleted file mode 100644 index be9899b..0000000 --- a/src/main/java/com/glxp/api/service/auth/impl/UserCertServiceImpl.java +++ /dev/null @@ -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 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 selectByRegisterId(String registerId) { - return userCertDao.selectByRegisterId(registerId); - } -} diff --git a/src/main/java/com/glxp/api/service/auth/impl/UserPersonServiceImpl.java b/src/main/java/com/glxp/api/service/auth/impl/UserPersonServiceImpl.java deleted file mode 100644 index da55679..0000000 --- a/src/main/java/com/glxp/api/service/auth/impl/UserPersonServiceImpl.java +++ /dev/null @@ -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 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 selectByRegisterId(String registerId) { - return userPersonDao.selectByRegisterId(registerId); - } -} diff --git a/src/main/java/com/glxp/api/service/auth/impl/UserRegisterServiceImpl.java b/src/main/java/com/glxp/api/service/auth/impl/UserRegisterServiceImpl.java deleted file mode 100644 index 08ce973..0000000 --- a/src/main/java/com/glxp/api/service/auth/impl/UserRegisterServiceImpl.java +++ /dev/null @@ -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 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); - } -} diff --git a/src/main/java/com/glxp/api/service/auth/UserCompanyService.java b/src/main/java/com/glxp/api/service/sup/UserCompanyService.java similarity index 61% rename from src/main/java/com/glxp/api/service/auth/UserCompanyService.java rename to src/main/java/com/glxp/api/service/sup/UserCompanyService.java index f9292bf..e1754be 100644 --- a/src/main/java/com/glxp/api/service/auth/UserCompanyService.java +++ b/src/main/java/com/glxp/api/service/sup/UserCompanyService.java @@ -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{ diff --git a/src/main/java/com/glxp/api/service/auth/impl/UserCompanyServiceImpl.java b/src/main/java/com/glxp/api/service/sup/impl/UserCompanyServiceImpl.java similarity index 56% rename from src/main/java/com/glxp/api/service/auth/impl/UserCompanyServiceImpl.java rename to src/main/java/com/glxp/api/service/sup/impl/UserCompanyServiceImpl.java index 3475441..9ab9d66 100644 --- a/src/main/java/com/glxp/api/service/auth/impl/UserCompanyServiceImpl.java +++ b/src/main/java/com/glxp/api/service/sup/impl/UserCompanyServiceImpl.java @@ -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 implements UserCompanyService{ diff --git a/src/main/resources/mybatis/mapper/auth/UserCertMapper.xml b/src/main/resources/mybatis/mapper/auth/UserCertMapper.xml deleted file mode 100644 index ccd8dcb..0000000 --- a/src/main/resources/mybatis/mapper/auth/UserCertMapper.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/main/resources/mybatis/mapper/auth/UserPersonMapper.xml b/src/main/resources/mybatis/mapper/auth/UserPersonMapper.xml deleted file mode 100644 index 9a0ac09..0000000 --- a/src/main/resources/mybatis/mapper/auth/UserPersonMapper.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/main/resources/mybatis/mapper/auth/UserRegisterDao.xml b/src/main/resources/mybatis/mapper/auth/UserRegisterDao.xml deleted file mode 100644 index 064c746..0000000 --- a/src/main/resources/mybatis/mapper/auth/UserRegisterDao.xml +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - - - - - - - - - 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}) - - - - UPDATE user_register - - `companyId`=#{companyId}, - mobile=#{mobile}, - `email`=#{email}, - userId=#{userId}, - realName=#{realName}, - companyName=#{companyName}, - contactWay=#{contactWay}, - creditNum=#{creditNum}, - registerAddress=#{registerAddress}, - bussinessStatus=#{bussinessStatus}, - checkStatus=#{checkStatus}, - legalPerson=#{legalPerson}, - legalIdCard=#{legalIdCard}, - checkStatus=#{checkStatus}, - registerTime=#{registerTime}, - checkTime=#{checkTime}, - comments=#{comments}, - - WHERE id=#{id} - - - - delete - from user_register - where id = #{id} - - - delete - from user_register - where mobile = #{mobile} and checkStatus=#{checkStatus} - - - - delete - from user_register - where userId = #{userId} - - - - - - - - - diff --git a/src/main/resources/mybatis/mapper/auth/UserCompanyMapper.xml b/src/main/resources/mybatis/mapper/sup/UserCompanyMapper.xml similarity index 72% rename from src/main/resources/mybatis/mapper/auth/UserCompanyMapper.xml rename to src/main/resources/mybatis/mapper/sup/UserCompanyMapper.xml index b760590..4886fcb 100644 --- a/src/main/resources/mybatis/mapper/auth/UserCompanyMapper.xml +++ b/src/main/resources/mybatis/mapper/sup/UserCompanyMapper.xml @@ -1,4 +1,4 @@ - +