|
@@ -12,7 +12,6 @@ import cn.hutool.core.util.StrUtil;
|
|
|
import cn.hutool.http.HttpResponse;
|
|
import cn.hutool.http.HttpResponse;
|
|
|
import cn.hutool.http.HttpUtil;
|
|
import cn.hutool.http.HttpUtil;
|
|
|
import cn.hutool.json.JSONObject;
|
|
import cn.hutool.json.JSONObject;
|
|
|
-import cn.hutool.json.JSONUtil;
|
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.cyksj.common.constant.Constant;
|
|
import com.cyksj.common.constant.Constant;
|
|
@@ -2706,10 +2705,18 @@ public class GroupRelationFrontServiceImpl implements GroupRelationFrontService
|
|
|
.field(GroupsRelationView::getGoodsId, Constant.GPT_PLUS_GID)
|
|
.field(GroupsRelationView::getGoodsId, Constant.GPT_PLUS_GID)
|
|
|
.build());
|
|
.build());
|
|
|
if (relationView != null && StrUtil.isNotEmpty(relationView.getEmailAuthCode())) {
|
|
if (relationView != null && StrUtil.isNotEmpty(relationView.getEmailAuthCode())) {
|
|
|
- String session_url = "https://mail.cpacc.us.ci/api/code";
|
|
|
|
|
|
|
+ String session_url = "https://mail.cpacc.us.ci/api/open";
|
|
|
|
|
|
|
|
- JSONObject result = JSONUtil.parseObj(HttpUtil.post(session_url, Map.of("mailbox_token", relationView.getEmailAuthCode())));
|
|
|
|
|
- String session = result.getStr("box_session");
|
|
|
|
|
|
|
+ JSONObject params = new JSONObject();
|
|
|
|
|
+ params.putOpt("mailbox_token", relationView.getEmailAuthCode());
|
|
|
|
|
+
|
|
|
|
|
+ HttpResponse result = HttpUtil.createPost(session_url)
|
|
|
|
|
+ .header("sec-fetch-site", "same-origin")
|
|
|
|
|
+ .setConnectionTimeout(Constant.CONNECT_MILLISECONDS)
|
|
|
|
|
+ .body(params.toString())
|
|
|
|
|
+ .execute();
|
|
|
|
|
+ JSONObject jsonObject = Jsons.parseObject(result.body(), JSONObject.class);
|
|
|
|
|
+ String session = jsonObject.getStr("box_session");
|
|
|
|
|
|
|
|
String getCodeUrl = "https://mail.cpacc.us.ci/api/code";
|
|
String getCodeUrl = "https://mail.cpacc.us.ci/api/code";
|
|
|
HttpResponse execute = HttpUtil.createGet(getCodeUrl)
|
|
HttpResponse execute = HttpUtil.createGet(getCodeUrl)
|