|
|
@@ -1,5 +1,6 @@
|
|
|
package com.cyksj.service.corp.impl;
|
|
|
|
|
|
+import cn.hutool.core.util.RandomUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import cn.hutool.json.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
@@ -118,7 +119,9 @@ public class CorpUserFrontServiceImpl implements CorpUserFrontService {
|
|
|
if (sysConfig == null || StrUtil.isEmpty(sysConfig.getSysValue())) {
|
|
|
throw BusinessRuntimeException.getInstance("获取错误,请刷新重试");
|
|
|
}
|
|
|
- corpFollowContact.setUser(Jsons.parseList(sysConfig.getSysValue(), String.class));
|
|
|
+ List<String> followIds = Jsons.parseList(sysConfig.getSysValue(), String.class);
|
|
|
+ String randFollowId = followIds.get(RandomUtil.randomInt(followIds.size()));
|
|
|
+ corpFollowContact.setUser(List.of(randFollowId));
|
|
|
//联系方式类型,1-单人, 2-多人
|
|
|
corpFollowContact.setType(corpFollowContact.getUser().size() > 1 ? 2 : 1);
|
|
|
String re = wxCorpOps.generateTempCorpFollowCode(corpFollowContact);
|