package com.template.services.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.template.model.pojo.SmartAskForLeaveConfig;
import com.template.mapper.SmartAskForLeaveConfigMapper;
import com.template.services.SmartAskForLeaveConfigService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author ceshi
 * @since 2024-05-24
 */
@Service
public class SmartAskForLeaveConfigServiceImpl extends ServiceImpl<SmartAskForLeaveConfigMapper, SmartAskForLeaveConfig> implements SmartAskForLeaveConfigService {

    @Override
    public SmartAskForLeaveConfig getList() {
        Wrapper<SmartAskForLeaveConfig> wrapper=new LambdaQueryWrapper<>();
        List<SmartAskForLeaveConfig> list = this.list(wrapper);
        SmartAskForLeaveConfig smartAskForLeaveConfig=null;
        if (ObjectUtils.isNotEmpty(list)) {
            smartAskForLeaveConfig = list.get(0);
        }
        return smartAskForLeaveConfig;
    }
}
