yangdamao 2 tahun lalu
induk
melakukan
845d1d575e

+ 3 - 13
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseFileServiceImpl.java

@@ -8,7 +8,6 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.github.pagehelper.Page;
-import com.zhongzheng.common.exception.CustomException;
 import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.common.utils.ServletUtils;
 import com.zhongzheng.common.utils.ToolsUtils;
@@ -140,18 +139,9 @@ public class CourseFileServiceImpl extends ServiceImpl<CourseFileMapper, CourseF
         bo.setSign(sign);
         bo.setStamp(nowTime);
         String param = JSONObject.toJSONString(bo);
-        String respone = "";
-        try {
-            Map<String, String> headersMap = new HashMap<>();
-            headersMap.put("TenantId", ServletUtils.getRequest().getHeader("TenantId"));
-            respone = HttpUtils.sendPostJsonHeader(SAVE_HANDOUTS, param,headersMap);
-            if (!respone.contains("\"code\":200")) {
-                throw new CustomException("新增讲义失败" + respone);
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-            throw new CustomException("新增讲义失败" + e.getMessage());
-        }
+        Map<String, String> headersMap = new HashMap<>();
+        headersMap.put("TenantId", ServletUtils.getRequest().getHeader("TenantId"));
+        HttpUtils.sendPostJsonHeaderAsync(SAVE_HANDOUTS, param,headersMap);
         return true;
     }