PushInfoController.java 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. package com.fjhx.socket.controller.push;
  2. import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  3. import com.fjhx.socket.entity.push.dto.PushInfoSelectDto;
  4. import com.fjhx.socket.entity.push.vo.PushInfoVo;
  5. import com.fjhx.socket.service.push.PushInfoService;
  6. import com.ruoyi.common.core.domain.BaseSelectDto;
  7. import org.springframework.beans.factory.annotation.Autowired;
  8. import org.springframework.web.bind.annotation.PostMapping;
  9. import org.springframework.web.bind.annotation.RequestBody;
  10. import org.springframework.web.bind.annotation.RequestMapping;
  11. import org.springframework.web.bind.annotation.RestController;
  12. /**
  13. * <p>
  14. * 消息推送 前端控制器
  15. * </p>
  16. *
  17. * @author
  18. * @since 2023-07-13
  19. */
  20. @RestController
  21. @RequestMapping("/pushInfo")
  22. public class PushInfoController {
  23. @Autowired
  24. private PushInfoService pushInfoService;
  25. /**
  26. * 消息推送分页
  27. */
  28. @PostMapping("/page")
  29. public Page<PushInfoVo> page(@RequestBody PushInfoSelectDto dto) {
  30. return pushInfoService.getPage(dto);
  31. }
  32. /**
  33. * 消息推送明细
  34. */
  35. @PostMapping("/detail")
  36. public PushInfoVo detail(@RequestBody BaseSelectDto dto) {
  37. return pushInfoService.detail(dto.getId());
  38. }
  39. @PostMapping("/read")
  40. public void read(@RequestBody PushInfoSelectDto dto) {
  41. pushInfoService.read(dto.getIdList());
  42. }
  43. }