puzhibing
2023-02-15 2811bab657aab4145b65a45a824fb63e93b58e30
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package com.stylefeng.guns.modular.system.service.impl;
 
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.stylefeng.guns.modular.system.dao.SystemNoticeMapper;
import com.stylefeng.guns.modular.system.model.SystemNotice;
import com.stylefeng.guns.modular.system.service.ISystemNoticeService;
import org.springframework.stereotype.Service;
 
import java.util.Date;
 
 
@Service
public class SystemNoticeServiceImpl extends ServiceImpl<SystemNoticeMapper, SystemNotice> implements ISystemNoticeService {
 
 
    /**
     * 添加系统消息
     * @param userType
     * @param content
     * @param userId
     * @throws Exception
     */
    @Override
    public void addSystemNotice(Integer userType, String content, Integer userId, Integer noticeType) throws Exception {
        SystemNotice systemNotice = new SystemNotice();
        systemNotice.setContent(content);
        systemNotice.setInsertTime(new Date());
        systemNotice.setRead(1);
        systemNotice.setType(2);
        systemNotice.setNoticeType(noticeType);
        systemNotice.setUserId(userId);
        systemNotice.setUserType(userType);
        this.insert(systemNotice);
    }
 
}