|
@@ -6,6 +6,7 @@ import com.fdkankan.common.constant.SceneConstant;
|
|
|
import com.fdkankan.common.exception.BusinessException;
|
|
|
import com.fdkankan.redis.constant.RedisKey;
|
|
|
import com.fdkankan.redis.util.RedisUtil;
|
|
|
+import com.fdkankan.ucenter.common.DownloadStatusEnum;
|
|
|
import com.fdkankan.ucenter.constant.LoginConstant;
|
|
|
import com.fdkankan.ucenter.entity.*;
|
|
|
import com.fdkankan.ucenter.service.*;
|
|
@@ -162,7 +163,27 @@ public class DownService implements IDownService {
|
|
|
if(StringUtils.isEmpty(result)){
|
|
|
return new DownloadProcessVo();
|
|
|
}
|
|
|
- return JSONObject.parseObject(result,DownloadProcessVo.class);
|
|
|
+ int isUp = 0;
|
|
|
+ if(scenePro == null){
|
|
|
+ isUp = 1;
|
|
|
+ }
|
|
|
+ SceneDownloadLog sceneDownloadLog = sceneDownloadLogService.getByStatusAndNum(sceneNum,0,isUp);
|
|
|
+
|
|
|
+ DownloadProcessVo downloadProcessVo = JSONObject.parseObject(result, DownloadProcessVo.class);
|
|
|
+ switch (downloadProcessVo.getStatus()) {
|
|
|
+ case DownloadStatusEnum.DOWNLOAD_SUCCESS_CODE:
|
|
|
+ String url = downloadProcessVo.getUrl();
|
|
|
+ if (!StringUtils.isEmpty(url)) {
|
|
|
+ sceneDownloadLog.setDownloadUrl(url);
|
|
|
+ sceneDownloadLog.setStatus(1);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ case DownloadStatusEnum.DOWNLOAD_FAILED_CODE:
|
|
|
+ sceneDownloadLog.setStatus(-1);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ sceneDownloadLogService.updateById(sceneDownloadLog);
|
|
|
+ return downloadProcessVo;
|
|
|
}
|
|
|
|
|
|
}
|