|
@@ -76,9 +76,13 @@ public class CommonServiceImpl implements ICommonService {
|
|
|
public List<CommonEntity> queryTableList(CommonEntity commonEntity, TableSql tableSql) {
|
|
|
// 根据sqlkey查询得到当前表单对应的sql
|
|
|
Map<String, Object> conditions = JSONObject.parseObject(JSON.toJSONString(commonEntity.getQueryMap()));
|
|
|
-
|
|
|
-
|
|
|
- return null;
|
|
|
+ // 得到查询条件的值
|
|
|
+ String queryCriteriaValue =
|
|
|
+ conditions.containsKey("queryCriteriaValue") == true
|
|
|
+ ? conditions.get("queryCriteriaValue").toString() : "";
|
|
|
+ // 得到需要执行的sql条件语句
|
|
|
+ String endSQL = tableSql.getTableCondition().replace("#{val}", queryCriteriaValue);
|
|
|
+ return commonMapper.queryTableList(tableSql.getTableSql() + " where " + endSQL);
|
|
|
/**
|
|
|
* 多个文本框查询拼接查询 废弃保留代码
|
|
|
// sql当中拼接好条件格式 后台使用AND分割 拼接条件
|