|
@@ -20,6 +20,7 @@ import com.fdkankan.openApi.service.www.IScenePlusService;
|
|
|
import com.fdkankan.openApi.vo.www.SceneDynamicPanelParamVO;
|
|
|
import com.fdkankan.redis.constant.RedisKey;
|
|
|
import com.fdkankan.redis.util.RedisUtil;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
@@ -39,6 +40,7 @@ import java.util.Objects;
|
|
|
* @author
|
|
|
* @since 2024-05-21
|
|
|
*/
|
|
|
+@Slf4j
|
|
|
@DS("www")
|
|
|
@Service
|
|
|
public class SceneDynamicPanelServiceImpl extends ServiceImpl<ISceneDynamicPanelMapper, SceneDynamicPanel> implements ISceneDynamicPanelService {
|
|
@@ -54,9 +56,9 @@ public class SceneDynamicPanelServiceImpl extends ServiceImpl<ISceneDynamicPanel
|
|
|
|
|
|
|
|
|
@Override
|
|
|
- public void save(Long userId, SceneDynamicPanelParamVO param) throws IOException {
|
|
|
+ public void save(SceneDynamicPanelParamVO param) throws IOException {
|
|
|
|
|
|
- ScenePlus scenePlus = scenePlusService.getByNumAndUserId(userId, param.getNum());
|
|
|
+ ScenePlus scenePlus = scenePlusService.getByNum(param.getNum());
|
|
|
if(Objects.isNull(scenePlus)){
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_5005);
|
|
|
}
|
|
@@ -121,6 +123,8 @@ public class SceneDynamicPanelServiceImpl extends ServiceImpl<ISceneDynamicPanel
|
|
|
//更新scene.json版本号
|
|
|
String sceneJsonPath = String.format(UploadFilePath.DATA_VIEW_PATH, param.getNum()) + "scene.json";
|
|
|
String sceneJsonStr = fileServiceInterface.getFileContent(sceneJsonPath);
|
|
|
+ log.info("--------------------------------scenejsonpath:{}", sceneJsonPath);
|
|
|
+ log.info("-------------------------------scenejsonstr:{}", sceneJsonStr);
|
|
|
JSONObject scenejsonObj = JSON.parseObject(sceneJsonStr);
|
|
|
scenejsonObj.replace("version", scenejsonObj.getIntValue("version") + 1);
|
|
|
fileServiceInterface.uploadFile(JSON.toJSONBytes(scenejsonObj), sceneJsonPath);
|