|
@@ -164,7 +164,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public ResultData uploadTagImg(String num, MultipartFile file, String sid, Integer size) throws Exception {
|
|
|
+ public ResultData uploadTagImg(String num, MultipartFile file, String sid, Integer size, Integer tileSize) throws Exception {
|
|
|
String extName = FileUtil.extName(file.getOriginalFilename());
|
|
|
String fragmentPath = String.format(ConstantFilePath.SCENE_USER_PATH_V4, num) + "hot_img_fragment/";
|
|
|
String workPath = fragmentPath + sid;
|
|
@@ -185,7 +185,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
uploadMap.put(origFilePath, ossPath + sid + "." + extName);
|
|
|
|
|
|
//切图
|
|
|
- String fragmentCmd = "vips dzsave --tile-size 511 " + origFilePath + " " + workPath;
|
|
|
+ String fragmentCmd = "vips dzsave --tile-size " + tileSize + " " + origFilePath + " " + workPath;
|
|
|
CmdUtils.callLine(fragmentCmd);
|
|
|
if(!ComputerUtil.checkComputeCompleted(dziPath, 5, 200)){
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_5052);
|
|
@@ -230,7 +230,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
hw.put("height",height);
|
|
|
hw.put("width",width);
|
|
|
hw.put("sid",sid);
|
|
|
- hw.put("tileSize",511);
|
|
|
+ hw.put("tileSize",tileSize);
|
|
|
return ResultData.ok(hw);
|
|
|
}
|
|
|
|
|
@@ -637,16 +637,6 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- /* v4.12版本之前是这种方式
|
|
|
- "media": {
|
|
|
- "image": [
|
|
|
- {
|
|
|
- "src": "FfRdi413774.jpg"
|
|
|
- }
|
|
|
- ]
|
|
|
- },
|
|
|
- "type": "image"
|
|
|
- */
|
|
|
if("image".equals(type) || "audio".equals(type) || "video".equals(type)){
|
|
|
//删除图片、视频
|
|
|
JSONObject media = jsonObject.getJSONObject("media");
|