From fc4b360e4ce47c29cc96f941d37d22a225a139b1 Mon Sep 17 00:00:00 2001
From: whywhyo <1511349576@qq.com>
Date: 星期六, 29 七月 2023 10:37:32 +0800
Subject: [PATCH] 56187

---
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZInfoUserController.java |   43 +++++++++++++++++++++++++++----------------
 1 files changed, 27 insertions(+), 16 deletions(-)

diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZInfoUserController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZInfoUserController.java
index 33fc28d..a473bbe 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZInfoUserController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZInfoUserController.java
@@ -12,11 +12,13 @@
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.domain.ZInfoUser;
 import com.ruoyi.domain.ZfRelation;
-import com.ruoyi.domain.dto.EmpowerDto;
+
 import com.ruoyi.domain.dto.Genealogy;
 import com.ruoyi.domain.dto.GenealogyExportDto;
 import com.ruoyi.domain.dto.RelationDto;
 import com.ruoyi.service.ZInfoUserService;
+import com.ruoyi.service.ZfFamilyService;
+import com.ruoyi.service.ZfRoleService;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
@@ -46,6 +48,12 @@
 
     @Resource
     private ZInfoUserService zInfoUserService;
+
+    @Resource
+    private ZfFamilyService zfFamilyService;
+
+    @Resource
+    private ZfRoleService zfRoleService;
 
 //    @GetMapping("/all")
 //    public AjaxResult  listAll(ZInfoUser zInfoUser){
@@ -104,25 +112,26 @@
     public AjaxResult getInfo() {
         SysUser user = SecurityUtils.getLoginUser().getUser();
         Long userId = user.getUserId();
-        return AjaxResult.success(zInfoUserService.getById(userId));
+        return AjaxResult.success(zInfoUserService.getInfoById(userId));
     }
 //
 
     /**
-     * 鏂板銆佷慨鏀逛釜浜鸿缁嗕俊鎭褰�
+     * 淇敼涓汉璇︾粏淇℃伅璁板綍
      */
 //    @PreAuthorize("@ss.hasPermi('system:property:add')")
     @Log(title = "涓汉璇︾粏淇℃伅璁板綍", businessType = BusinessType.INSERT)
-    @PostMapping
-    public AjaxResult add(@RequestBody ZInfoUser zInfoUser) {
-        if (!Pattern.matches("^[\\d]+(?:,[\\d]+)*$",zInfoUser.getFamilyId())) {
-            throw new RuntimeException("璇疯緭鍏ュ彧鏈夋暟瀛楀拰鑻辨枃閫楀彿鐨勫瓧绗︿覆锛屼笖鏁板瓧鍜岄�楀彿蹇呴』浜ゆ浛鍑虹幇");
-        }
+    @PutMapping
+    public AjaxResult update(@RequestBody ZInfoUser zInfoUser) {
+//        if (!Pattern.matches("^[\\d]+(?:,[\\d]+)*$",zInfoUser.getFamilyId())) {
+//            throw new RuntimeException("璇疯緭鍏ュ彧鏈夋暟瀛楀拰鑻辨枃閫楀彿鐨勫瓧绗︿覆锛屼笖鏁板瓧鍜岄�楀彿蹇呴』浜ゆ浛鍑虹幇");
+//        }
         SysUser user = SecurityUtils.getLoginUser().getUser();
         Long userId = user.getUserId();
         zInfoUser.setUserId(userId);
         return toAjax(zInfoUserService.saveOrUpdate(zInfoUser));
     }
+
 
 //    /**
 //     * 淇敼涓汉璇︾粏淇℃伅璁板綍
@@ -173,14 +182,14 @@
     }
 
 
-    /**
-     * 鎺堟潈
-     */
-    @PostMapping("/empower")
-    public AjaxResult empower(@RequestBody EmpowerDto empowerDto){
-
-        return zInfoUserService.empower(empowerDto);
-    }
+//    /**
+//     * 鎺堟潈
+//     */
+//    @PostMapping("/empower")
+//    public AjaxResult empower(@RequestBody EmpowerDto empowerDto){
+//
+//        return zInfoUserService.empower(empowerDto);
+//    }
 
     /**
      * 瀹舵牴缃�
@@ -236,5 +245,7 @@
         util.exportExcel(response,list,"瀹惰氨璁板綍鏁版嵁");
     }
 
+
+
 }
 

--
Gitblit v1.9.1