|
|
@@ -22,54 +22,54 @@ import java.util.List;
|
|
|
@RequestMapping(value = "business/push/bus/push/msg")
|
|
|
public class BusPushMsgController extends BaseController {
|
|
|
|
|
|
- private final IBusPushMsgService busPushMsgService;
|
|
|
+ private final IBusPushMsgService busPushMsgService;
|
|
|
|
|
|
- public BusPushMsgController(IBusPushMsgService busPushMsgService) {
|
|
|
- this.busPushMsgService = busPushMsgService;
|
|
|
- }
|
|
|
+ public BusPushMsgController(IBusPushMsgService busPushMsgService) {
|
|
|
+ this.busPushMsgService = busPushMsgService;
|
|
|
+ }
|
|
|
|
|
|
- @ApiOperation(value = "新增")
|
|
|
- @PostMapping("/add")
|
|
|
- public AjaxResult add(@Validated @RequestBody BusPushMsg busPushMsg) {
|
|
|
- return toAjax(busPushMsgService.create(busPushMsg));
|
|
|
- }
|
|
|
+ @ApiOperation(value = "新增")
|
|
|
+ @PostMapping("/add")
|
|
|
+ public AjaxResult add(@Validated @RequestBody BusPushMsg busPushMsg) {
|
|
|
+ return toAjax(busPushMsgService.create(busPushMsg));
|
|
|
+ }
|
|
|
|
|
|
- @ApiOperation(value = "删除")
|
|
|
- @DeleteMapping("/{ids}")
|
|
|
- public AjaxResult delete(@PathVariable(value = "ids") String[] ids) {
|
|
|
- return toAjax(busPushMsgService.delete(ids));
|
|
|
- }
|
|
|
+ @ApiOperation(value = "删除")
|
|
|
+ @DeleteMapping("/{ids}")
|
|
|
+ public AjaxResult delete(@PathVariable(value = "ids") String[] ids) {
|
|
|
+ return toAjax(busPushMsgService.delete(ids));
|
|
|
+ }
|
|
|
|
|
|
- @ApiOperation(value = "更新")
|
|
|
- @PutMapping("/update")
|
|
|
- public AjaxResult update(@RequestBody @Valid BusPushMsg busPushMsg) {
|
|
|
- return toAjax(busPushMsgService.update(busPushMsg));
|
|
|
- }
|
|
|
+ @ApiOperation(value = "更新")
|
|
|
+ @PutMapping("/update")
|
|
|
+ public AjaxResult update(@RequestBody @Valid BusPushMsg busPushMsg) {
|
|
|
+ return toAjax(busPushMsgService.update(busPushMsg));
|
|
|
+ }
|
|
|
|
|
|
- @ApiOperation(value = "单个")
|
|
|
- @GetMapping(value = {"/", "/{id}"})
|
|
|
- public AjaxResult getInfo(@PathVariable(value = "id") String id) {
|
|
|
- BusPushMsg info = busPushMsgService.getInfo(id);
|
|
|
- AjaxResult ajax = AjaxResult.success();
|
|
|
- ajax.put("info",info);
|
|
|
- return ajax;
|
|
|
- }
|
|
|
+ @ApiOperation(value = "单个")
|
|
|
+ @GetMapping(value = {"/", "/{id}"})
|
|
|
+ public AjaxResult getInfo(@PathVariable(value = "id") String id) {
|
|
|
+ BusPushMsg info = busPushMsgService.getInfo(id);
|
|
|
+ AjaxResult ajax = AjaxResult.success();
|
|
|
+ ajax.put("info", info);
|
|
|
+ return ajax;
|
|
|
+ }
|
|
|
|
|
|
- @ApiOperation(value = "列表")
|
|
|
- @GetMapping(value = "list")
|
|
|
- public TableDataInfo getList(BusPushMsg busPushMsg) {
|
|
|
- startPage();
|
|
|
- List<BusPushMsg> list = busPushMsgService.getList(busPushMsg);
|
|
|
- return getDataTable(list);
|
|
|
- }
|
|
|
+ @ApiOperation(value = "列表")
|
|
|
+ @GetMapping(value = "list")
|
|
|
+ public TableDataInfo getList(BusPushMsg busPushMsg) {
|
|
|
+ startPage();
|
|
|
+ List<BusPushMsg> list = busPushMsgService.getList(busPushMsg);
|
|
|
+ return getDataTable(list);
|
|
|
+ }
|
|
|
|
|
|
- @ApiOperation(value = "最近的5条消息")
|
|
|
- @GetMapping(value = "getListTop5")
|
|
|
- public AjaxResult getListTop5(BusPushMsg busPushMsg) {
|
|
|
- List<BusPushMsg> list = busPushMsgService.getListTop5(busPushMsg);
|
|
|
- AjaxResult ajax = AjaxResult.success();
|
|
|
- ajax.put("rows",list);
|
|
|
- return ajax;
|
|
|
- }
|
|
|
+ @ApiOperation(value = "最近的5条消息")
|
|
|
+ @GetMapping(value = "getListTop5")
|
|
|
+ public AjaxResult getListTop5(BusPushMsg busPushMsg) {
|
|
|
+ List<BusPushMsg> list = busPushMsgService.getListTop5(busPushMsg);
|
|
|
+ AjaxResult ajax = AjaxResult.success();
|
|
|
+ ajax.put("rows", list);
|
|
|
+ return ajax;
|
|
|
+ }
|
|
|
|
|
|
}
|