package com.ruoyi.project.business.service.message.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.project.business.dto.MessageDto;
import com.ruoyi.project.business.mapper.businessMessage.BusinessMessageMapper;
import com.ruoyi.project.business.service.message.IBusinessMessageService;
import com.ruoyi.project.common.domain.MessageUser;
import com.ruoyi.project.common.mapper.MessageUserMapper;
import org.springframework.context.i18n.LocaleContextHolder;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author jubs
 */
@Service
public class BusinessMessageServiceImpl extends ServiceImpl<MessageUserMapper, MessageUser> implements IBusinessMessageService {

    @Resource
    private BusinessMessageMapper baseMapper;

    @Override
    public List<MessageDto> selectMessageUserById(MessageDto dto) {
        String lan = LocaleContextHolder.getLocale().getCountry();
        dto.setLan(lan);
        return baseMapper.selectMessageUserById(dto);
    }


}
