|
@@ -15,6 +15,7 @@ import com.cyksj.config.corp.YHLXWxCorpConfig;
|
|
|
import com.cyksj.dto.CorpOauth2UserInfo;
|
|
import com.cyksj.dto.CorpOauth2UserInfo;
|
|
|
import com.cyksj.dto.RedisKey;
|
|
import com.cyksj.dto.RedisKey;
|
|
|
import com.cyksj.model.entity.WxCorpApp;
|
|
import com.cyksj.model.entity.WxCorpApp;
|
|
|
|
|
+import com.cyksj.model.request.corp.CorpGroupConfig;
|
|
|
import com.cyksj.model.request.corp.CorpMsgTemplate;
|
|
import com.cyksj.model.request.corp.CorpMsgTemplate;
|
|
|
import com.cyksj.model.response.OffiaccountJsTicket;
|
|
import com.cyksj.model.response.OffiaccountJsTicket;
|
|
|
import com.cyksj.model.response.UserExternalContactList;
|
|
import com.cyksj.model.response.UserExternalContactList;
|
|
@@ -257,6 +258,7 @@ public class WxCorpOpsImpl implements WxCorpOps {
|
|
|
jsonObject.putOpt("scene", 2);
|
|
jsonObject.putOpt("scene", 2);
|
|
|
jsonObject.putOpt("chat_id_list", chatIds);
|
|
jsonObject.putOpt("chat_id_list", chatIds);
|
|
|
jsonObject.putOpt("room_base_name", "Ai银河课堂 MJ SD教程分享");
|
|
jsonObject.putOpt("room_base_name", "Ai银河课堂 MJ SD教程分享");
|
|
|
|
|
+ //auto_create_room当群满了后,是否自动新建群。0-否;1-是。 默认为1
|
|
|
HttpResponse<byte[]> res =
|
|
HttpResponse<byte[]> res =
|
|
|
J11HttpC.custom()
|
|
J11HttpC.custom()
|
|
|
.ofPost()
|
|
.ofPost()
|
|
@@ -338,6 +340,22 @@ public class WxCorpOpsImpl implements WxCorpOps {
|
|
|
return tagGroups;
|
|
return tagGroups;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void updateGroupsConfig(CorpGroupConfig config) throws Exception {
|
|
|
|
|
+ String url = "https://qyapi.weixin.qq.com/cgi-bin/externalcontact/groupchat/update_join_way?access_token=" + getAccessToken(null);
|
|
|
|
|
+
|
|
|
|
|
+ HttpResponse<String> res =
|
|
|
|
|
+ J11HttpC.custom()
|
|
|
|
|
+ .ofPost()
|
|
|
|
|
+ .url(url)
|
|
|
|
|
+ .headers(J11HttpC.ReqType.raw_json)
|
|
|
|
|
+ .body(HttpRequest.BodyPublishers.ofString(Jsons.toJson(config), IoKit.Charsets.UTF_8.getCharset()))
|
|
|
|
|
+ .send(HttpResponse.BodyHandlers.ofString());
|
|
|
|
|
+ if (200 != res.statusCode()) {
|
|
|
|
|
+ throw BusinessRuntimeException.getInstance("更新企业微信客户群配置失败: " + res.body());
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
public CorpBaseResult editCorpTag(JSONObject params) throws Exception {
|
|
public CorpBaseResult editCorpTag(JSONObject params) throws Exception {
|
|
|
String url = "https://qyapi.weixin.qq.com/cgi-bin/externalcontact/edit_corp_tag?access_token=" + getAccessToken(null);
|
|
String url = "https://qyapi.weixin.qq.com/cgi-bin/externalcontact/edit_corp_tag?access_token=" + getAccessToken(null);
|