| | |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 轮播图 |
| | | */ |
| | | @RestController |
| | | @AllArgsConstructor |
| | | @RequestMapping("/v1/content/banner") |
| | |
| | | } |
| | | } |
| | | |
| | | @GetMapping("/category") |
| | | public ResponseVO<Object> listPosition() { |
| | | List<BannerPositionDto> bannerPositionDtos = contentBannerService.listPosition(); |
| | | return ResponseUtil.success(bannerPositionDtos); |
| | | } |
| | | // @GetMapping("/category") |
| | | // public ResponseVO<Object> listPosition() { |
| | | // List<BannerPositionDto> bannerPositionDtos = contentBannerService.listPosition(); |
| | | // return ResponseUtil.success(bannerPositionDtos); |
| | | // } |
| | | |
| | | @PostMapping("{bannerId}") |
| | | @PostMapping("/{bannerId}") |
| | | public ResponseVO<Object> updateBanner(@PathVariable Long bannerId, @Validated @RequestBody BannerParam bannerParam) { |
| | | boolean result = contentBannerService.updateBanner(bannerId,bannerParam); |
| | | if (result) { |
| | |
| | | } |
| | | } |
| | | |
| | | @GetMapping("{bannerId}") |
| | | @GetMapping("/{bannerId}") |
| | | public ResponseVO<Object> detailBanner(@PathVariable Long bannerId) { |
| | | BannerDto result = contentBannerService.detailBanner(bannerId); |
| | | return ResponseUtil.success(result); |
| | | } |
| | | |
| | | @GetMapping |
| | | public ResponseVO<Object> listBanner(BaseConditionVO conditionVO) { |
| | | public ResponseVO<Object> listMainBanner(BaseConditionVO conditionVO) { |
| | | PageHelper.startPage(conditionVO.getPageNo(), conditionVO.getPageSize()); |
| | | List<Banner> list = contentBannerService.listBanner(); |
| | | return ResponseUtil.successPage(list); |