|  |  |  | 
|---|
|  |  |  | package cc.mrbird.febs.mall.controller; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import cc.mrbird.febs.common.entity.FebsResponse; | 
|---|
|  |  |  | import cc.mrbird.febs.mall.dto.ApiMallActListDto; | 
|---|
|  |  |  | import cc.mrbird.febs.mall.dto.ApiMallActWinDetailsDto; | 
|---|
|  |  |  | import cc.mrbird.febs.mall.dto.MallGoodsQueryDto; | 
|---|
|  |  |  | import cc.mrbird.febs.mall.service.IApiMallActService; | 
|---|
|  |  |  | 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.web.bind.annotation.RequestMapping; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.RestController; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Slf4j | 
|---|
|  |  |  | @RestController | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private final IApiMallActService iApiMallActService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation(value = "获取活动列表", notes = "获取活动列表") | 
|---|
|  |  |  | @ApiResponses({ | 
|---|
|  |  |  | @ApiResponse(code = 200, message = "success", response = ApiMallActListVo.class) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | @PostMapping(value = "/findMallGoodsList") | 
|---|
|  |  |  | public FebsResponse findMallGoodsList(@RequestBody ApiMallActListDto apiMallActListDto) { | 
|---|
|  |  |  | return new FebsResponse().success().data(iApiMallActService.findApiMallActListInPage(apiMallActListDto)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation(value = "获取活动详情", notes = "获取活动详情") | 
|---|
|  |  |  | @ApiResponses({ | 
|---|
|  |  |  | @ApiResponse(code = 200, message = "success", response = ApiMallActDetailsVo.class) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | @GetMapping(value = "/findApiMallActDetailsById/{id}") | 
|---|
|  |  |  | public FebsResponse findApiMallActDetailsById(@PathVariable("id") Long id) { | 
|---|
|  |  |  | return new FebsResponse().success().data(iApiMallActService.findApiMallActDetailsById(id)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation(value = "我的抽奖记录", notes = "我的抽奖记录") | 
|---|
|  |  |  | @ApiResponses({ | 
|---|
|  |  |  | @ApiResponse(code = 200, message = "success", response = ApiMallActWinDetailsVo.class) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | @PostMapping(value = "/findApiMallActWinDetailsById") | 
|---|
|  |  |  | public FebsResponse findApiMallActWinDetailsById(@RequestBody ApiMallActWinDetailsDto apiMallActWinDetailsDto) { | 
|---|
|  |  |  | return new FebsResponse().success().data(iApiMallActService.findApiMallActWinDetailsInPage(apiMallActWinDetailsDto)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation(value = "抽奖", notes = "抽奖") | 
|---|
|  |  |  | @ApiResponses({ | 
|---|
|  |  |  | @ApiResponse(code = 200, message = "success", response = ApiMallAwardDetailsVo.class) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | @GetMapping(value = "/luckDraw/{actId}") | 
|---|
|  |  |  | public FebsResponse luckDraw(@PathVariable("actId") long actId) { | 
|---|
|  |  |  | return new FebsResponse().success().data(iApiMallActService.luckDraw(actId)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|