|
|
@@ -25,18 +25,58 @@ import com.xjrsoft.common.utils.RedisUtil;
|
|
|
import com.xjrsoft.common.utils.VoToColumnUtil;
|
|
|
import com.xjrsoft.config.CommonPropertiesConfig;
|
|
|
import com.xjrsoft.module.base.service.IBaseClassService;
|
|
|
-import com.xjrsoft.module.organization.dto.*;
|
|
|
-import com.xjrsoft.module.organization.entity.*;
|
|
|
-import com.xjrsoft.module.organization.service.*;
|
|
|
+import com.xjrsoft.module.organization.dto.AddUserDto;
|
|
|
+import com.xjrsoft.module.organization.dto.BindOpenidDto;
|
|
|
+import com.xjrsoft.module.organization.dto.LoginResetPasswordDto;
|
|
|
+import com.xjrsoft.module.organization.dto.RegisterDto;
|
|
|
+import com.xjrsoft.module.organization.dto.ResetPasswordDto;
|
|
|
+import com.xjrsoft.module.organization.dto.UpdateInfoDto;
|
|
|
+import com.xjrsoft.module.organization.dto.UpdatePasswordDto;
|
|
|
+import com.xjrsoft.module.organization.dto.UpdateUserDto;
|
|
|
+import com.xjrsoft.module.organization.dto.UserPageDto;
|
|
|
+import com.xjrsoft.module.organization.dto.UserStudentAddDto;
|
|
|
+import com.xjrsoft.module.organization.dto.UserStudentBindDto;
|
|
|
+import com.xjrsoft.module.organization.dto.UserStudentDeleteDto;
|
|
|
+import com.xjrsoft.module.organization.entity.Department;
|
|
|
+import com.xjrsoft.module.organization.entity.Post;
|
|
|
+import com.xjrsoft.module.organization.entity.Role;
|
|
|
+import com.xjrsoft.module.organization.entity.User;
|
|
|
+import com.xjrsoft.module.organization.entity.UserDeptRelation;
|
|
|
+import com.xjrsoft.module.organization.entity.UserPostRelation;
|
|
|
+import com.xjrsoft.module.organization.entity.UserRoleRelation;
|
|
|
+import com.xjrsoft.module.organization.service.IDepartmentService;
|
|
|
+import com.xjrsoft.module.organization.service.IPostService;
|
|
|
+import com.xjrsoft.module.organization.service.IRoleService;
|
|
|
+import com.xjrsoft.module.organization.service.IUserDeptRelationService;
|
|
|
+import com.xjrsoft.module.organization.service.IUserPostRelationService;
|
|
|
+import com.xjrsoft.module.organization.service.IUserRoleRelationService;
|
|
|
+import com.xjrsoft.module.organization.service.IUserService;
|
|
|
+import com.xjrsoft.module.organization.service.IUserStudentService;
|
|
|
import com.xjrsoft.module.organization.utils.OrganizationUtil;
|
|
|
-import com.xjrsoft.module.organization.vo.*;
|
|
|
+import com.xjrsoft.module.organization.vo.PendingCountDto;
|
|
|
+import com.xjrsoft.module.organization.vo.ResetUserPageVo;
|
|
|
+import com.xjrsoft.module.organization.vo.ResetUserRoleVo;
|
|
|
+import com.xjrsoft.module.organization.vo.UserDeptVo;
|
|
|
+import com.xjrsoft.module.organization.vo.UserInfoVo;
|
|
|
+import com.xjrsoft.module.organization.vo.UserListVo;
|
|
|
+import com.xjrsoft.module.organization.vo.UserPageVo;
|
|
|
+import com.xjrsoft.module.organization.vo.UserPostVo;
|
|
|
+import com.xjrsoft.module.organization.vo.UserRoleVo;
|
|
|
+import com.xjrsoft.module.organization.vo.UserStudentVo;
|
|
|
+import com.xjrsoft.module.organization.vo.UserVo;
|
|
|
import com.xjrsoft.module.oss.factory.OssFactory;
|
|
|
-import com.xjrsoft.module.system.entity.DictionaryDetail;
|
|
|
import com.xjrsoft.module.workflow.service.IWorkflowExecuteService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
-import org.springframework.web.bind.annotation.*;
|
|
|
+import org.springframework.web.bind.annotation.DeleteMapping;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.PutMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
import javax.validation.Valid;
|
|
|
@@ -244,7 +284,6 @@ public class UserController {
|
|
|
|
|
|
}
|
|
|
|
|
|
-
|
|
|
if (deptIds.size() > 0) {
|
|
|
List<Department> list = departmentService.list(Wrappers.lambdaQuery(Department.class).in(Department::getId, deptIds));
|
|
|
|
|
|
@@ -286,6 +325,38 @@ public class UserController {
|
|
|
return RT.ok(pendingCountDto);
|
|
|
}
|
|
|
|
|
|
+ @GetMapping(value = "/reset-user-page")
|
|
|
+ @ApiOperation(value = "移动端用户列表")
|
|
|
+ public RT<PageOutput<ResetUserPageVo>> resetUserPage(UserPageDto dto) {
|
|
|
+ PageOutput<ResetUserPageVo> userPage = userService.getResetUserPage(dto);
|
|
|
+
|
|
|
+ return RT.ok(userPage);
|
|
|
+ }
|
|
|
+
|
|
|
+ @GetMapping(value = "/reset-page-role-list")
|
|
|
+ @ApiOperation(value = "移动端用户列表分类")
|
|
|
+ public RT<List<ResetUserRoleVo>> resetUserTree() {
|
|
|
+ List<ResetUserRoleVo> roleList = new ArrayList<>();
|
|
|
+ roleList.add(new ResetUserRoleVo(){{
|
|
|
+ setId(null);
|
|
|
+ setName("全部");
|
|
|
+ }});
|
|
|
+ roleList.add(new ResetUserRoleVo(){{
|
|
|
+ setId(2L);
|
|
|
+ setName("教师");
|
|
|
+ }});
|
|
|
+ roleList.add(new ResetUserRoleVo(){{
|
|
|
+ setId(3L);
|
|
|
+ setName("学生");
|
|
|
+ }});
|
|
|
+ roleList.add(new ResetUserRoleVo(){{
|
|
|
+ setId(4L);
|
|
|
+ setName("家长");
|
|
|
+ }});
|
|
|
+
|
|
|
+ return RT.ok(roleList);
|
|
|
+ }
|
|
|
+
|
|
|
@PutMapping("/update/info")
|
|
|
@ApiOperation(value = "登陆人修改自己得用户信息")
|
|
|
public R updateInfo(@RequestBody @Valid UpdateInfoDto dto) {
|
|
|
@@ -398,6 +469,12 @@ public class UserController {
|
|
|
return RT.ok(userService.resetPassword(dto));
|
|
|
}
|
|
|
|
|
|
+ @PutMapping("/batch-reset-password")
|
|
|
+ @ApiOperation(value = "批量重置密码")
|
|
|
+ public RT<Boolean> batchResetPassword(@RequestBody List<Long> ids) {
|
|
|
+ return RT.ok(userService.batchResetPassword(ids));
|
|
|
+ }
|
|
|
+
|
|
|
@PostMapping("/bind-unionid")
|
|
|
@ApiOperation(value = "绑定微信 UnionId")
|
|
|
public R bindUnionId(@RequestBody BindOpenidDto dto) {
|