package cn.cslg.report.service.business;

import cn.cslg.report.entity.SysDictItem;
import cn.cslg.report.mapper.SystemDictItemMapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
@Slf4j
@RequiredArgsConstructor(onConstructor_ = {@Lazy})
public class SysDictItemService extends ServiceImpl<SystemDictItemMapper, SysDictItem> {
    public List<SysDictItem> getSystemDictListByType(List<String> type) {
        if (type == null || type.size() == 0) {
            return new ArrayList<>();
        }
        LambdaQueryWrapper<SysDictItem> queryWrapper = new LambdaQueryWrapper<>();
        return this.list(queryWrapper);
    }

}
