소스 검색

修复 bug 优化代码

青苗 9 년 전
부모
커밋
ae11810e94

+ 1 - 1
mybatis-plus/src/main/java/com/baomidou/mybatisplus/generator/AutoGenerator.java

@@ -713,7 +713,7 @@ public class AutoGenerator {
 		bw.write("import " + config.getEntityPackage() + "." + beanName + ";");
 		bw.newLine();
 		String superService = config.getSuperService();
-		bw.write("import " + superService);
+		bw.write("import " + superService + ";");
 		bw.newLine();
 
 		bw = buildClassComment(bw, beanName + " 表数据服务层接口");

+ 5 - 1
mybatis-plus/src/main/java/com/baomidou/mybatisplus/mapper/EntityWrapper.java

@@ -129,7 +129,11 @@ public class EntityWrapper<T> {
 		if (StringUtils.isEmpty(filter)) {
 			return this;
 		}
-		queryFilter.append(MessageFormat.format(filter, params));
+		if (null != params && params.length >= 1) {
+			queryFilter.append(MessageFormat.format(filter, params));
+		} else {
+			queryFilter.append(filter);
+		}
 		return this;
 	}