|  |  | 
 |  |  | import com.xzx.gc.common.request.BaseController; | 
 |  |  | import com.xzx.gc.model.JsonResult; | 
 |  |  | import com.xzx.gc.user.dto.DistribJoinDto; | 
 |  |  | import com.xzx.gc.user.dto.HeadProfitLitDto; | 
 |  |  | import com.xzx.gc.user.dto.HeadTeamDto; | 
 |  |  | import com.xzx.gc.user.service.DistribService; | 
 |  |  | import com.xzx.gc.user.vo.HeadInfoVo; | 
 |  |  | import com.xzx.gc.user.vo.HeadProfitListVo; | 
 |  |  | import com.xzx.gc.user.vo.HeadTeamVo; | 
 |  |  | import io.swagger.annotations.Api; | 
 |  |  | import io.swagger.annotations.ApiOperation; | 
 |  |  | import io.swagger.annotations.ApiResponse; | 
 |  |  | import io.swagger.annotations.ApiResponses; | 
 |  |  | import lombok.extern.slf4j.Slf4j; | 
 |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
 |  |  | import org.springframework.web.bind.annotation.PostMapping; | 
 |  |  | import org.springframework.web.bind.annotation.RequestBody; | 
 |  |  | import org.springframework.web.bind.annotation.RestController; | 
 |  |  |  | 
 |  |  | import javax.servlet.http.HttpServletRequest; | 
 |  |  | import java.util.List; | 
 |  |  |  | 
 |  |  | /** | 
 |  |  |  * @author wzy | 
 |  |  |  * @date 2021-07-14 | 
 |  |  |  **/ | 
 |  |  | @Api(tags = "小程序接口参数类") | 
 |  |  | @Api(tags = "分销-小程序") | 
 |  |  | @Slf4j | 
 |  |  | @RestController | 
 |  |  | public class ApiDistribController extends BaseController { | 
 |  |  | 
 |  |  |         distribService.join(distribJoinDto.getHeadId(), getUserId(request)); | 
 |  |  |         return JsonResult.success(); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @ApiOperation("获取团长信息") | 
 |  |  |     @ApiResponses({ | 
 |  |  |             @ApiResponse(code = 200, message = "success", response = HeadInfoVo.class) | 
 |  |  |     }) | 
 |  |  |     @PostMapping(value = "/distrib/headInfo") | 
 |  |  |     public JsonResult<HeadInfoVo> headInfo(HttpServletRequest request) { | 
 |  |  |         return JsonResult.success(distribService.findHeadInfo(getUserId(request))); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @ApiOperation("我的收益") | 
 |  |  |     @ApiResponses({ | 
 |  |  |             @ApiResponse(code = 200, message = "success", response = HeadProfitListVo.class) | 
 |  |  |     }) | 
 |  |  |     @PostMapping(value = "/distrib/headProfit") | 
 |  |  |     public JsonResult<List<HeadProfitListVo>> headProfitList(@RequestBody HeadProfitLitDto headProfitLitDto, HttpServletRequest request) { | 
 |  |  |         headProfitLitDto.setUserId(getUserId(request)); | 
 |  |  |         return JsonResult.success(distribService.findHeadProfitListInPage(headProfitLitDto)); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @ApiOperation("我的团队") | 
 |  |  |     @ApiResponses({ | 
 |  |  |             @ApiResponse(code = 200, message = "success", response = HeadProfitListVo.class) | 
 |  |  |     }) | 
 |  |  |     @PostMapping(value = "/distrib/headTeam") | 
 |  |  |     public JsonResult<List<HeadTeamVo>> headTimeList(@RequestBody HeadTeamDto headTeamDto, HttpServletRequest request) { | 
 |  |  |         headTeamDto.setUserId(getUserId(request)); | 
 |  |  |         return JsonResult.success(distribService.findHeadTeamListInPage(headTeamDto)); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  | } |