/*
 * Copyright (c) 京北方信息技术股份有限公司 Corporation 2022 . All rights reserved.
 *
 */
package net.northking.cctp.dw.db.impl;

import net.northking.cctp.common.db.BasicDao;
import net.northking.cctp.common.db.PaginationService;
import net.northking.cctp.dw.db.dao.SynBugInfoDao;
import net.northking.cctp.dw.db.entity.SynBugInfo;
import net.northking.cctp.dw.db.service.SynBugInfoService;
import net.northking.cctp.dw.dto.BugLegacyGradeGroupDto;
import net.northking.cctp.dw.dto.BugLifeCycleChartAddDto;
import net.northking.cctp.dw.dto.BugOverallTendencyChartAddDto;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * 缺陷管理
 *
 * <p>文件内容由代码生成器产生，请不要手动修改！ <br>
 * createdate:  2022-01-28 13:45:44  <br>
 *
 * @author: maven-cctp-plugin  <br>
 * @since: 1.0 <br>
 */
@Service
@ConditionalOnMissingBean(name = "SynBugInfoServiceImpl")
public class SynBugInfoServiceImpl extends PaginationService<SynBugInfo> implements SynBugInfoService {
    private static final Logger logger = LoggerFactory.getLogger(SynBugInfoServiceImpl.class);

    private final SynBugInfoDao synBugInfoDao;

    public SynBugInfoServiceImpl(SynBugInfoDao synBugInfoDao) {
        this.synBugInfoDao = synBugInfoDao;
    }

    public BasicDao<SynBugInfo> getDao() {
        return synBugInfoDao;
    }

    public SynBugInfo createEntity() {
        return new SynBugInfo();
    }

    @Override
    protected void beforeInsert(SynBugInfo synBugInfo) {

    }

    @Override
    protected void beforeUpdate(SynBugInfo synBugInfo) {

    }

    @Override
    public List<SynBugInfo> findProIdList() {
        return synBugInfoDao.findProIdList();
    }

    @Override
    public List<BugLifeCycleChartAddDto> findBugLifeCycleList(List<String> endStatus, String proId) {
        return synBugInfoDao.findBugLifeCycleList(endStatus, proId);
    }

    @Override
    public List<BugOverallTendencyChartAddDto> queryBugTendencyMessage(String proId, List<String> endStatus) {
        return synBugInfoDao.queryBugTendencyMessage(proId, endStatus);
    }

    @Override
    public List<BugLegacyGradeGroupDto> findAllGroup() {
        return synBugInfoDao.findAllGroup();
    }

    @Override
    public Integer insertBugInfoByBatch(List<SynBugInfo> dtoList) {
        return synBugInfoDao.insertBugInfoByBatch(dtoList);
    }

    @Override
    public List<String> findTenantIdList() {
        return synBugInfoDao.findTenantIdList();
    }

}

