ソースを参照

修改判断文案内容中单独存在一个大括号不校验的情况

huangxuechao 4 年 前
コミット
6b30198b0a

+ 2 - 2
jeecg-boot-module-system/src/main/java/org/jeecg/modules/bytedance/advertise/controller/BytedanceVideoSlogenInfoController.java

@@ -151,7 +151,7 @@ public class BytedanceVideoSlogenInfoController {
 				int len = StringUtils.lengthAsSlogan(title);
 				int left = title.indexOf("{");
 				int right = title.indexOf("}");
-				if(left >= 0 && right >= 0){
+				if(left >= 0 || right >= 0){
 				int times = 0;
 					while (matcher.find()) { //此处find()每次被调用后,会偏移到下一个匹配
 						times++;
@@ -229,7 +229,7 @@ public class BytedanceVideoSlogenInfoController {
 		int len = StringUtils.lengthAsSlogan(title);
 		int left = title.indexOf("{");
 		int right = title.indexOf("}");
-		if (left >= 0 && right >= 0) {
+		if (left >= 0 || right >= 0) {
 			int times = 0;
 			while (matcher.find()) { //此处find()每次被调用后,会偏移到下一个匹配
 				times++;