H5NoticeMessageController.java 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. package com.ruoyi.web.H5Api.api;
  2. import com.ruoyi.common.annotation.Log;
  3. import com.ruoyi.common.annotation.RepeatSubmit;
  4. import com.ruoyi.common.core.controller.BaseController;
  5. import com.ruoyi.common.core.domain.AjaxResult;
  6. import com.ruoyi.common.enums.BusinessType;
  7. import com.ruoyi.common.enums.OperatorType;
  8. import com.ruoyi.web.pcApi.domain.*;
  9. import com.ruoyi.web.pcApi.service.*;
  10. import org.apache.commons.collections.map.HashedMap;
  11. import org.springframework.beans.factory.annotation.Autowired;
  12. import org.springframework.web.bind.annotation.*;
  13. import java.util.Date;
  14. import java.util.List;
  15. import java.util.Map;
  16. /**
  17. * h5端-通知信息api
  18. *
  19. * @author lzp
  20. * @date 2022-08-26
  21. */
  22. @RestController
  23. @RequestMapping("/h5/message")
  24. @CrossOrigin
  25. public class H5NoticeMessageController extends BaseController
  26. {
  27. @Autowired
  28. private ITNoticeMessageService noticeMessageService;
  29. @Autowired
  30. private ITCustomerNoticeService customerNoticeService;
  31. /**
  32. * 获取用户通知消息
  33. * @return
  34. */
  35. @GetMapping("/getCustomerNotice")
  36. public AjaxResult getShopCarList(){
  37. List<TNoticeMessage> tNoticeMessages = noticeMessageService.selectTNoticeMessageList(TNoticeMessage.builder().deptId(getLoginUser().getLoginCustomer().getDeptId()).build());
  38. List<TCustomerNotice> tCustomerNotices = customerNoticeService.selectTCustomerNoticeList(TCustomerNotice.builder().customerId(getLoginUser().getLoginCustomer().getId()).build());
  39. Map<String,Object> map = new HashedMap();
  40. map.put("notice",tNoticeMessages);
  41. map.put("customerNotice",tCustomerNotices);
  42. return AjaxResult.success(map);
  43. }
  44. }