| package cc.mrbird.febs.mall.controller; | 
|   | 
| import cc.mrbird.febs.common.annotation.ControllerEndpoint; | 
| import cc.mrbird.febs.common.entity.FebsResponse; | 
| import cc.mrbird.febs.mall.dto.*; | 
| import cc.mrbird.febs.mall.service.IApiMallTeamLeaderService; | 
| import cc.mrbird.febs.mall.vo.*; | 
| import io.swagger.annotations.Api; | 
| import io.swagger.annotations.ApiOperation; | 
| import io.swagger.annotations.ApiResponse; | 
| import io.swagger.annotations.ApiResponses; | 
| import lombok.RequiredArgsConstructor; | 
| import lombok.extern.slf4j.Slf4j; | 
| import org.springframework.validation.annotation.Validated; | 
| import org.springframework.web.bind.annotation.*; | 
|   | 
| import javax.validation.Valid; | 
|   | 
| @Slf4j | 
| @Validated | 
| @RestController | 
| @RequiredArgsConstructor | 
| @RequestMapping(value = "/api/leader") | 
| @Api(value = "ApiMallTeamLeaderController", tags = "团长接口类") | 
| public class ApiMallTeamLeaderController { | 
|   | 
|     private final IApiMallTeamLeaderService iApiMallTeamLeaderService; | 
|   | 
|     /** | 
|      * 申请团长 | 
|      */ | 
|     @ApiOperation(value = "申请团长", notes = "申请团长") | 
|     @PostMapping(value = "/applyLeader") | 
|     public FebsResponse applyLeader(@RequestBody @Valid ApiApplayLeaderDto apiApplayLeaderDto) { | 
|         return iApiMallTeamLeaderService.applyLeader(apiApplayLeaderDto); | 
|     } | 
|   | 
|   | 
|     /** | 
|      * 团长列表 | 
|      */ | 
|     @ApiOperation(value = "团长列表(查询当前位置商品配送范围内的所有团长)", notes = "团长列表(查询当前位置商品配送范围内的所有团长)") | 
|     @ApiResponses({ | 
|             @ApiResponse(code = 200, message = "success", response = ApiLeaderListVo.class) | 
|     }) | 
|     @PostMapping(value = "/leaderList") | 
|     public FebsResponse leaderList(@RequestBody @Valid ApiLeaderListDto apiLeaderListDto) { | 
|         return iApiMallTeamLeaderService.findSomeLeaderListInPage(apiLeaderListDto); | 
|     } | 
|   | 
|     /** | 
|      * 团长列表 | 
|      */ | 
|     @ApiOperation(value = "团长列表(查询当前经纬度在团长配送范围内的团长)", notes = "团长列表(查询当前经纬度在团长配送范围内的团长)") | 
|     @ApiResponses({ | 
|             @ApiResponse(code = 200, message = "success", response = ApiLeaderListVo.class) | 
|     }) | 
|     @PostMapping(value = "/leaderListInFence") | 
|     public FebsResponse leaderListInFence(@RequestBody @Valid ApiLeaderListDto apiLeaderListDto) { | 
|         return iApiMallTeamLeaderService.findLeaderListInPage(apiLeaderListDto); | 
|     } | 
|   | 
|     /** | 
|      *是否允许申请团长 | 
|      */ | 
|     @ApiOperation(value = "是否允许申请团长", notes = "是否允许申请团长") | 
|     @ApiResponses({ | 
|             @ApiResponse(code = 200, message = "success", response = ApiMallleaderStateVo.class) | 
|     }) | 
|     @GetMapping(value = "/leaderState") | 
|     public FebsResponse leaderState() { | 
|         return iApiMallTeamLeaderService.leaderState(); | 
|     } | 
|   | 
|   | 
|     /** | 
|      *选择团长 | 
|      */ | 
|     @ApiOperation(value = "选择团长", notes = "选择团长") | 
|     @ApiResponses({ | 
|             @ApiResponse(code = 200, message = "success", response = ApiLeaderInfoVo.class) | 
|     }) | 
|     @GetMapping(value = "/leaderChoose/{id}") | 
|     public FebsResponse leaderChoose(@PathVariable(value = "id") Long id) { | 
|         return iApiMallTeamLeaderService.getApiLeaderInfoVoById(id); | 
|     } | 
|   | 
|     /** | 
|      * 团长查看自提点订单列表 | 
|      */ | 
|     @ApiOperation(value = "团长查看自提点订单列表", notes = "团长查看自提点订单列表") | 
|     @ApiResponses({ | 
|             @ApiResponse(code = 200, message = "success", response = OrderListVo.class) | 
|     }) | 
|     @PostMapping(value = "/leaderOrderList") | 
|     public FebsResponse leaderOrderList(@RequestBody ApiLeaderOrderListDto apiLeaderOrderListDto) { | 
|         return new FebsResponse().success().data(iApiMallTeamLeaderService.findLeaderOrderListInPage(apiLeaderOrderListDto)); | 
|     } | 
|   | 
|     /** | 
|      * 团长点击到货确认,订单从状态 2 变更到状态 3 ,即待提货 | 
|      */ | 
|     @ApiOperation(value = "团长点击到货确认,订单从状态 2 变更到状态 3 ,即待提货", notes = "团长点击到货确认,订单从状态 2 变更到状态 3 ,即待提货") | 
|     @PostMapping("/leaderOrderConfirm") | 
|     public FebsResponse leaderOrderConfirm( @RequestBody @Valid ApiLeaderOrderConfirmDto apiLeaderOrderConfirmDto) { | 
|         return iApiMallTeamLeaderService.leaderOrderConfirm(apiLeaderOrderConfirmDto); | 
|     } | 
|   | 
|   | 
|     @ApiOperation(value = "团长点击用户退款", notes = "团长点击用户退款") | 
|     @PostMapping(value = "/leaderRefundOrder") | 
|     public FebsResponse leaderRefundOrder(@RequestBody ApiLeaderRefundOrderDto apiLeaderRefundOrderDto) { | 
|         return iApiMallTeamLeaderService.leaderRefundOrder(apiLeaderRefundOrderDto); | 
|     } | 
|   | 
|     @ApiOperation(value = "团长退款详情", notes = "团长退款详情") | 
|     @PostMapping(value = "/refundOrderInfo") | 
|     public FebsResponse refundOrderInfo(@RequestBody ApiRefundOrderInfoDto apiRefundOrderInfoDto) { | 
|         return iApiMallTeamLeaderService.refundOrderInfo(apiRefundOrderInfoDto); | 
|     } | 
|   | 
|     /** | 
|      * 商品列表页的团长信息 | 
|      * 有团长特征码直接显示该团长, | 
|      * 有经纬度,按照经纬度选择距离最近的 | 
|      * 没有选择团长列表的第一个 | 
|      */ | 
|     @ApiOperation(value = "商品列表页的团长信息", notes = "商品列表页的团长信息") | 
|     @ApiResponses({ | 
|             @ApiResponse(code = 200, message = "success", response = ApiLeaderInfoVo.class) | 
|     }) | 
|     @PostMapping("/leaderTitle") | 
|     public FebsResponse leaderTitle(@RequestBody ApiLeaderTitleDto apiLeaderTitleDto) { | 
|         return iApiMallTeamLeaderService.leaderTitle(apiLeaderTitleDto); | 
|     } | 
|   | 
|     /** | 
|      * 商品列表页的团长信息 | 
|      * 有团长特征码直接显示该团长, | 
|      * 有经纬度,按照经纬度选择距离最近的 | 
|      * 没有选择团长列表的第一个 | 
|      */ | 
|     @ApiOperation(value = "商品列表页的团长信息", notes = "商品列表页的团长信息") | 
|     @ApiResponses({ | 
|             @ApiResponse(code = 200, message = "success", response = ApiLeaderInfoVo.class) | 
|     }) | 
|     @PostMapping("/noLoginLeaderTitle") | 
|     public FebsResponse noLoginLeaderTitle(@RequestBody ApiLeaderTitleDto apiLeaderTitleDto) { | 
|         return iApiMallTeamLeaderService.noLoginLeaderTitle(apiLeaderTitleDto); | 
|     } | 
|   | 
|     @ApiOperation(value = "获取团长订单角标数量") | 
|     @GetMapping(value = "/findTeamOrderMarkCnt") | 
|     public FebsResponse findTeamOrderMarkCnt() { | 
|         return iApiMallTeamLeaderService.findTeamOrderMarkCnt(); | 
|     } | 
|   | 
|     @ApiOperation(value = "团长收益详情", notes = "团长收益详情") | 
|     @ApiResponses({ | 
|             @ApiResponse(code = 200, message = "success", response = ApiLeaderProfitVo.class) | 
|     }) | 
|     @GetMapping("/leaderProfit") | 
|     public FebsResponse leaderProfit() { | 
|         return iApiMallTeamLeaderService.leaderProfit(); | 
|     } | 
|   | 
|     /** | 
|      * 团长查看已提成收益 | 
|      */ | 
|     @ApiOperation(value = "团长查看已提成收益", notes = "团长查看已提成收益") | 
|     @ApiResponses({ | 
|             @ApiResponse(code = 200, message = "success", response = ApiOrderProfitVo.class) | 
|     }) | 
|     @PostMapping(value = "/leaderProfitList") | 
|     public FebsResponse leaderProfitList(@RequestBody ApiOrderProfitDto apiOrderProfitDto) { | 
|         return new FebsResponse().success().data(iApiMallTeamLeaderService.findLeaderProfitListInPage(apiOrderProfitDto)); | 
|     } | 
|   | 
|   | 
| } |