|
|
@@ -1,6 +1,8 @@
|
|
|
package com.fs.company.controller.qw;
|
|
|
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
+import cn.hutool.http.HttpRequest;
|
|
|
+import cn.hutool.http.HttpResponse;
|
|
|
import cn.hutool.http.HttpUtil;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
@@ -589,12 +591,17 @@ public class QwExternalContactController extends BaseController
|
|
|
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
|
|
|
String url = OpenQwConfig.baseApi + "/edit?tenantId=" + loginUser.getTenantId();
|
|
|
- String result = HttpUtil.createPost(url)
|
|
|
+ HttpResponse response = HttpRequest.post(url)
|
|
|
.body(JSON.toJSONString(qwExternalContact))
|
|
|
- .execute()
|
|
|
- .body();
|
|
|
+ .execute();
|
|
|
|
|
|
- return toAjax(Boolean.getBoolean(result));
|
|
|
+
|
|
|
+ if (response.getStatus() == 200) {
|
|
|
+ return JSON.parseObject(response.body(), AjaxResult.class);
|
|
|
+ } else {
|
|
|
+ log.error("删除好友欢迎语失败,HTTP状态码: {}", response.getStatus());
|
|
|
+ return AjaxResult.error("删除好友欢迎语失败,服务返回状态码: " + response.getStatus());
|
|
|
+ }
|
|
|
// return toAjax(qwExternalContactService.updateQwExternalContact(qwExternalContact));
|
|
|
}
|
|
|
|