文件下载bug消缺
This commit is contained in:
@@ -100,6 +100,7 @@ public class AskDeviceDataServiceImpl implements AskDeviceDataService {
|
||||
} catch (Exception e) {
|
||||
redisUtil.delete("fileDowning:"+nDid);
|
||||
redisUtil.delete("fileCheck"+nDid+name);
|
||||
redisUtil.delete("fileDownUserId"+nDid+name);
|
||||
throw new BusinessException(AlgorithmResponseEnum.FILE_DOWNLOAD_ERROR);
|
||||
}
|
||||
return result;
|
||||
|
||||
@@ -31,6 +31,7 @@ import com.njcn.oss.constant.OssPath;
|
||||
import com.njcn.oss.utils.FileStorageUtil;
|
||||
import com.njcn.redis.pojo.enums.AppRedisKey;
|
||||
import com.njcn.redis.utils.RedisUtil;
|
||||
import com.njcn.user.api.UserFeignClient;
|
||||
import com.njcn.zlevent.param.CsEventParam;
|
||||
import com.njcn.zlevent.pojo.dto.FileInfoDto;
|
||||
import com.njcn.zlevent.pojo.dto.FileStreamDto;
|
||||
@@ -262,8 +263,13 @@ public class FileServiceImpl implements IFileService {
|
||||
}
|
||||
}
|
||||
}
|
||||
String userIndex = redisUtil.getObjectByKey("fileDownUserId"+appFileMessage.getId()+appFileMessage.getMsg().getName()).toString();
|
||||
//推送mqtt
|
||||
String json = "{fileName:"+appFileMessage.getMsg().getName()+",allStep:"+appFileMessage.getMsg().getFrameTotal()+",nowStep:"+ appFileMessage.getMsg().getFrameCurr() +"}";
|
||||
String json = "{fileName:" + appFileMessage.getMsg().getName()
|
||||
+ ",allStep:" + appFileMessage.getMsg().getFrameTotal()
|
||||
+ ",nowStep:" + appFileMessage.getMsg().getFrameCurr()
|
||||
+ ",userId:" + userIndex
|
||||
+"}";
|
||||
publisher.send("/Web/Progress/" + appFileMessage.getId(), new Gson().toJson(json), 1, false);
|
||||
if (!Objects.isNull(filePath)){
|
||||
redisUtil.saveByKeyWithExpire("downloadFilePath:" + appFileMessage.getId() + appFileMessage.getMsg().getName(),filePath,60L);
|
||||
|
||||
Reference in New Issue
Block a user