package com.qxgmat.service.extend;

import com.nuliji.tools.MessageHelp;
import com.nuliji.tools.exception.SystemException;
import com.qxgmat.data.constants.enums.user.MessageType;
import com.qxgmat.data.dao.entity.UserMessage;
import com.qxgmat.service.inline.UserMessageService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class MessageService {

    @Resource
    private MessageHelp messageHelp;

    @Resource
    private UserMessageService userMessageService;

    public UserMessage send(Integer userId, MessageType type, UserMessage userMessage){
        try {
            userMessage.setUserId(userId);
            return userMessage;
        }catch (Exception e){
            throw new SystemException("Message生成失败", e);
        }
    }
}
