| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | } |
| | | @GetMapping("/delete") |
| | | @ApiOperation(tags = {"管理后台-广告管理"},value = "广告删除") |
| | | public AjaxResult delete(Integer id) { |
| | | advertisingService.removeById(id); |
| | | public AjaxResult delete(String ids) { |
| | | advertisingService.removeBatchByIds(Arrays.asList(ids.split(","))); |
| | | return AjaxResult.success(); |
| | | } |
| | | @PostMapping("/updateVip") |
| | |
| | | public AjaxResult<TAdvertising> getInfo(Integer id) { |
| | | return AjaxResult.ok(advertisingService.getById(id)); |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation(tags = {"管理后台-广告管理"},value = "广告列表分页查询") |
| | | @PostMapping(value = "/pageList") |
| | | public AjaxResult<PageInfo<TAdvertising>> pageList(@RequestBody AdvertisingDTO dto) { |
| | |
| | | |
| | | @ApiOperation(tags = {"小程序-广告管理"},value = "广告列表查询") |
| | | @GetMapping(value = "/list") |
| | | public AjaxResult<List<TAdvertising>> list() { |
| | | public AjaxResult<List<TAdvertising>> list(@RequestParam("position") Integer position) { |
| | | return AjaxResult.ok(advertisingService.list(Wrappers.lambdaQuery(TAdvertising.class) |
| | | .eq(TAdvertising::getStatus, AdvertisingStatusEnum.YES.getCode()))); |
| | | .eq(TAdvertising::getStatus, AdvertisingStatusEnum.YES.getCode()) |
| | | .eq(TAdvertising::getPosition,position))); |
| | | } |
| | | } |
| | | |