package com.hotent.portal.persistence.manager.impl;


import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.hotent.base.datasource.DatabaseContext;
import com.hotent.base.manager.impl.BaseManagerImpl;
import com.hotent.portal.model.PortalDataSensitive;
import com.hotent.portal.persistence.dao.PortalDataSensitiveDao;
import com.hotent.portal.persistence.manager.PortalDataSensitiveManager;

/**
 * 
 * <pre> 
 * 描述：表字段脱敏处理 处理实现类
 * 构建组：x7
 * 作者:heyf
 * 邮箱:heyf@jee-soft.cn
 * 日期:2020-07-27 16:01:10
 * 版权：广州宏天软件股份有限公司
 * </pre>
 */
@Service("portalDataSensitiveManager")
public class PortalDataSensitiveManagerImpl extends BaseManagerImpl<PortalDataSensitiveDao, PortalDataSensitive> implements PortalDataSensitiveManager{

	@Resource
	DatabaseContext databaseContext;
	@Override
	public PortalDataSensitive getByDsNameAndTableName(String dataSourceAlias, String tableName) {
		return databaseContext.switchDS("master", ()->{
			return baseMapper.getByDsNameAndTableName(dataSourceAlias,tableName);
		},e->{});
	}

}
