Browse Source

初始化场景floorplan.json字符编码错误

dsx 2 years ago
parent
commit
2e33a95a89

+ 1 - 1
src/main/java/com/fdkankan/scene/service/impl/ScenePlusServiceImpl.java

@@ -399,7 +399,7 @@ public class ScenePlusServiceImpl extends ServiceImpl<IScenePlusMapper, ScenePlu
             JSONObject json = FloorPlanUserUtil.createFloorPlanUserJson(floorPlanCardFilePath);
             if(!Objects.isNull(json)){
                 String hourseTypeJsonPath = String.format(UploadFilePath.DATA_VIEW_PATH, num) + "floorplan.json";
-                ossUtil.uploadFileBytes(bucket, hourseTypeJsonPath, json.toJSONString().getBytes());
+                ossUtil.uploadFileBytes(bucket, hourseTypeJsonPath, json.toJSONString().getBytes(StandardCharsets.UTF_8));
             }
         }