1
This commit is contained in:
@@ -93,7 +93,9 @@ public class WxSendUtil {
|
||||
touser.forEach(t ->
|
||||
touserStringBuilder.append(t).append("|")
|
||||
);
|
||||
touserStr = touserStringBuilder.substring(0, touser.size() - 1);
|
||||
// 修复bug: 应该使用 touserStringBuilder.length() - 1,而不是 touser.size() - 1
|
||||
// 因为要删除最后一个 "|" 字符,应该基于字符串长度而不是列表大小
|
||||
touserStr = touserStringBuilder.substring(0, touserStringBuilder.length() - 1);
|
||||
} else {
|
||||
touserStr = touserStringBuilder.append(touser.get(0)).toString();
|
||||
}
|
||||
@@ -169,7 +171,9 @@ public class WxSendUtil {
|
||||
touser.forEach(t ->
|
||||
touserStringBuilder.append(t).append("|")
|
||||
);
|
||||
touserStr = touserStringBuilder.substring(0, touser.size() - 1);
|
||||
// 修复bug: 应该使用 touserStringBuilder.length() - 1,而不是 touser.size() - 1
|
||||
// 因为要删除最后一个 "|" 字符,应该基于字符串长度而不是列表大小
|
||||
touserStr = touserStringBuilder.substring(0, touserStringBuilder.length() - 1);
|
||||
} else {
|
||||
touserStr = touserStringBuilder.append(touser.get(0)).toString();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user