SystemUpdateMessageNoticeServiceImpl.java 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. package com.xjrsoft.module.system.service.impl;
  2. import cn.hutool.core.util.ObjectUtil;
  3. import cn.hutool.core.util.StrUtil;
  4. import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
  5. import com.github.yulichang.base.MPJBaseServiceImpl;
  6. import com.github.yulichang.toolkit.MPJWrappers;
  7. import com.github.yulichang.wrapper.MPJLambdaWrapper;
  8. import com.xjrsoft.common.utils.VoToColumnUtil;
  9. import com.xjrsoft.module.system.entity.Menu;
  10. import com.xjrsoft.module.system.entity.Subsystem;
  11. import com.xjrsoft.module.system.entity.SystemUpdateMessageNotice;
  12. import com.xjrsoft.module.system.mapper.SystemUpdateMessageNoticeMapper;
  13. import com.xjrsoft.module.system.service.ISystemUpdateMessageNoticeService;
  14. import com.xjrsoft.module.system.vo.MenuTreeVo;
  15. import com.xjrsoft.module.system.vo.SystemUpdateMessagePageTempVo;
  16. import com.xjrsoft.module.system.vo.SystemUpdateMessagePageVo;
  17. import com.xjrsoft.module.teacher.entity.BaseTeacher;
  18. import lombok.AllArgsConstructor;
  19. import org.springframework.stereotype.Service;
  20. import java.util.List;
  21. /**
  22. * @title: 系统消息通知表
  23. * @Author brealinxx
  24. * @Date: 2024-04-17
  25. * @Version 1.0
  26. */
  27. @Service
  28. @AllArgsConstructor
  29. public class SystemUpdateMessageNoticeServiceImpl extends MPJBaseServiceImpl<SystemUpdateMessageNoticeMapper, SystemUpdateMessageNotice> implements ISystemUpdateMessageNoticeService {
  30. private final SystemUpdateMessageNoticeMapper systemUpdateMessageNoticeMapper;
  31. @Override
  32. public String[] getTeacherUserId() {
  33. List<SystemUpdateMessagePageTempVo> temp = systemUpdateMessageNoticeMapper.GetTeacherUserID();
  34. String[] teacherIds = temp.stream().map(SystemUpdateMessagePageTempVo::getUserId).toArray(String[]::new);
  35. return teacherIds;
  36. }
  37. @Override
  38. public String[] getStudentUserId() {
  39. List<SystemUpdateMessagePageTempVo> temp = systemUpdateMessageNoticeMapper.GetStudentUserID();
  40. String[] studentTeacherIds = temp.stream().map(SystemUpdateMessagePageTempVo::getUserId).toArray(String[]::new);
  41. return studentTeacherIds;
  42. }
  43. @Override
  44. public Boolean updateStatus(Long messageId, Long userId) {
  45. return systemUpdateMessageNoticeMapper.updateStatus(messageId, userId);
  46. }
  47. }