Browse Source

:bug: Fixing a bug. 列表查询条件不起作用

冷冷 7 years ago
parent
commit
e76bfd4b6f

+ 5 - 9
pigx-visual/pigx-codegen/src/main/java/com/pig4cloud/pigx/codegen/mapper/SysGeneratorMapper.java

@@ -18,6 +18,7 @@
 package com.pig4cloud.pigx.codegen.mapper;
 
 import com.pig4cloud.pigx.common.core.util.Query;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 import java.util.Map;
@@ -34,20 +35,14 @@ public interface SysGeneratorMapper {
 	 * 分页查询表格
 	 *
 	 * @param params
+	 * @param tableName
 	 * @return
 	 */
-	List<Map<String, Object>> queryList(Query params);
-
-	/**
-	 * 查询表数量
-	 *
-	 * @param query
-	 * @return
-	 */
-	int queryTotal(Map query);
+	List<Map<String, Object>> queryList(Query params, @Param("tableName") Object tableName);
 
 	/**
 	 * 查询表信息
+	 *
 	 * @param tableName 表名称
 	 * @return
 	 */
@@ -55,6 +50,7 @@ public interface SysGeneratorMapper {
 
 	/**
 	 * 查询表列信息
+	 *
 	 * @param tableName 表名称
 	 * @return
 	 */

+ 3 - 2
pigx-visual/pigx-codegen/src/main/java/com/pig4cloud/pigx/codegen/service/impl/SysGeneratorServiceImpl.java

@@ -50,8 +50,9 @@ public class SysGeneratorServiceImpl implements SysGeneratorService {
 	 * @return
 	 */
 	@Override
-	public List<Map<String,Object>> queryPage(Query query) {
-		return sysGeneratorMapper.queryList(query);
+	public List<Map<String, Object>> queryPage(Query query) {
+		Object tableName = query.getCondition().get("tableName");
+		return sysGeneratorMapper.queryList(query, tableName);
 	}
 
 	/**