package com.fs.live.service.impl;

import com.fs.common.utils.DateUtils;
import com.fs.live.domain.LiveFloatMsgLog;
import com.fs.live.mapper.LiveFloatMsgLogMapper;
import com.fs.live.service.ILiveFloatMsgLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LiveFloatMsgLogServiceImpl implements ILiveFloatMsgLogService {

    @Autowired
    private LiveFloatMsgLogMapper liveFloatMsgLogMapper;

    @Override
    public void insertLog(LiveFloatMsgLog log) {
        if (log.getCreateTime() == null) {
            log.setCreateTime(DateUtils.getNowDate());
        }
        liveFloatMsgLogMapper.insertLiveFloatMsgLog(log);
    }

    @Override
    public List<LiveFloatMsgLog> selectList(LiveFloatMsgLog query) {
        return liveFloatMsgLogMapper.selectLiveFloatMsgLogList(query);
    }
}
