| | |
| | | import com.stylefeng.guns.modular.system.dao.SystemNoticeMapper; |
| | | import com.stylefeng.guns.modular.system.dao.TNoticesMapper; |
| | | import com.stylefeng.guns.modular.system.model.SystemNotice; |
| | | import com.stylefeng.guns.modular.system.model.TNotices; |
| | | import com.stylefeng.guns.modular.system.service.ISystemNoticeService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 获取系统消息详情 |
| | | * @param type |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Map<String, Object> queryNoticesInfo(Integer type, Integer id) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | if(type == 1){//系统公告 |
| | | SystemNotice systemNotice = systemNoticeMapper.selectById(id); |
| | | TNotices tNotices = tNoticesMapper.selectById(systemNotice.getNoticesId()); |
| | | map.put("id", id); |
| | | map.put("title", tNotices.getTitle()); |
| | | map.put("img", tNotices.getImgUrl()); |
| | | map.put("content", tNotices.getContent()); |
| | | } |
| | | if(type == 2){//系统消息 |
| | | SystemNotice systemNotice = systemNoticeMapper.selectById(id); |
| | | map.put("id", id); |
| | | map.put("content", systemNotice.getContent()); |
| | | } |
| | | return map; |
| | | } |
| | | |
| | | /** |
| | | * 阅读操作 |
| | | * @param id |