|
|
|
@ -6,6 +6,7 @@ import com.weaver.common.distribution.lock.DistributionLockInterface;
|
|
|
|
|
import com.weaver.common.i18n.tool.util.I18nContextUtil;
|
|
|
|
|
import com.weaver.custom.configcenter.htsysjcmtConfig;
|
|
|
|
|
import com.weaver.ecode.api.rpc.EcodeService;
|
|
|
|
|
import com.weaver.emonitor.util.Util;
|
|
|
|
|
import com.weaver.framework.rpc.annotation.RpcReference;
|
|
|
|
|
import com.weaver.framework.rpc.context.impl.TenantRpcContext;
|
|
|
|
|
import com.weaver.openapi.pojo.ApiResult;
|
|
|
|
@ -142,10 +143,22 @@ public class MessageSubscriptionController {
|
|
|
|
|
String target = "2";
|
|
|
|
|
String extdata = "";
|
|
|
|
|
// Set<String> useridset = msg.getRecivers();
|
|
|
|
|
List<String> useridset = Collections.singletonList(String.valueOf(params.get("receivers")));
|
|
|
|
|
String receivers = (String) params.get("receivers") ;
|
|
|
|
|
logger.error(" receivers: " + receivers);
|
|
|
|
|
// 去除字符串两端的方括号
|
|
|
|
|
String trimmed = receivers.substring(1, receivers.length() - 1);
|
|
|
|
|
// 使用逗号和空格作为分隔符将字符串拆分成多个子字符串
|
|
|
|
|
String[] strArray = trimmed.split(", ");
|
|
|
|
|
// List<String> useridset = Collections.singletonList(String.valueOf(params.get("receivers")));
|
|
|
|
|
List<String> list = new ArrayList<>();
|
|
|
|
|
// 遍历数组,将每个元素添加到 ArrayList 中
|
|
|
|
|
for (String num : strArray) {
|
|
|
|
|
list.add(num);
|
|
|
|
|
}
|
|
|
|
|
logger.error(" useridset: " + list);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
logger.error(" useridset: " + useridset);
|
|
|
|
|
Object[] arr = useridset.toArray();
|
|
|
|
|
Object[] arr = list.toArray();
|
|
|
|
|
for (int i = 0; i < arr.length; i += 100) {
|
|
|
|
|
StringBuilder sb = new StringBuilder();
|
|
|
|
|
for (int j = i; j < i + 100 && j < arr.length; ++j) {
|
|
|
|
|