Looly 6 年 前
コミット
ba23a1f192

+ 3 - 0
CHANGELOG.md

@@ -7,7 +7,10 @@
 
 ### 新特性
 * 【core】       强化java.time包的对象转换支持
+
 ### Bug修复
+* 【db】         修正字段中含有as导致触发关键字不能包装字段的问题(issue#I13ML7@Gitee)
+* 【extra】      修复QrCode中utf-8不支持大写的问题。(issue#I13MT6@Gitee)
 
 -------------------------------------------------------------------------------------------------------------
 

+ 1 - 1
hutool-db/src/main/java/cn/hutool/db/sql/Wrapper.java

@@ -92,7 +92,7 @@ public class Wrapper {
 		}
 		
 		//如果字段中包含通配符或者括号(字段通配符或者函数),不做包装
-		if(StrUtil.containsAnyIgnoreCase(field, "*", "(", " ", "as")) {
+		if(StrUtil.containsAnyIgnoreCase(field, "*", "(", " ", " as ")) {
 			return field;
 		}
 		

+ 1 - 1
hutool-extra/src/main/java/cn/hutool/extra/qrcode/QrConfig.java

@@ -278,7 +278,7 @@ public class QrConfig {
 		// 配置
 		final HashMap<EncodeHintType, Object> hints = new HashMap<>();
 		if (null != this.charset) {
-			hints.put(EncodeHintType.CHARACTER_SET, charset.toString());
+			hints.put(EncodeHintType.CHARACTER_SET, charset.toString().toLowerCase());
 		}
 		if (null != this.errorCorrection) {
 			hints.put(EncodeHintType.ERROR_CORRECTION, this.errorCorrection);