package com.willalp.control.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;

import com.willalp.common.exception.base.BaseException;
import com.willalp.common.utils.DateUtils;
import com.willalp.common.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.willalp.control.mapper.HsControlLogMapper;
import com.willalp.control.domain.HsControlLog;
import com.willalp.control.service.IHsControlLogService;

/**
 * 控制日志Service业务层处理
 *
 * @author willalp
 * @date 2022-03-11
 */
@Service
public class HsControlLogServiceImpl extends ServiceImpl<HsControlLogMapper, HsControlLog>  implements IHsControlLogService
{
    @Autowired
    private HsControlLogMapper hsControlLogMapper;

    /**
     * 查询控制日志列表
     *
     * @param hsControlLog 控制日志
     * @return 控制日志
     */
    @Override
    public List<HsControlLog> selectHsControlLogList(HsControlLog hsControlLog)
    {
        return hsControlLogMapper.selectHsControlLogList(hsControlLog);
    }

    @Override
    public List<HsControlLog> selectLogListByUseNoIdAndDate(String useNoId, String date) {
        if (StringUtils.isBlank(useNoId) || StringUtils.isBlank(date)) {
            throw new BaseException("参数错误");
        }
        return this.baseMapper.selectLogListByUseNoIdAndDate(useNoId,date);
    }
}
