From e5ebd02de9615e2a22694dba7e4207526054b2f8 Mon Sep 17 00:00:00 2001 From: whywhyo <1511349576@qq.com> Date: 星期二, 11 七月 2023 23:21:44 +0800 Subject: [PATCH] 123456 --- ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZInfoUserController.java | 19 +++++++++---------- 1 files changed, 9 insertions(+), 10 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..1579775 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 @@ -15,6 +15,7 @@ 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 lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.*; @@ -108,20 +109,21 @@ // /** - * 鏂板銆佷慨鏀逛釜浜鸿缁嗕俊鎭褰� + * 淇敼涓汉璇︾粏淇℃伅璁板綍 */ // @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 +155,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") -- Gitblit v1.9.1