|
@@ -95,12 +95,17 @@ public class SceneMarkShapeController extends BaseController
|
|
|
sceneMarkShapeService.saveFileToDB(file,num);
|
|
|
return ResultData.ok();
|
|
|
}
|
|
|
-
|
|
|
/**
|
|
|
* 保存或者修改JSON
|
|
|
*/
|
|
|
@PostMapping("/saveOrEditJson")
|
|
|
public ResultData saveOrEditJson(@RequestBody SceneMarkShape param) {
|
|
|
- return ResultData.ok(sceneMarkShapeService.saveOrUpdate(param));
|
|
|
+ SceneMarkShape shape = sceneMarkShapeService.findByNumAndImagePath(param.getNum(), param.getImagePath());
|
|
|
+ if (ObjectUtil.isNotNull(shape)){
|
|
|
+ param.setId(shape.getId());
|
|
|
+ return ResultData.ok(sceneMarkShapeService.updateById(shape));
|
|
|
+ }else {
|
|
|
+ return ResultData.ok(sceneMarkShapeService.save(shape));
|
|
|
+ }
|
|
|
}
|
|
|
}
|