From c3a3fd61c88e008fa7857b748c227be46e8a76e5 Mon Sep 17 00:00:00 2001
From: whywhyo <1511349576@qq.com>
Date: 星期六, 05 八月 2023 11:45:17 +0800
Subject: [PATCH] 15648

---
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZInfoUserController.java |   49 +++++++++++++++++++++++++++++--------------------
 1 files changed, 29 insertions(+), 20 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 2f8e4c9..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,10 +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;
@@ -45,6 +48,12 @@
 
     @Resource
     private ZInfoUserService zInfoUserService;
+
+    @Resource
+    private ZfFamilyService zfFamilyService;
+
+    @Resource
+    private ZfRoleService zfRoleService;
 
 //    @GetMapping("/all")
 //    public AjaxResult  listAll(ZInfoUser zInfoUser){
@@ -103,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));
     }
+
 
 //    /**
 //     * 淇敼涓汉璇︾粏淇℃伅璁板綍
@@ -153,15 +163,12 @@
      */
     @GetMapping("/relation")
     public AjaxResult listMyRelation() {
-        SysUser user = SecurityUtils.getLoginUser().getUser();
-        Long userId = user.getUserId();
-        return zInfoUserService.searchMyRelation(userId);
+        return zInfoUserService.searchMyRelation();
     }
 
     @PostMapping("/relation")
     public AjaxResult addRelation(@RequestBody ZfRelation zfRelation){
         return zInfoUserService.addRelation(zfRelation);
-
     }
 
     @PutMapping("/relation")
@@ -175,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);
+//    }
 
     /**
      * 瀹舵牴缃�
@@ -238,5 +245,7 @@
         util.exportExcel(response,list,"瀹惰氨璁板綍鏁版嵁");
     }
 
+
+
 }
 

--
Gitblit v1.9.1