| | |
| | | package cc.mrbird.febs.mall.controller; |
| | | |
| | | import cc.mrbird.febs.common.annotation.SubmitRepeat; |
| | | import cc.mrbird.febs.common.entity.FebsResponse; |
| | | import cc.mrbird.febs.mall.dto.ApiChargeListDto; |
| | | import cc.mrbird.febs.mall.dto.ApiGoChargeDto; |
| | | import cc.mrbird.febs.mall.dto.ApiGoChargeInfoDto; |
| | | import cc.mrbird.febs.mall.service.IRunVipService; |
| | | import cc.mrbird.febs.mall.vo.ApiChargeInfoVo; |
| | | import cc.mrbird.febs.mall.vo.ApiChargeVo; |
| | | import cc.mrbird.febs.mall.vo.ApiGoChargeVo; |
| | | import cc.mrbird.febs.mall.vo.ApiRunVipVo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.CrossOrigin; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.Valid; |
| | | |
| | | @Slf4j |
| | | @Validated |
| | |
| | | |
| | | private final IRunVipService iRunVipService; |
| | | |
| | | @ApiOperation(value = "会员中心-购买VIP", notes = "会员中心-购买VIP") |
| | | @ApiOperation(value = "会员中心-购买VIP列表", notes = "会员中心-购买VIP列表") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "success", response = ApiRunVipVo.class) |
| | | }) |
| | |
| | | public FebsResponse vipInfo() { |
| | | return new FebsResponse().success().data(iRunVipService.vipInfo()); |
| | | } |
| | | |
| | | @ApiOperation(value = "【购买VIP】基本数据", notes = "【余额充值】基本数据") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "success", response = ApiChargeInfoVo.class) |
| | | }) |
| | | @GetMapping(value = "/getChargeInfo") |
| | | public FebsResponse getChargeInfo() { |
| | | return iRunVipService.getChargeInfo(); |
| | | } |
| | | |
| | | @ApiOperation(value = "【购买VIP】列表", notes = "【余额充值】列表") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "success", response = ApiChargeVo.class) |
| | | }) |
| | | @PostMapping(value = "/getChargeList") |
| | | public FebsResponse getChargeList(@RequestBody ApiChargeListDto apiChargeListDto) { |
| | | return new FebsResponse().success().data(iRunVipService.getChargeList(apiChargeListDto)); |
| | | } |
| | | |
| | | @ApiOperation(value = "【购买VIP】立即购买", notes = "【购买VIP】立即购买") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "success", response = ApiGoChargeVo.class) |
| | | }) |
| | | @PostMapping(value = "/goCharge") |
| | | @SubmitRepeat |
| | | public FebsResponse goCharge(@RequestBody @Valid ApiGoChargeDto apiGoChargeDto) { |
| | | return iRunVipService.goCharge(apiGoChargeDto); |
| | | } |
| | | |
| | | @ApiOperation(value = "【购买VIP】马上支付", notes = "【余额充值】马上支付") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "success", response = ApiGoChargeVo.class) |
| | | }) |
| | | @PostMapping(value = "/goChargeInfo") |
| | | @SubmitRepeat |
| | | public FebsResponse goChargeInfo(@RequestBody @Valid ApiGoChargeInfoDto apiGoChargeInfoDto) { |
| | | return iRunVipService.goChargeInfo(apiGoChargeInfoDto); |
| | | } |
| | | } |