SmartNotificationController.java 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. package com.template.controller;
  2. import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
  3. import com.template.annotation.DESRespondSecret;
  4. import com.template.api.SmartNotificationControllerAPI;
  5. import com.template.model.pojo.SmartNotification;
  6. import com.template.model.pojo.SmartWarning;
  7. import com.template.model.result.CommonResult;
  8. import com.template.model.result.PageUtils;
  9. import com.template.services.SmartNotificationService;
  10. import org.springframework.beans.factory.annotation.Autowired;
  11. import org.springframework.web.bind.annotation.RequestMapping;
  12. import org.springframework.web.bind.annotation.RestController;
  13. /**
  14. * <p>
  15. * 前端控制器
  16. * </p>
  17. *
  18. * @author ceshi
  19. * @since 2024-01-30
  20. */
  21. @RestController
  22. //返回参数加密注解
  23. @DESRespondSecret
  24. public class SmartNotificationController implements SmartNotificationControllerAPI {
  25. @Autowired
  26. SmartNotificationService smartNotificationService;
  27. @Override
  28. @DESRespondSecret(validated = true)
  29. public CommonResult remindingList(Integer id, int currentPage, int pageCount, String type) {
  30. if (ObjectUtils.isEmpty(currentPage) && currentPage <= 0) {
  31. currentPage = 1;
  32. }
  33. if (ObjectUtils.isEmpty(pageCount) && pageCount <= 0) {
  34. currentPage = 10;
  35. }
  36. PageUtils<SmartNotification> result = smartNotificationService.pageRemindingList(id, currentPage, pageCount, type);
  37. return CommonResult.ok(result);
  38. }
  39. }