888
whywhyo
2023-05-08 a2cc89fdd214c1a350d1f5b06447c155c47a5c25
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZInfoUserController.java
@@ -20,6 +20,7 @@
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import javax.websocket.server.PathParam;
import java.util.Arrays;
import java.util.List;
import java.util.regex.Pattern;
@@ -181,6 +182,39 @@
        return zInfoUserService.empower(empowerDto);
    }
    /**
     * 家根网
     */
    @GetMapping("/root")
    public AjaxResult listAllPeopleWithTree(@PathParam("depth") Integer depth){
        return zInfoUserService.listWithTree(depth);
    }
    /**
     * 找到所有的成员
     */
    @GetMapping("/all")
    public AjaxResult listAllPeople(){
        return zInfoUserService.listAllExceptAdmin();
    }
    /**
     * 新增、修改父子关系
     */
    @PutMapping("/setParent")
    public AjaxResult addParent(@PathParam("fatherId")Long fatherId,@PathParam("motherId")Long motherId){
        return zInfoUserService.addParent(fatherId,motherId);
    }
    /**
     * 根据本人id查询本人信息以及配偶信息
     */
    @GetMapping("/listMyself/{id}")
    public AjaxResult listMySelfAndSpouse(@PathVariable("id") Long id){
        return zInfoUserService.listMySelfAndSpouse(id);
    }
}