package jnpf.base.service.impl;
|
|
import jnpf.base.entity.FilterEntity;
|
import jnpf.base.entity.VisualdevEntity;
|
import jnpf.base.mapper.FilterMapper;
|
import jnpf.base.model.filter.RuleInfo;
|
import jnpf.base.service.FilterService;
|
import jnpf.base.service.SuperServiceImpl;
|
import org.mybatis.dynamic.sql.SqlTable;
|
import org.mybatis.dynamic.sql.select.QueryExpressionDSL;
|
import org.mybatis.dynamic.sql.select.SelectModel;
|
import org.springframework.stereotype.Service;
|
|
import java.util.List;
|
import java.util.Map;
|
|
@Service
|
public class FilterServiceImpl extends SuperServiceImpl<FilterMapper, FilterEntity> implements FilterService {
|
|
@Override
|
public void saveRuleList(String moduleId, VisualdevEntity visualdevEntity, Integer app, Integer pc, Map<String, String> tableMap) {
|
this.baseMapper.saveRuleList(moduleId, visualdevEntity, app, pc, tableMap);
|
}
|
|
@Override
|
public void updateRuleList(String moduleId, VisualdevEntity visualdevEntity, Integer app, Integer pc, Map<String, String> tableMap) {
|
this.baseMapper.updateRuleList(moduleId, visualdevEntity, app, pc, tableMap);
|
}
|
|
@Override
|
public void handleWhereCondition(SqlTable sqlTable, QueryExpressionDSL<SelectModel>.QueryExpressionWhereBuilder where, String id, Map<String, SqlTable> subSqlTableMap, String databaseProductName, Map<String, Object> params) {
|
this.baseMapper.handleWhereCondition(sqlTable, where, id, subSqlTableMap, databaseProductName, params);
|
}
|
|
/**
|
* 在线过滤查询
|
*
|
* @param sqlTable
|
* @param where
|
* @param id
|
* @param subSqlTableMap
|
* @param databaseProductName
|
*/
|
@Override
|
public void handleWhereCondition(SqlTable sqlTable, QueryExpressionDSL<SelectModel>.QueryExpressionWhereBuilder where, String id, Map<String, SqlTable> subSqlTableMap, String databaseProductName) {
|
this.baseMapper.handleWhereCondition(sqlTable, where, id, subSqlTableMap, databaseProductName, null);
|
}
|
|
/**
|
* 获取过滤配置
|
*
|
* @param id
|
* @return
|
*/
|
@Override
|
public List<RuleInfo> getCondition(String id) {
|
return this.baseMapper.getCondition(id);
|
}
|
}
|