From f2cf0730508895e11eefbf666933b873a237a46a Mon Sep 17 00:00:00 2001 From: liuxinxin Date: Tue, 14 Feb 2023 08:54:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=90=E5=91=98=E6=9F=A5=E8=AF=A2=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pmapi/ding/task/EmployeeBatchGetTask.java | 1 - .../controller/DingOrganizationController.java | 10 +++++ .../pmapi/user/controller/UserInfoController.java | 30 +++++++++++++- .../pmapi/user/manage/UserInfoManage.java | 29 +++++++++++++ .../pmapi/user/model/po/ReqUserDisablePO.java | 22 ++++++++++ .../pmapi/user/model/po/ReqUserInfoListPO.java | 37 +++++++++++++++++ .../pmapi/user/model/vo/ResUserInfoListVO.java | 47 ++++++++++++++++++++++ 7 files changed, 174 insertions(+), 2 deletions(-) create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/user/model/po/ReqUserDisablePO.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/user/model/po/ReqUserInfoListPO.java create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/user/model/vo/ResUserInfoListVO.java diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/ding/task/EmployeeBatchGetTask.java b/pmapi/src/main/java/com/ningdatech/pmapi/ding/task/EmployeeBatchGetTask.java index ab797aa..b5b3f89 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/ding/task/EmployeeBatchGetTask.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/ding/task/EmployeeBatchGetTask.java @@ -66,7 +66,6 @@ public class EmployeeBatchGetTask { } - } // zwddClient.pageOrganizationEmployeePositions(query); diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/organization/controller/DingOrganizationController.java b/pmapi/src/main/java/com/ningdatech/pmapi/organization/controller/DingOrganizationController.java index 12973e6..d61ea59 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/organization/controller/DingOrganizationController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/organization/controller/DingOrganizationController.java @@ -1,6 +1,8 @@ package com.ningdatech.pmapi.organization.controller; +import io.swagger.annotations.ApiModelProperty; +import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.stereotype.Controller; @@ -17,4 +19,12 @@ import org.springframework.stereotype.Controller; @RequestMapping("/api/v1/organization") public class DingOrganizationController { + @ApiModelProperty("单位成员配置") + @PostMapping("/member/config") + public void organizationManage() { + + } + + + } 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 d178e0d..8e2ae4c 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 @@ -1,9 +1,21 @@ package com.ningdatech.pmapi.user.controller; +import com.ningdatech.basic.model.PageVo; +import com.ningdatech.pmapi.user.manage.UserInfoManage; +import com.ningdatech.pmapi.user.model.po.ReqUserDisablePO; +import com.ningdatech.pmapi.user.model.po.ReqUserInfoListPO; +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; +import javax.validation.Valid; + /** *

* 用户信息表 前端控制器 @@ -13,7 +25,23 @@ import org.springframework.web.bind.annotation.RequestMapping; * @since 2023-01-04 */ @Controller -@RequestMapping("/pmapi.user/user-info") +@RequestMapping("/api/v1/user-info") +@RequiredArgsConstructor +@Api(value = "UserInfoController", tags = "用户管理") public class UserInfoController { + private final UserInfoManage userInfoManage; + + @ApiOperation(value = "用户列表搜索", notes = "用户列表搜索") + @PostMapping("/list") + public PageVo userInfoList(@Valid @RequestBody ReqUserInfoListPO reqUserInfoListPO) { + return userInfoManage.list(reqUserInfoListPO); + } + + @ApiOperation(value = "用户禁用", notes = "用户禁用") + @PostMapping("/disable") + public void disable(@Valid @RequestBody ReqUserDisablePO reqUserDisablePO){ + userInfoManage.disable(reqUserDisablePO); + } + } 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 new file mode 100644 index 0000000..39d3812 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/user/manage/UserInfoManage.java @@ -0,0 +1,29 @@ +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.ReqUserDisablePO; +import com.ningdatech.pmapi.user.model.po.ReqUserInfoListPO; +import com.ningdatech.pmapi.user.model.vo.ResUserInfoListVO; +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Component; + +/** + * @author liuxinxin + * @date 2023/2/13 上午9:09 + */ +@Component +@RequiredArgsConstructor +public class UserInfoManage { + private final UserInfoMapper userInfoMapper; + + + public PageVo list(ReqUserInfoListPO reqUserInfoListPO) { + + return null; + } + + public void disable(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 new file mode 100644 index 0000000..2f712df --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/user/model/po/ReqUserDisablePO.java @@ -0,0 +1,22 @@ +package com.ningdatech.pmapi.user.model.po; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/** + * @author liuxinxin + * @date 2023/2/13 上午9:31 + */ + +@Data +@ApiModel("用户禁用PO") +public class ReqUserDisablePO { + + @NotBlank(message = "用户ID不能为空") + @ApiModelProperty("用户id") + private Long userId; + +} diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/user/model/po/ReqUserInfoListPO.java b/pmapi/src/main/java/com/ningdatech/pmapi/user/model/po/ReqUserInfoListPO.java new file mode 100644 index 0000000..9706f1e --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/user/model/po/ReqUserInfoListPO.java @@ -0,0 +1,37 @@ +package com.ningdatech.pmapi.user.model.po; + +import com.ningdatech.basic.model.PagePo; +import com.ningdatech.pmapi.sys.model.entity.Role; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * @author liuxinxin + * @date 2023/2/13 上午9:10 + */ +@Data +@ApiModel("用户管理查询 请求入参") +public class ReqUserInfoListPO extends PagePo { + + @ApiModelProperty("姓名") + private String name; + + @ApiModelProperty("手机号码") + private String phoneNo; + + @ApiModelProperty("所在单位(主职)") + private String orgName; + + @ApiModelProperty("所属区域") + private Long regionId; + + @ApiModelProperty("用户角色") + private List userRoleList; + + @ApiModelProperty("状态") + private String status; + +} 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 new file mode 100644 index 0000000..3e61983 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/user/model/vo/ResUserInfoListVO.java @@ -0,0 +1,47 @@ +package com.ningdatech.pmapi.user.model.vo; + +import com.ningdatech.pmapi.sys.model.entity.Role; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.time.LocalDateTime; +import java.util.List; + +/** + * @author liuxinxin + * @date 2023/2/13 上午9:10 + */ +@Data +@ApiModel("用户管理查询 请求response") +public class ResUserInfoListVO { + + @ApiModelProperty("用户id") + private Long userId; + + @ApiModelProperty("姓名") + private String name; + + @ApiModelProperty("手机号码") + private String phoneNo; + + @ApiModelProperty("所在单位(主职)") + private String orgName; + + @ApiModelProperty("所在单位(主职)id") + private Long orgId; + + @ApiModelProperty("所属区域") + private Long regionId; + + @ApiModelProperty("用户角色") + private List userRoleList; + + @ApiModelProperty("状态") + private String status; + + @ApiModelProperty("更新时间") + private LocalDateTime updateTime; + + +}