From f1dc6492682599a6b07572539c07554ed4b4cb18 Mon Sep 17 00:00:00 2001 From: liuxinxin Date: Wed, 15 Feb 2023 16:08:34 +0800 Subject: [PATCH 1/2] =?UTF-8?q?adjust=20=E8=B0=83=E6=95=B4=20=E5=86=97?= =?UTF-8?q?=E4=BD=99=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pmapi/common/constant/DingConstant.java | 4 +- .../bean/vo/ProcessProgressDetailVo.java | 1 - .../bean/vo/ProgressNodeAuditInfoVo.java | 1 - .../pmapi/todocenter/manage/TodoCenterManage.java | 6 -- .../model/dto/res/ResToBeProcessedDTO.java | 10 +- .../pmapi/user/controller/UserInfoController.java | 3 +- .../ningdatech/pmapi/user/entity/NdUserAuth.java | 99 ------------------- .../ningdatech/pmapi/user/entity/NdUserInfo.java | 109 --------------------- .../com/ningdatech/pmapi/user/entity/UserAuth.java | 14 +-- .../com/ningdatech/pmapi/user/entity/UserInfo.java | 49 +-------- .../pmapi/user/manage/UserInfoManage.java | 3 - .../pmapi/user/mapper/NdUserAuthMapper.java | 16 --- .../pmapi/user/mapper/NdUserAuthMapper.xml | 5 - .../pmapi/user/mapper/NdUserInfoMapper.java | 4 +- .../pmapi/user/mapper/UserAuthMapper.java | 8 +- .../pmapi/user/mapper/UserInfoMapper.java | 16 --- .../pmapi/user/mapper/UserInfoMapper.xml | 5 - .../pmapi/user/service/INdUserAuthService.java | 16 --- .../pmapi/user/service/INdUserInfoService.java | 16 --- .../pmapi/user/service/IUserAuthService.java | 13 ++- .../pmapi/user/service/IUserInfoService.java | 10 +- .../user/service/impl/NdUserAuthServiceImpl.java | 20 ---- .../user/service/impl/NdUserInfoServiceImpl.java | 20 ---- .../user/service/impl/UserAuthServiceImpl.java | 24 ++++- .../user/service/impl/UserInfoServiceImpl.java | 27 ++--- 25 files changed, 63 insertions(+), 436 deletions(-) delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/user/entity/NdUserAuth.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/user/entity/NdUserInfo.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/user/mapper/NdUserAuthMapper.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/user/mapper/NdUserAuthMapper.xml delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/user/mapper/UserInfoMapper.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/user/mapper/UserInfoMapper.xml delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/user/service/INdUserAuthService.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/user/service/INdUserInfoService.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/user/service/impl/NdUserAuthServiceImpl.java delete mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/user/service/impl/NdUserInfoServiceImpl.java diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/constant/DingConstant.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/constant/DingConstant.java index ebe14a2..9590c8b 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/constant/DingConstant.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/constant/DingConstant.java @@ -1,6 +1,8 @@ package com.ningdatech.pmapi.common.constant; + /** * 浙政钉常量 + * * @author CMM * @since 2023/02/01 14:49 */ @@ -9,4 +11,4 @@ public interface DingConstant { * 工作通知 */ String WORKING_NOTICE = "/message/workNotification"; -} +} \ No newline at end of file diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/bean/vo/ProcessProgressDetailVo.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/bean/vo/ProcessProgressDetailVo.java index 4fb8d53..35e2b35 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/bean/vo/ProcessProgressDetailVo.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/bean/vo/ProcessProgressDetailVo.java @@ -1,7 +1,6 @@ package com.ningdatech.pmapi.todocenter.bean.vo; -import com.ningdatech.pmapi.projectlib.model.entity.Project; import com.ningdatech.pmapi.todocenter.bean.entity.ProgressNode; import com.ningdatech.pmapi.user.entity.UserInfo; import com.wflow.workflow.bean.process.OrgUser; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/bean/vo/ProgressNodeAuditInfoVo.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/bean/vo/ProgressNodeAuditInfoVo.java index b1ced2d..b5d4400 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/bean/vo/ProgressNodeAuditInfoVo.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/bean/vo/ProgressNodeAuditInfoVo.java @@ -2,7 +2,6 @@ package com.ningdatech.pmapi.todocenter.bean.vo; import com.ningdatech.pmapi.todocenter.bean.entity.ProcessComment; import com.ningdatech.pmapi.user.entity.UserInfo; -import com.wflow.workflow.bean.process.OrgUser; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java index 7cc25d6..9e5d402 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java @@ -2,17 +2,14 @@ package com.ningdatech.pmapi.todocenter.manage; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; -import cn.hutool.json.JSONUtil; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.ningdatech.basic.enumeration.Status; import com.ningdatech.basic.exception.BizException; import com.ningdatech.basic.model.PageVo; import com.ningdatech.basic.util.NdDateUtils; -import com.ningdatech.pmapi.common.constant.DingConstant; import com.ningdatech.pmapi.common.enumeration.ExportOptionEnum; import com.ningdatech.pmapi.common.model.entity.ExcelExportWriter; import com.ningdatech.pmapi.common.statemachine.event.ProjectStatusChangeEvent; @@ -34,8 +31,6 @@ import com.ningdatech.pmapi.todocenter.model.dto.req.ReqProcessHandlerDTO; import com.ningdatech.pmapi.todocenter.model.dto.req.ReqToBeProcessedDTO; import com.ningdatech.pmapi.todocenter.model.dto.req.ReqToBeProcessedExportDTO; import com.ningdatech.pmapi.todocenter.model.dto.res.ResToBeProcessedDTO; -import com.ningdatech.pmapi.todocenter.zwdd.model.MessageContent; -import com.ningdatech.pmapi.todocenter.zwdd.model.MessageText; import com.ningdatech.pmapi.user.entity.UserInfo; import com.ningdatech.pmapi.user.service.IUserInfoService; import com.wflow.bean.do_.UserDo; @@ -83,7 +78,6 @@ import org.flowable.variable.api.history.HistoricVariableInstance; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Component; -import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/res/ResToBeProcessedDTO.java b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/res/ResToBeProcessedDTO.java index f03e734..3f3f778 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/res/ResToBeProcessedDTO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/dto/res/ResToBeProcessedDTO.java @@ -1,10 +1,5 @@ package com.ningdatech.pmapi.todocenter.model.dto.res; -import java.io.Serializable; -import java.math.BigDecimal; -import java.time.LocalDateTime; -import java.util.List; - import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; import com.fasterxml.jackson.annotation.JsonFormat; import com.ningdatech.pmapi.user.entity.UserInfo; @@ -14,7 +9,10 @@ import io.swagger.annotations.ApiModelProperty; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; -import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDateTime; /** * 待办中心-待我处理返回实体信息 diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/controller/UserInfoController.java b/pmapi/src/main/java/com/ningdatech/pmapi/user/controller/UserInfoController.java index 9c80c1e..fad8006 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/user/controller/UserInfoController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/user/controller/UserInfoController.java @@ -15,6 +15,7 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; import javax.validation.Valid; @@ -26,7 +27,7 @@ import javax.validation.Valid; * @author Liuxinxin * @since 2023-01-04 */ -@Controller +@RestController @RequestMapping("/api/v1/user-info") @RequiredArgsConstructor @Api(value = "UserInfoController", tags = "用户管理") diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/entity/NdUserAuth.java b/pmapi/src/main/java/com/ningdatech/pmapi/user/entity/NdUserAuth.java deleted file mode 100644 index 13d0acf..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/user/entity/NdUserAuth.java +++ /dev/null @@ -1,99 +0,0 @@ -package com.ningdatech.pmapi.user.entity; - -import com.baomidou.mybatisplus.annotation.TableName; -import java.io.Serializable; -import java.time.LocalDateTime; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; - -/** - *

- * - *

- * - * @author Lierbao - * @since 2023-02-01 - */ -@TableName("nd_user_auth") -@ApiModel(value = "NdUserAuth对象", description = "") -public class NdUserAuth implements Serializable { - - private static final long serialVersionUID = 1L; - - private Long id; - - private LocalDateTime createOn; - - private LocalDateTime updateOn; - - private Long userId; - - private String authType; - - private String identifier; - - private String credential; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - public LocalDateTime getCreateOn() { - return createOn; - } - - public void setCreateOn(LocalDateTime createOn) { - this.createOn = createOn; - } - public LocalDateTime getUpdateOn() { - return updateOn; - } - - public void setUpdateOn(LocalDateTime updateOn) { - this.updateOn = updateOn; - } - public Long getUserId() { - return userId; - } - - public void setUserId(Long userId) { - this.userId = userId; - } - public String getAuthType() { - return authType; - } - - public void setAuthType(String authType) { - this.authType = authType; - } - public String getIdentifier() { - return identifier; - } - - public void setIdentifier(String identifier) { - this.identifier = identifier; - } - public String getCredential() { - return credential; - } - - public void setCredential(String credential) { - this.credential = credential; - } - - @Override - public String toString() { - return "NdUserAuth{" + - "id=" + id + - ", createOn=" + createOn + - ", updateOn=" + updateOn + - ", userId=" + userId + - ", authType=" + authType + - ", identifier=" + identifier + - ", credential=" + credential + - "}"; - } -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/entity/NdUserInfo.java b/pmapi/src/main/java/com/ningdatech/pmapi/user/entity/NdUserInfo.java deleted file mode 100644 index ac8be23..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/user/entity/NdUserInfo.java +++ /dev/null @@ -1,109 +0,0 @@ -package com.ningdatech.pmapi.user.entity; - -import com.baomidou.mybatisplus.annotation.TableName; -import java.io.Serializable; -import java.time.LocalDateTime; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; - -/** - *

- * - *

- * - * @author Lierbao - * @since 2023-02-01 - */ -@TableName("nd_user_info") -@ApiModel(value = "NdUserInfo对象", description = "") -public class NdUserInfo implements Serializable { - - private static final long serialVersionUID = 1L; - - private Long id; - - private LocalDateTime createOn; - - private LocalDateTime updateOn; - - private Long createBy; - - private Long updateBy; - - private String username; - - private String mobile; - - private String realName; - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - public LocalDateTime getCreateOn() { - return createOn; - } - - public void setCreateOn(LocalDateTime createOn) { - this.createOn = createOn; - } - public LocalDateTime getUpdateOn() { - return updateOn; - } - - public void setUpdateOn(LocalDateTime updateOn) { - this.updateOn = updateOn; - } - public Long getCreateBy() { - return createBy; - } - - public void setCreateBy(Long createBy) { - this.createBy = createBy; - } - public Long getUpdateBy() { - return updateBy; - } - - public void setUpdateBy(Long updateBy) { - this.updateBy = updateBy; - } - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - public String getMobile() { - return mobile; - } - - public void setMobile(String mobile) { - this.mobile = mobile; - } - public String getRealName() { - return realName; - } - - public void setRealName(String realName) { - this.realName = realName; - } - - @Override - public String toString() { - return "NdUserInfo{" + - "id=" + id + - ", createOn=" + createOn + - ", updateOn=" + updateOn + - ", createBy=" + createBy + - ", updateBy=" + updateBy + - ", username=" + username + - ", mobile=" + mobile + - ", realName=" + realName + - "}"; - } -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/entity/UserAuth.java b/pmapi/src/main/java/com/ningdatech/pmapi/user/entity/UserAuth.java index 587dc45..5af0f52 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/user/entity/UserAuth.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/user/entity/UserAuth.java @@ -1,7 +1,5 @@ package com.ningdatech.pmapi.user.entity; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import io.swagger.annotations.ApiModel; import lombok.Data; @@ -11,20 +9,19 @@ import java.time.LocalDateTime; /** *

- * 用户鉴权表 + * *

* - * @author Liuxinxin - * @since 2023-01-04 + * @author Lierbao + * @since 2023-02-01 */ -@Data @TableName("nd_user_auth") -@ApiModel(value = "UserAuth对象", description = "用户鉴权表") +@Data +@ApiModel(value = "NdUserAuth对象", description = "") public class UserAuth implements Serializable { private static final long serialVersionUID = 1L; - @TableId(value = "id", type = IdType.AUTO) private Long id; private LocalDateTime createOn; @@ -38,5 +35,4 @@ public class UserAuth implements Serializable { private String identifier; private String credential; - } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/entity/UserInfo.java b/pmapi/src/main/java/com/ningdatech/pmapi/user/entity/UserInfo.java index 21c009d..03ced2e 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/user/entity/UserInfo.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/user/entity/UserInfo.java @@ -1,10 +1,7 @@ package com.ningdatech.pmapi.user.entity; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; import lombok.Builder; import lombok.Data; @@ -13,70 +10,34 @@ import java.time.LocalDateTime; /** *

- * 用户信息表 + * *

* - * @author Liuxinxin - * @since 2023-01-04 + * @author Lierbao + * @since 2023-02-01 */ -@Data @TableName("nd_user_info") -@ApiModel(value = "UserInfo对象", description = "用户信息表") @Builder +@Data +@ApiModel(value = "NdUserInfo对象", description = "") public class UserInfo implements Serializable { private static final long serialVersionUID = 1L; - @ApiModelProperty("主键") - @TableId(value = "id", type = IdType.AUTO) private Long id; - @ApiModelProperty("创建时间") private LocalDateTime createOn; - @ApiModelProperty("最后修改时间") private LocalDateTime updateOn; - @ApiModelProperty("创建人") private Long createBy; - @ApiModelProperty("最后修改人") private Long updateBy; - @ApiModelProperty("用户名(登陆账号)") private String username; - @ApiModelProperty("手机") private String mobile; - @ApiModelProperty("用户真实姓名") private String realName; - @ApiModelProperty("所属公司id") - private Long companyId; - - @ApiModelProperty("所属公司名称") - private String companyName; - - @ApiModelProperty("用户角色") - private String role; - - @ApiModelProperty("区域id") - private Long regionCode; - - @ApiModelProperty("头像文件id") - private Long avatarFileId; - - @ApiModelProperty("所负责的公司id列表") - private String manageCompanyIds; - - @ApiModelProperty("是否删除") - private Boolean deleted; - - @ApiModelProperty("身份证号") - private String idCard; - - @ApiModelProperty("浙政钉accountId") - private Long accountId; - } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java index ffcf71a..b8a66e9 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java @@ -1,7 +1,6 @@ package com.ningdatech.pmapi.user.manage; import com.ningdatech.basic.model.PageVo; -import com.ningdatech.pmapi.user.mapper.UserInfoMapper; import com.ningdatech.pmapi.user.model.po.ReqUserDetailEditPO; import com.ningdatech.pmapi.user.model.po.ReqUserDisablePO; import com.ningdatech.pmapi.user.model.po.ReqUserInfoListPO; @@ -17,8 +16,6 @@ import org.springframework.stereotype.Component; @Component @RequiredArgsConstructor public class UserInfoManage { - private final UserInfoMapper userInfoMapper; - public PageVo list(ReqUserInfoListPO reqUserInfoListPO) { diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/mapper/NdUserAuthMapper.java b/pmapi/src/main/java/com/ningdatech/pmapi/user/mapper/NdUserAuthMapper.java deleted file mode 100644 index 0e9c14b..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/user/mapper/NdUserAuthMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.ningdatech.pmapi.user.mapper; - -import com.ningdatech.pmapi.user.entity.NdUserAuth; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; - -/** - *

- * Mapper 接口 - *

- * - * @author Lierbao - * @since 2023-02-01 - */ -public interface NdUserAuthMapper extends BaseMapper { - -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/mapper/NdUserAuthMapper.xml b/pmapi/src/main/java/com/ningdatech/pmapi/user/mapper/NdUserAuthMapper.xml deleted file mode 100644 index 618d2cf..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/user/mapper/NdUserAuthMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/mapper/NdUserInfoMapper.java b/pmapi/src/main/java/com/ningdatech/pmapi/user/mapper/NdUserInfoMapper.java index 6b98902..41cab02 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/user/mapper/NdUserInfoMapper.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/user/mapper/NdUserInfoMapper.java @@ -1,6 +1,6 @@ package com.ningdatech.pmapi.user.mapper; -import com.ningdatech.pmapi.user.entity.NdUserInfo; +import com.ningdatech.pmapi.user.entity.UserInfo; import com.baomidou.mybatisplus.core.mapper.BaseMapper; /** @@ -11,6 +11,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; * @author Lierbao * @since 2023-02-01 */ -public interface NdUserInfoMapper extends BaseMapper { +public interface NdUserInfoMapper extends BaseMapper { } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/mapper/UserAuthMapper.java b/pmapi/src/main/java/com/ningdatech/pmapi/user/mapper/UserAuthMapper.java index 84a85d9..5660e77 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/user/mapper/UserAuthMapper.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/user/mapper/UserAuthMapper.java @@ -1,15 +1,15 @@ package com.ningdatech.pmapi.user.mapper; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ningdatech.pmapi.user.entity.UserAuth; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; /** *

- * 用户鉴权表 Mapper 接口 + * Mapper 接口 *

* - * @author Liuxinxin - * @since 2023-01-04 + * @author Lierbao + * @since 2023-02-01 */ public interface UserAuthMapper extends BaseMapper { diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/mapper/UserInfoMapper.java b/pmapi/src/main/java/com/ningdatech/pmapi/user/mapper/UserInfoMapper.java deleted file mode 100644 index be92ee4..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/user/mapper/UserInfoMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.ningdatech.pmapi.user.mapper; - -import com.ningdatech.pmapi.user.entity.UserInfo; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; - -/** - *

- * 用户信息表 Mapper 接口 - *

- * - * @author Liuxinxin - * @since 2023-01-04 - */ -public interface UserInfoMapper extends BaseMapper { - -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/mapper/UserInfoMapper.xml b/pmapi/src/main/java/com/ningdatech/pmapi/user/mapper/UserInfoMapper.xml deleted file mode 100644 index acb1729..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/user/mapper/UserInfoMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/service/INdUserAuthService.java b/pmapi/src/main/java/com/ningdatech/pmapi/user/service/INdUserAuthService.java deleted file mode 100644 index 5b2b4c0..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/user/service/INdUserAuthService.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.ningdatech.pmapi.user.service; - -import com.ningdatech.pmapi.user.entity.NdUserAuth; -import com.baomidou.mybatisplus.extension.service.IService; - -/** - *

- * 服务类 - *

- * - * @author Lierbao - * @since 2023-02-01 - */ -public interface INdUserAuthService extends IService { - -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/service/INdUserInfoService.java b/pmapi/src/main/java/com/ningdatech/pmapi/user/service/INdUserInfoService.java deleted file mode 100644 index e33e2b8..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/user/service/INdUserInfoService.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.ningdatech.pmapi.user.service; - -import com.ningdatech.pmapi.user.entity.NdUserInfo; -import com.baomidou.mybatisplus.extension.service.IService; - -/** - *

- * 服务类 - *

- * - * @author Lierbao - * @since 2023-02-01 - */ -public interface INdUserInfoService extends IService { - -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/service/IUserAuthService.java b/pmapi/src/main/java/com/ningdatech/pmapi/user/service/IUserAuthService.java index 6de3e0a..16590f3 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/user/service/IUserAuthService.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/user/service/IUserAuthService.java @@ -1,16 +1,21 @@ package com.ningdatech.pmapi.user.service; -import com.ningdatech.pmapi.user.entity.UserAuth; import com.baomidou.mybatisplus.extension.service.IService; +import com.ningdatech.pmapi.user.entity.UserAuth; +import com.ningdatech.pmapi.user.entity.UserInfo; + +import java.util.Map; +import java.util.Set; /** *

- * 用户鉴权表 服务类 + * 服务类 *

* - * @author Liuxinxin - * @since 2023-01-04 + * @author Lierbao + * @since 2023-02-01 */ public interface IUserAuthService extends IService { + Map getUserMapByIds(Set staterUsers); } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/service/IUserInfoService.java b/pmapi/src/main/java/com/ningdatech/pmapi/user/service/IUserInfoService.java index f93880c..49c7459 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/user/service/IUserInfoService.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/user/service/IUserInfoService.java @@ -3,18 +3,14 @@ package com.ningdatech.pmapi.user.service; import com.ningdatech.pmapi.user.entity.UserInfo; import com.baomidou.mybatisplus.extension.service.IService; -import java.util.Map; -import java.util.Set; - /** *

- * 用户信息表 服务类 + * 服务类 *

* - * @author Liuxinxin - * @since 2023-01-04 + * @author Lierbao + * @since 2023-02-01 */ public interface IUserInfoService extends IService { - Map getUserMapByIds(Set staterUsers); } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/service/impl/NdUserAuthServiceImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/user/service/impl/NdUserAuthServiceImpl.java deleted file mode 100644 index d445598..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/user/service/impl/NdUserAuthServiceImpl.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.ningdatech.pmapi.user.service.impl; - -import com.ningdatech.pmapi.user.entity.NdUserAuth; -import com.ningdatech.pmapi.user.mapper.NdUserAuthMapper; -import com.ningdatech.pmapi.user.service.INdUserAuthService; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; - -/** - *

- * 服务实现类 - *

- * - * @author Lierbao - * @since 2023-02-01 - */ -@Service -public class NdUserAuthServiceImpl extends ServiceImpl implements INdUserAuthService { - -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/service/impl/NdUserInfoServiceImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/user/service/impl/NdUserInfoServiceImpl.java deleted file mode 100644 index 60b69e5..0000000 --- a/pmapi/src/main/java/com/ningdatech/pmapi/user/service/impl/NdUserInfoServiceImpl.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.ningdatech.pmapi.user.service.impl; - -import com.ningdatech.pmapi.user.entity.NdUserInfo; -import com.ningdatech.pmapi.user.mapper.NdUserInfoMapper; -import com.ningdatech.pmapi.user.service.INdUserInfoService; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; - -/** - *

- * 服务实现类 - *

- * - * @author Lierbao - * @since 2023-02-01 - */ -@Service -public class NdUserInfoServiceImpl extends ServiceImpl implements INdUserInfoService { - -} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/service/impl/UserAuthServiceImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/user/service/impl/UserAuthServiceImpl.java index aacda5b..9d49fca 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/user/service/impl/UserAuthServiceImpl.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/user/service/impl/UserAuthServiceImpl.java @@ -1,20 +1,36 @@ package com.ningdatech.pmapi.user.service.impl; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.ningdatech.pmapi.user.entity.UserAuth; +import com.ningdatech.pmapi.user.entity.UserInfo; import com.ningdatech.pmapi.user.mapper.UserAuthMapper; +import com.ningdatech.pmapi.user.mapper.NdUserInfoMapper; import com.ningdatech.pmapi.user.service.IUserAuthService; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.stream.Collectors; + /** *

- * 用户鉴权表 服务实现类 + * 服务实现类 *

* - * @author Liuxinxin - * @since 2023-01-04 + * @author Lierbao + * @since 2023-02-01 */ @Service +@RequiredArgsConstructor public class UserAuthServiceImpl extends ServiceImpl implements IUserAuthService { + private final NdUserInfoMapper userInfoMapper; + + @Override + public Map getUserMapByIds(Set staterUsers) { + List userInfos = userInfoMapper.selectBatchIds(staterUsers); + return userInfos.stream().collect(Collectors.toMap(UserInfo::getId, u -> u)); + } } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/service/impl/UserInfoServiceImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/user/service/impl/UserInfoServiceImpl.java index 19ae598..1cd8ccc 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/user/service/impl/UserInfoServiceImpl.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/user/service/impl/UserInfoServiceImpl.java @@ -1,35 +1,20 @@ package com.ningdatech.pmapi.user.service.impl; import com.ningdatech.pmapi.user.entity.UserInfo; -import com.ningdatech.pmapi.user.mapper.UserInfoMapper; +import com.ningdatech.pmapi.user.mapper.NdUserInfoMapper; import com.ningdatech.pmapi.user.service.IUserInfoService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import lombok.RequiredArgsConstructor; -import org.apache.catalina.User; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.stream.Collectors; - /** *

- * 用户信息表 服务实现类 + * 服务实现类 *

* - * @author Liuxinxin - * @since 2023-01-04 + * @author Lierbao + * @since 2023-02-01 */ @Service -@RequiredArgsConstructor -public class UserInfoServiceImpl extends ServiceImpl implements IUserInfoService { - private final UserInfoMapper userInfoMapper; - @Override - public Map getUserMapByIds(Set staterUsers) { - List userInfos = userInfoMapper.selectBatchIds(staterUsers); - return userInfos.stream().collect(Collectors.toMap(UserInfo::getId,u -> u )); - } +public class UserInfoServiceImpl extends ServiceImpl implements IUserInfoService { + } From f0eb4272cc0090065696d86efc141c28c93b8cc4 Mon Sep 17 00:00:00 2001 From: liuxinxin Date: Wed, 15 Feb 2023 17:02:25 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=94=A8=E5=88=97=E8=A1=A8=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E8=A1=A5=E5=85=85=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pmapi/user/controller/UserInfoController.java | 13 ++---- .../com/ningdatech/pmapi/user/entity/UserInfo.java | 1 + .../pmapi/user/manage/UserInfoManage.java | 50 +++++++++++++++++++++- .../pmapi/user/model/po/ReqUserDisablePO.java | 11 ++++- .../pmapi/user/model/vo/ResUserInfoListVO.java | 9 ++-- 5 files changed, 68 insertions(+), 16 deletions(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/controller/UserInfoController.java b/pmapi/src/main/java/com/ningdatech/pmapi/user/controller/UserInfoController.java index fad8006..4943f54 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/user/controller/UserInfoController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/user/controller/UserInfoController.java @@ -11,7 +11,6 @@ import com.ningdatech.pmapi.user.model.vo.ResUserInfoListVO; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.RequiredArgsConstructor; -import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; @@ -20,10 +19,6 @@ import org.springframework.web.bind.annotation.RestController; import javax.validation.Valid; /** - *

- * 用户信息表 前端控制器 - *

- * * @author Liuxinxin * @since 2023-01-04 */ @@ -41,10 +36,10 @@ public class UserInfoController { return userInfoManage.list(reqUserInfoListPO); } - @ApiOperation(value = "用户禁用", notes = "用户禁用") - @PostMapping("/disable") - public void disable(@Valid @RequestBody ReqUserDisablePO reqUserDisablePO) { - userInfoManage.disable(reqUserDisablePO); + @ApiOperation(value = "用户禁用/启用", notes = "用户禁用/启用") + @PostMapping("/disable-enable") + public void disableOrEnable(@Valid @RequestBody ReqUserDisablePO reqUserDisablePO) { + userInfoManage.disableOrEnable(reqUserDisablePO); } @ApiOperation(value = "用户详情", notes = "用户详情") diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/entity/UserInfo.java b/pmapi/src/main/java/com/ningdatech/pmapi/user/entity/UserInfo.java index 03ced2e..75d807f 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/user/entity/UserInfo.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/user/entity/UserInfo.java @@ -40,4 +40,5 @@ public class UserInfo implements Serializable { private String realName; + private String available; } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java index b8a66e9..de80bb9 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java @@ -1,14 +1,25 @@ package com.ningdatech.pmapi.user.manage; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ningdatech.basic.model.PageVo; +import com.ningdatech.pmapi.organization.model.entity.DingEmployeeInfo; +import com.ningdatech.pmapi.organization.service.IDingEmployeeInfoService; +import com.ningdatech.pmapi.organization.service.IDingOrganizationService; import com.ningdatech.pmapi.user.model.po.ReqUserDetailEditPO; import com.ningdatech.pmapi.user.model.po.ReqUserDisablePO; import com.ningdatech.pmapi.user.model.po.ReqUserInfoListPO; import com.ningdatech.pmapi.user.model.vo.ResUserDetailVO; import com.ningdatech.pmapi.user.model.vo.ResUserInfoListVO; +import com.ningdatech.pmapi.user.service.IUserInfoService; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Component; +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; + /** * @author liuxinxin * @date 2023/2/13 上午9:09 @@ -17,12 +28,47 @@ import org.springframework.stereotype.Component; @RequiredArgsConstructor public class UserInfoManage { + private final IDingOrganizationService iDingOrganizationService; + private final IDingEmployeeInfoService iDingEmployeeInfoService; + private final IUserInfoService iUserInfoService; + public PageVo list(ReqUserInfoListPO reqUserInfoListPO) { + LambdaQueryWrapper wrapper = Wrappers.lambdaQuery(DingEmployeeInfo.class) + .eq(DingEmployeeInfo::getMainJob, "true"); - return null; + Page page = iDingEmployeeInfoService.page(new Page<>(reqUserInfoListPO.getPageNumber(), reqUserInfoListPO.getPageSize()), wrapper); + List records = page.getRecords(); + long total = page.getTotal(); + List resUserInfoListVOList = new ArrayList<>(); + if (records != null && records.size() > 0) { + resUserInfoListVOList = records.stream() + .map(r -> { + ResUserInfoListVO resListVO = new ResUserInfoListVO(); + resListVO.setName(r.getEmployeeName()); + resListVO.setOrgName(r.getOrganizationCode()); + resListVO.setOrgCode(r.getOrganizationCode()); + // TODO 从用户信息中获取 +// resListVO.setPhoneNo(); + // 从所属组织中获取 +// resListVO.setRegionId(); + resListVO.setStatus(false); + resListVO.setUpdateTime(r.getUpdateOn()); +// 从用户信息中获取 + resListVO.setUserId(1L); + resListVO.setEmployeeCode(r.getEmployeeCode()); + resListVO.setUserRoleList(new ArrayList<>()); + return resListVO; + }).collect(Collectors.toList()); + } + + PageVo pageVo = new PageVo<>(); + pageVo.setTotal(total); + pageVo.setRecords(resUserInfoListVOList); + return pageVo; } - public void disable(ReqUserDisablePO reqUserDisablePO) { + public void disableOrEnable(ReqUserDisablePO reqUserDisablePO) { + } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/model/po/ReqUserDisablePO.java b/pmapi/src/main/java/com/ningdatech/pmapi/user/model/po/ReqUserDisablePO.java index 2f712df..96196fb 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/user/model/po/ReqUserDisablePO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/user/model/po/ReqUserDisablePO.java @@ -12,11 +12,18 @@ import javax.validation.constraints.NotBlank; */ @Data -@ApiModel("用户禁用PO") +@ApiModel("用户禁用/启用 PO") public class ReqUserDisablePO { - @NotBlank(message = "用户ID不能为空") @ApiModelProperty("用户id") private Long userId; + @NotBlank(message = "浙政钉 用户编码 不能为空") + @ApiModelProperty("浙政钉 用户编码") + private String employeeCode; + + @NotBlank(message = "浙政钉 用户编码 不能为空") + @ApiModelProperty("操作 true: 启用 / false 禁用") + private Boolean operation; + } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/model/vo/ResUserInfoListVO.java b/pmapi/src/main/java/com/ningdatech/pmapi/user/model/vo/ResUserInfoListVO.java index 3e61983..a16ee03 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/user/model/vo/ResUserInfoListVO.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/user/model/vo/ResUserInfoListVO.java @@ -19,6 +19,9 @@ public class ResUserInfoListVO { @ApiModelProperty("用户id") private Long userId; + @ApiModelProperty("浙政钉 用户编码") + private String employeeCode; + @ApiModelProperty("姓名") private String name; @@ -28,8 +31,8 @@ public class ResUserInfoListVO { @ApiModelProperty("所在单位(主职)") private String orgName; - @ApiModelProperty("所在单位(主职)id") - private Long orgId; + @ApiModelProperty("所在单位(主职)code") + private String orgCode; @ApiModelProperty("所属区域") private Long regionId; @@ -38,7 +41,7 @@ public class ResUserInfoListVO { private List userRoleList; @ApiModelProperty("状态") - private String status; + private Boolean status; @ApiModelProperty("更新时间") private LocalDateTime updateTime;