1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- package com.ruoyi.app.controller;
- import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
- import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
- import com.ruoyi.app.controller.base.AppBaseController;
- import com.ruoyi.app.domain.TbFamily;
- import com.ruoyi.app.domain.TbMemberMiddle;
- import com.ruoyi.app.service.ITbFamilyService;
- import com.ruoyi.app.service.ITbMemberMiddleService;
- import com.ruoyi.common.core.domain.AjaxResult;
- import io.swagger.annotations.Api;
- import io.swagger.annotations.ApiImplicitParam;
- import io.swagger.annotations.ApiOperation;
- import lombok.RequiredArgsConstructor;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.GetMapping;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RestController;
- /**
- * 家族管理
- *
- * @author Alex
- * @date 2020-09-24
- */
- @Api(value = "家族管理",tags = "家族管理")
- @RequiredArgsConstructor(onConstructor_ = @Autowired)
- @RestController
- @RequestMapping("/app/family" )
- public class FamilyController extends AppBaseController {
- private final ITbFamilyService familyService;
- /**
- * 查询我的默认家族
- */
- @ApiOperation("我的默认家族")
- @ApiImplicitParam(name = "memberId", value = "家族成员ID",paramType="Long")
- @GetMapping("/myFamily")
- public AjaxResult myFamily(Long memberId){
- if (memberId == null) {
- return AjaxResult.error("成员id不能为空");
- }
- TbFamily family = familyService.myFamily(memberId);
- return AjaxResult.success(family);
- }
- @ApiOperation("我的家族列表")
- @ApiImplicitParam(name = "memberId", value = "家族成员ID",paramType="Long")
- @GetMapping("/myList")
- public AjaxResult myList(Long memberId){
- if (memberId == null) {
- return AjaxResult.error("成员id不能为空");
- }
- return AjaxResult.success(familyService.selectByMemberId(memberId));
- }
- //切换家族
- //家族树
- //家族成员
- }
|