TASK: 画布数据 回参处理不为空时的minio地址

This commit is contained in:
2025-07-22 13:42:07 +08:00
parent bb0a3bd1cd
commit 07571aaad1

View File

@@ -919,7 +919,7 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
String type = jsonObjectLevel1.getString("type"); String type = jsonObjectLevel1.getString("type");
if (type.equals("image")) { if (type.equals("image")) {
String minioUrl = jsonObjectLevel1.getString("minioUrl"); String minioUrl = jsonObjectLevel1.getString("minioUrl");
jsonObjectLevel1.put("src", minioUtil.getPreSignedUrl(minioUrl, 24 * 60)); if (!StringUtil.isNullOrEmpty(minioUrl)) jsonObjectLevel1.put("src", minioUtil.getPreSignedUrl(minioUrl, 24 * 60));
} }
if (type.equals("group")) { if (type.equals("group")) {
JSONArray objectJSONArrayLevel2 = jsonObjectLevel1.getJSONArray("objects"); JSONArray objectJSONArrayLevel2 = jsonObjectLevel1.getJSONArray("objects");
@@ -934,7 +934,7 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
} }
jsonObjectLevel1.put("objects", objectJSONArrayLevel2); jsonObjectLevel1.put("objects", objectJSONArrayLevel2);
} }
if (type.equals("rect")) { /*if (type.equals("rect")) {
JSONObject custom = jsonObjectLevel1.getJSONObject("custom"); JSONObject custom = jsonObjectLevel1.getJSONObject("custom");
if (custom.getString("type").equals("init")) { if (custom.getString("type").equals("init")) {
String minioUrl = jsonObjectLevel1.getString("minioUrl"); String minioUrl = jsonObjectLevel1.getString("minioUrl");
@@ -944,7 +944,7 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
jsonObjectLevel1.put("fill", fill); jsonObjectLevel1.put("fill", fill);
} }
} }
} }*/
objectJSONArrayLevel1.set(i, jsonObjectLevel1); objectJSONArrayLevel1.set(i, jsonObjectLevel1);
} }
canvas.put("objects", objectJSONArrayLevel1); canvas.put("objects", objectJSONArrayLevel1);
@@ -956,7 +956,7 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
String type = jsonObjectLevel1.getString("type"); String type = jsonObjectLevel1.getString("type");
if (type.equals("image")) { if (type.equals("image")) {
String minioUrl = jsonObjectLevel1.getString("minioUrl"); String minioUrl = jsonObjectLevel1.getString("minioUrl");
jsonObjectLevel1.put("src", minioUtil.getPreSignedUrl(minioUrl, 24 * 60)); if (!StringUtil.isNullOrEmpty(minioUrl)) jsonObjectLevel1.put("src", minioUtil.getPreSignedUrl(minioUrl, 24 * 60));
} }
if (type.equals("group")) { if (type.equals("group")) {
JSONArray objectJSONArrayLevel2 = jsonObjectLevel1.getJSONArray("objects"); JSONArray objectJSONArrayLevel2 = jsonObjectLevel1.getJSONArray("objects");
@@ -971,7 +971,7 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
} }
jsonObjectLevel1.put("objects", objectJSONArrayLevel2); jsonObjectLevel1.put("objects", objectJSONArrayLevel2);
} }
if (type.equals("rect")) { /*if (type.equals("rect")) {
JSONObject custom = jsonObjectLevel1.getJSONObject("custom"); JSONObject custom = jsonObjectLevel1.getJSONObject("custom");
if (custom.getString("type").equals("init")) { if (custom.getString("type").equals("init")) {
String minioUrl = jsonObjectLevel1.getString("minioUrl"); String minioUrl = jsonObjectLevel1.getString("minioUrl");
@@ -981,13 +981,14 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
jsonObjectLevel1.put("fill", fill); jsonObjectLevel1.put("fill", fill);
} }
} }
} }*/
objectJSONArrayLevel1.set(i, jsonObjectLevel1); objectJSONArrayLevel1.set(i, jsonObjectLevel1);
} }
jsonObject.put("objects", objectJSONArrayLevel1); jsonObject.put("objects", objectJSONArrayLevel1);
} }
return jsonObject; return jsonObject;
}catch (Exception e){ }catch (Exception e){
log.error(e.getMessage());
return null; return null;
} }
}else { }else {