From 22acc39ce207d951c6dcadbcb1cc68e27059d595 Mon Sep 17 00:00:00 2001
From: zhubaomin <zhubaomin>
Date: 星期六, 12 十月 2024 17:19:20 +0800
Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV

---
 pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/user/UserCtrl.java |   32 ++++++++++++++++++++++++--------
 1 files changed, 24 insertions(+), 8 deletions(-)

diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/user/UserCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/user/UserCtrl.java
index 355834b..e8b00e6 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/user/UserCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-base/src/main/java/com/dy/pipIrrBase/user/UserCtrl.java
@@ -12,6 +12,7 @@
 import com.dy.pipIrrBase.result.SystemResultCode;
 import com.dy.pipIrrGlobal.pojoBa.BaUser;
 import com.dy.pipIrrGlobal.util.Constant;
+import com.dy.pipIrrGlobal.voBa.VoSimpleUser;
 import com.dy.pipIrrGlobal.voBa.VoUserInfo;
 import com.mysql.cj.util.StringUtils;
 import io.swagger.v3.oas.annotations.Operation;
@@ -94,11 +95,11 @@
     public BaseResponse<QueryResultVo<List<VoUserInfo>>> some(QueryVo vo) {
         try {
             QueryResultVo<List<VoUserInfo>> res = this.sv.selectSome(vo);
-            if(res.itemTotal == 0) {
-                return BaseResponseUtils.buildFail(SystemResultCode.THE_USER_NOT_EXIST.getMessage());
-            }else {
+//            if(res.itemTotal == 0) {
+//                return BaseResponseUtils.buildSuccess(SystemResultCode.THE_USER_NOT_EXIST.getMessage());
+//            }else {
                 return BaseResponseUtils.buildSuccess(res);
-            }
+//            }
 
 
         } catch (Exception e) {
@@ -297,13 +298,13 @@
                             schema = @Schema(implementation = Boolean.class))}
             )
     })
-    @PostMapping(path = "resetPassword")
+    @PostMapping(path = "resetPassword", consumes = MediaType.APPLICATION_JSON_VALUE)
     @SsoAop()
-    public BaseResponse<Boolean> resetPassword(String id) throws Exception {
-        if (id == null || id == "") {
+    public BaseResponse<Boolean> resetPassword(@RequestBody ResetPasswordVo vo) throws Exception {
+        if (vo.id == null || vo.id == "") {
             return BaseResponseUtils.buildFail("id涓嶈兘涓虹┖");
         }
-        Long idLg = Long.parseLong(id);
+        Long idLg = Long.parseLong(vo.id);
         int count;
         try {
             BaUser po = this.sv.selectById(idLg);
@@ -514,4 +515,19 @@
             return BaseResponseUtils.buildException(e.getMessage());
         }
     }
+
+    /**
+     * 鑾峰彇绠�鍗曠敤鎴锋暟鎹垪琛紝鏁版嵁鍒楄〃鏌ヨ鏉′欢涓娇鐢�
+     * @return
+     */
+    @GetMapping(path = "simple_users")
+    @SsoAop()
+    public BaseResponse<List<VoSimpleUser>> getSimpleUsers(){
+        try {
+            return BaseResponseUtils.buildSuccess(sv.getSimpleUsers());
+        } catch (Exception e) {
+            log.error("鏌ヨ绠�鍗曠敤鎴蜂俊鎭紓甯�", e);
+            return BaseResponseUtils.buildException(e.getMessage());
+        }
+    }
 }

--
Gitblit v1.8.0