package com.artfess.cqlt.manager.impl;

import com.artfess.base.manager.impl.BaseManagerImpl;
import com.artfess.cqlt.dao.QfReportInfoDao;
import com.artfess.cqlt.manager.QfReportInfoManager;
import com.artfess.cqlt.model.QfReportInfo;
import org.springframework.stereotype.Service;

/**
 * 报表信息 服务实现类
 *
 * @company 阿特菲斯信息技术有限公司
 * @author 管理员
 * @since 2023-02-17
 */
@Service
public class QfReportInfoManagerImpl extends BaseManagerImpl<QfReportInfoDao, QfReportInfo> implements QfReportInfoManager {

    @Override
    public boolean updateStatus(QfReportInfo t) {
        QfReportInfo reportInfo = baseMapper.selectById(t.getId());
        if(null == reportInfo) {
            return false;
        }
        reportInfo.setFlag(reportInfo.getFlag() == 0? 1:0 );
        int i = this.baseMapper.updateById(reportInfo);
        if(i > 0){
            return true;
        }
        return false;
    }

}
