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);
|
}
|
|
}
|