| | |
| | | |
| | | import cc.mrbird.febs.common.controller.BaseController; |
| | | import cc.mrbird.febs.common.entity.FebsResponse; |
| | | import cc.mrbird.febs.vip.entity.MallVipBenefits; |
| | | import cc.mrbird.febs.vip.service.IMallVipBenefitsService; |
| | | import cc.mrbird.febs.vip.service.IMallVipConfigService; |
| | | 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.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | |
| | | @Slf4j |
| | |
| | | public class ApiMallVipConfigController extends BaseController { |
| | | |
| | | private final IMallVipConfigService mallVipConfigService; |
| | | private final IMallVipBenefitsService mallVipBenefitsService; |
| | | |
| | | |
| | | @ApiOperation(value = "获取会员等级列表") |
| | |
| | | public FebsResponse findVipList() { |
| | | return new FebsResponse().success().data(mallVipConfigService.findConfigList()); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取权益详情") |
| | | @GetMapping(value = "/findBenefitsDetailList/{id}") |
| | | public FebsResponse findVipDetailList(@PathVariable("id") Long id) { |
| | | MallVipBenefits vipBenefits = mallVipBenefitsService.findVipBenefitsById(id); |
| | | return new FebsResponse().success().data(vipBenefits); |
| | | } |
| | | |
| | | @ApiOperation(value = "领取权益") |
| | | @PostMapping(value = "/getBenefitsData/{id}") |
| | | public FebsResponse getBenefitsData(@PathVariable("id") Long id) { |
| | | return new FebsResponse().success().message("领取成功"); |
| | | } |
| | | } |