yumeng 5 년 전
부모
커밋
72aea76631
1개의 변경된 파일9개의 추가작업 그리고 0개의 파일을 삭제
  1. 9 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/MaterialInfoController.java

+ 9 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/MaterialInfoController.java

@@ -4,6 +4,7 @@ package org.jeecg.modules.ctop.controller;
 import cn.com.ctop.common.module.entity.MaterialInfo;
 import cn.com.ctop.common.module.service.IMaterialInfoService;
 import cn.com.ctop.common.module.utils.Check;
+import cn.com.ctop.common.module.utils.KuaishouInterfaceConstant;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
@@ -215,6 +216,14 @@ public class MaterialInfoController {
         if (materialInfoEntity == null) {
             result.error500("未找到对应实体");
         } else {
+            String url = materialInfo.getUrl();
+            if (!Check.isNull(url)) {
+                if (!url.contains(KuaishouInterfaceConstant.HTTPS_PREFIX)) {
+                    url = KuaishouInterfaceConstant.HTTPS_PREFIX + url;
+                    materialInfo.setUrl(url);
+                }
+            }
+
             boolean ok = materialInfoService.updateById(materialInfo);
             if (ok) {
                 result.success("修改成功!");