|
@@ -9,6 +9,8 @@ import com.fdkankan.common.constant.ErrorCode;
|
|
|
import com.fdkankan.common.constant.PayStatus;
|
|
|
import com.fdkankan.common.constant.SceneStatus;
|
|
|
import com.fdkankan.common.exception.BusinessException;
|
|
|
+import com.fdkankan.scene.entity.ScenePro;
|
|
|
+import com.fdkankan.scene.service.ISceneProService;
|
|
|
import com.fdkankan.web.response.ResultData;
|
|
|
import com.fdkankan.redis.constant.RedisKey;
|
|
|
import com.fdkankan.redis.constant.RedisLockKey;
|
|
@@ -56,6 +58,8 @@ public class ScenePlusServiceImpl extends ServiceImpl<IScenePlusMapper, ScenePlu
|
|
|
private RedisUtil redisUtil;
|
|
|
@Autowired
|
|
|
private RedisLockUtil redisLockUtil;
|
|
|
+ @Autowired
|
|
|
+ private ISceneProService sceneProService;
|
|
|
|
|
|
@Override
|
|
|
public ScenePlus getScenePlusByNum(String num) {
|
|
@@ -106,18 +110,26 @@ public class ScenePlusServiceImpl extends ServiceImpl<IScenePlusMapper, ScenePlu
|
|
|
|
|
|
@Override
|
|
|
public ResultData downLoadZSData(BaseSceneParamVO param) throws Exception {
|
|
|
+
|
|
|
+ String version = "v4";
|
|
|
String num = param.getNum();
|
|
|
ScenePlus scenePlus = this.getScenePlusByNum(num);
|
|
|
+ ScenePro scenePro = null;
|
|
|
if(Objects.isNull(scenePlus)){
|
|
|
- throw new BusinessException(ErrorCode.FAILURE_CODE_5005);
|
|
|
+ scenePro = sceneProService.getByNum(num);
|
|
|
+ version = "v3";
|
|
|
+ if(Objects.isNull(scenePro)){
|
|
|
+ throw new BusinessException(ErrorCode.FAILURE_CODE_5005);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
SceneDataDownload sceneDataDownload = sceneDataDownloadService.findBySceneNum(num);
|
|
|
if(sceneDataDownload == null){
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_5025);
|
|
|
}
|
|
|
-
|
|
|
- return ResultData.ok(BeanUtil.copyProperties(sceneDataDownload, SceneDataDownloadVO.class));
|
|
|
+ SceneDataDownloadVO sceneDataDownloadVO = BeanUtil.copyProperties(sceneDataDownload, SceneDataDownloadVO.class);
|
|
|
+ sceneDataDownloadVO.setVersion(version);
|
|
|
+ return ResultData.ok(sceneDataDownloadVO);
|
|
|
}
|
|
|
|
|
|
@Override
|