package com.usky.fire.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.usky.common.security.utils.SecurityUtils;
import com.usky.fire.domain.BaseBuild;
import com.usky.fire.domain.ReportConfig;
import com.usky.fire.domain.ReportIndexConfig;
import com.usky.fire.mapper.ReportIndexConfigMapper;
import com.usky.fire.service.ReportIndexConfigService;
import com.usky.common.mybatis.core.AbstractCrudService;
import com.usky.fire.service.vo.BaseBuildAddVO;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 指数配置表 服务实现类
 * </p>
 *
 * @author han
 * @since 2023-06-27
 */
@Service
public class ReportIndexConfigServiceImpl extends AbstractCrudService<ReportIndexConfigMapper, ReportIndexConfig> implements ReportIndexConfigService {
    @Override
    public List<ReportIndexConfig> indexConfigList(Integer reportId,Integer indexGrade){
        LambdaQueryWrapper<ReportIndexConfig> queryWrapper = Wrappers.lambdaQuery();
        queryWrapper.eq(ReportIndexConfig::getIndexGrade,indexGrade)
        .eq(ReportIndexConfig::getReportId,reportId);
        List<ReportIndexConfig> list1 = this.list(queryWrapper);
        return list1;
    }
    @Override
    public boolean delReportIndexConfig(Integer id) {
        return this.removeById(id);
    }
}
