hlf 1 年間 前
コミット
d655bc300f

+ 17 - 7
src/main/java/com/gyee/table/controller/SysUserController.java

@@ -3,14 +3,13 @@ package com.gyee.table.controller;
 import com.alibaba.fastjson2.JSONObject;
 import com.gyee.table.entity.SysUser;
 import com.gyee.table.result.Result;
+import com.gyee.table.result.ResultCode;
 import com.gyee.table.service.ISysUserService;
 import lombok.extern.slf4j.Slf4j;
-import org.springframework.web.bind.annotation.PostMapping;
-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.bind.annotation.*;
 
 import javax.annotation.Resource;
+import java.util.List;
 
 /**
  * @author hlf
@@ -26,11 +25,22 @@ public class SysUserController {
     private ISysUserService userService;
 
     /**
+     * 获取所有用户
+     *
+     * @return
+     */
+    @GetMapping("/getUserList")
+    public JSONObject getUserList() {
+        List<SysUser> list = userService.list();
+        return Result.successData(ResultCode.SUCCESS, list);
+    }
+
+    /**
      * 修改密码
      *
-     * @param id 用户ID
+     * @param id               用户ID
      * @param originalPassword 旧密码
-     * @param newPassword 新密码
+     * @param newPassword      新密码
      * @return
      */
     @PostMapping("/changePassword")
@@ -38,7 +48,7 @@ public class SysUserController {
                                      @RequestParam(value = "originalPassword") String originalPassword,
                                      @RequestParam(value = "newPassword") String newPassword) {
         SysUser user = userService.getById(id);
-        if (!originalPassword.equals(user.getPassword())){
+        if (!originalPassword.equals(user.getPassword())) {
             return Result.error();
         }
         user.setPassword(newPassword);

+ 4 - 4
src/main/java/com/gyee/table/entity/Configurationinfo.java

@@ -18,7 +18,7 @@ public class Configurationinfo {
 
     @Id
     private String id;
-    //组件名称
+    //组件名称(筛选)
     private String name;
     //是否需要支持修改背景色
     private String needBg;
@@ -28,7 +28,7 @@ public class Configurationinfo {
     private String needLw;
     //是否需要支持值映射
     private String needMap;
-    //仅查看已禁用
+    //仅查看已禁用(筛选)
     private String needMapDone;
     //组件状态的其他补充描述
     private String otherDesc;
@@ -44,11 +44,11 @@ public class Configurationinfo {
     private String type;
     //组件上传日期
     private String uploadDate;
-    //上传用户ID
+    //上传用户ID(筛选)
     private String uploadUser;
     //组件更新日期
     private String updataDate;
-    //修改用户ID
+    //修改用户ID(筛选)
     private String changeUser;
     //页码
     private Integer pageNum;