package com.hzya.frame.sys.dataSource.dao.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.hzya.frame.sys.dataSource.entity.SysDataSourceEntity;
import com.hzya.frame.sys.dataSource.dao.ISysDataSourceDao;
import com.hzya.frame.sys.dataSource.entity.SysDataSourceVo;
import org.springframework.stereotype.Repository;
import com.hzya.frame.basedao.dao.MybatisGenericDao;

import java.util.List;

/**
 * 数据源表(SysDataSource)表数据库访问层
 *
 * @author makejava
 * @since 2023-09-05 16:07:03
 */
@Repository(value = "SysDataSourceDaoImpl")
public class SysDataSourceDaoImpl extends MybatisGenericDao<SysDataSourceEntity, String> implements ISysDataSourceDao{


    @DS("master")
    @Override
    public List<SysDataSourceVo> queryVoList(SysDataSourceEntity entity) {
        List<SysDataSourceVo> o = (List<SysDataSourceVo>) super.selectList(getSqlIdPrifx() + "queryVoList", entity);
        return o;
    }
    @Override
    public int queryVoList_COUNT(SysDataSourceEntity entity) {
        int o = (int) super.selectOne(getSqlIdPrifx() + "queryVoList_COUNT", entity);
        return o;
    }

    @Override
    public Integer entity_count_not_id(SysDataSourceEntity entity) {
        Integer o = (Integer) super.selectOne(getSqlIdPrifx() + "entity_count_not_id", entity);
        return o;
    }

    @DS("master")
    @Override
    public List<SysDataSourceVo> queryDSBase(SysDataSourceEntity entity) {
        List<SysDataSourceVo> o = (List<SysDataSourceVo>) super.selectList(getSqlIdPrifx() + "queryDSBase", entity);
        return o;
    }
}

