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