对比新文件 |
| | |
| | | package com.gk.firework.Controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.gk.firework.Controller.Base.BaseController; |
| | | import com.gk.firework.Domain.BlackList; |
| | | import com.gk.firework.Domain.Utils.FilterObject; |
| | | import com.gk.firework.Service.BlackListService; |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | |
| | | @Api(tags = "黑名单") |
| | | @RequestMapping("/blackList") |
| | | @RestController |
| | | public class BlackListController extends BaseController { |
| | | |
| | | @Autowired |
| | | private BlackListService blackListService; |
| | | |
| | | @PostMapping("/add") |
| | | public Object addBlackList(@RequestBody BlackList blackList){ |
| | | blackListService.addBlackList(blackList, getUser()); |
| | | return success(); |
| | | } |
| | | |
| | | @PostMapping("/del") |
| | | public Object delBlackList(@RequestParam Long id){ |
| | | blackListService.delBlackList(id, getUser()); |
| | | return success(); |
| | | } |
| | | |
| | | @PostMapping("/list") |
| | | public Object list(@RequestBody FilterObject filterObj){ |
| | | Integer pageIndex = filterObj.getPageIndex(); |
| | | Integer pageSize = filterObj.getPageSize(); |
| | | IPage page = blackListService.selectPages(new Page<>(pageIndex, pageSize), filterObj.getFilter(), getUser()); |
| | | return success(page); |
| | | } |
| | | |
| | | |
| | | |
| | | } |