From dfdd4bd5d112a17ccd1483ad11fe023817d54d26 Mon Sep 17 00:00:00 2001
From: whywhyo <1511349576@qq.com>
Date: 星期六, 22 七月 2023 15:20:13 +0800
Subject: [PATCH] 45648

---
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfFamilyController.java |   43 ++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 40 insertions(+), 3 deletions(-)

diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfFamilyController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfFamilyController.java
index 09398a8..13bc437 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfFamilyController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfFamilyController.java
@@ -1,10 +1,10 @@
 package com.ruoyi.web.controller.zhang;
 
 import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.domain.dto.UserInfoDto;
 import com.ruoyi.service.ZfFamilyService;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.security.core.parameters.P;
+import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
 
@@ -26,5 +26,42 @@
         return AjaxResult.success(zfFamilyService.list());
     }
 
+    /**
+     * 鏍规嵁瀹跺涵id鏌ヨ瀹跺涵鎴愬憳
+     */
+    @GetMapping("/{fid}")
+    public AjaxResult getByFamilyId(@PathVariable Long fid){
+        return AjaxResult.success(zfFamilyService.getByFamilyId(fid));
+    }
+
+    /**
+     * 鏌ョ湅褰撳墠鐢ㄦ埛褰撳墠瀹跺涵鐨勫搴垚鍛�
+     */
+
+    @GetMapping("/now")
+    public AjaxResult getNowMember(){
+        return AjaxResult.success(zfFamilyService.getNowMember());
+    }
+
+    /**
+     * 鏂板瀹跺涵鎴愬憳
+     */
+    @PostMapping()
+    public AjaxResult addFamilyMember(@RequestBody UserInfoDto userInfoDto){
+        return zfFamilyService.addMember(userInfoDto);
+
+    }
+
+    /**
+     * 鍒犻櫎瀹跺涵鎴愬憳
+     */
+
+    @DeleteMapping()
+    public AjaxResult removeFamilyMember(@RequestBody UserInfoDto userInfoDto){
+        return zfFamilyService.removeMember(userInfoDto);
+    }
+
+
+
 
 }

--
Gitblit v1.9.1