| | |
| | | @Autowired |
| | | private TAdvertisingService advertisingService; |
| | | @PostMapping("/saveAdvertising") |
| | | @ApiOperation(value = "广告添加") |
| | | @ApiOperation(tags = {"管理后台-广告管理"},value = "广告添加") |
| | | public AjaxResult saveAdvertising(@RequestBody TAdvertising dto) { |
| | | advertisingService.save(dto); |
| | | return AjaxResult.success(); |
| | | } |
| | | @GetMapping("/delete") |
| | | @ApiOperation(value = "广告删除") |
| | | @ApiOperation(tags = {"管理后台-广告管理"},value = "广告删除") |
| | | public AjaxResult delete(Integer id) { |
| | | advertisingService.removeById(id); |
| | | return AjaxResult.success(); |
| | | } |
| | | @PostMapping("/updateVip") |
| | | @ApiOperation(value = "广告修改") |
| | | @ApiOperation(tags = {"管理后台-广告管理"},value = "广告修改") |
| | | public AjaxResult updateVip(@RequestBody TAdvertising dto) { |
| | | advertisingService.updateById(dto); |
| | | return AjaxResult.success(); |
| | | } |
| | | @GetMapping("/getInfo") |
| | | @ApiOperation(value = "广告查看详情") |
| | | @ApiOperation(tags = {"管理后台-广告管理"},value = "广告查看详情") |
| | | public AjaxResult<TAdvertising> getInfo(Integer id) { |
| | | return AjaxResult.ok(advertisingService.getById(id)); |
| | | } |
| | | @ApiOperation(value = "广告列表分页查询") |
| | | @ApiOperation(tags = {"管理后台-广告管理"},value = "广告列表分页查询") |
| | | @PostMapping(value = "/pageList") |
| | | public AjaxResult<PageInfo<TAdvertising>> pageList(AdvertisingDTO dto) { |
| | | public AjaxResult<PageInfo<TAdvertising>> pageList(@RequestBody AdvertisingDTO dto) { |
| | | return AjaxResult.ok(advertisingService.pageList(dto)); |
| | | } |
| | | } |