package org.dromara.system.dubbo;

import cn.hutool.core.bean.BeanUtil;
import lombok.RequiredArgsConstructor;
import org.apache.dubbo.config.annotation.DubboService;
import org.dromara.common.core.utils.MapstructUtils;
import org.dromara.system.api.RemoteLogService;
import org.dromara.system.api.RemoteNoticeService;
import org.dromara.system.api.domain.bo.RemoteLogininforBo;
import org.dromara.system.api.domain.bo.RemoteOperLogBo;
import org.dromara.system.api.domain.vo.RemoteSysNoticeVo;
import org.dromara.system.domain.SysNotice;
import org.dromara.system.domain.bo.SysLogininforBo;
import org.dromara.system.domain.bo.SysOperLogBo;
import org.dromara.system.mapper.SysNoticeMapper;
import org.dromara.system.service.ISysLogininforService;
import org.dromara.system.service.ISysOperLogService;
import org.springframework.stereotype.Service;

/**
 * 操作日志记录
 *
 * @author Lion Li
 */
@RequiredArgsConstructor
@Service
@DubboService
public class RemoteNoticeServiceImpl implements RemoteNoticeService {
    private final SysNoticeMapper noticeMapper;

    @Override
    public void addNotice(RemoteSysNoticeVo noticeVo) {
        SysNotice add =BeanUtil.copyProperties(noticeVo,SysNotice.class);
//        SysNotice add = MapstructUtils.convert(noticeVo,SysNotice.class);
        noticeMapper.insert(add);
    }
}
