|
@@ -13,6 +13,7 @@ import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouPopulationService;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.extension.api.R;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.github.pagehelper.PageHelper;
|
|
|
import com.github.pagehelper.PageInfo;
|
|
@@ -79,11 +80,13 @@ public class KuaishouCrowdPackServiceImpl extends ServiceImpl<KuaishouCrowdPackM
|
|
|
public Result<Object> uploadCrowdPack(Integer type, String orientationName, Long accountId, String url) {
|
|
|
StringBuffer path = new StringBuffer();
|
|
|
path.append(downloadPath).append(DateUtils.getNowDate(DateUtils.WEB_FORMAT)).append("/").append(UUID.randomUUID().toString()).append("/");
|
|
|
- log.info("-------下载到服务器地址:{}", path.toString());
|
|
|
if (!url.contains("http")) {
|
|
|
url = "https:".concat(url);
|
|
|
}
|
|
|
String newFileUrl = LoadFileUtil.downLoadFromUrl(url, path.toString());
|
|
|
+ if (Check.isNull(newFileUrl)) {
|
|
|
+ return Result.error("文件下载失败,路径:" + url);
|
|
|
+ }
|
|
|
String md5 = null;
|
|
|
try {
|
|
|
md5 = LoadFileUtil.getMD5(newFileUrl);
|