use of com.plumdo.form.entity.FormModel in project plumdo-work by wengwh.
the class FormModelEditorResource method saveEditorJson.
@ApiOperation(value = "保存表单模型设计内容", notes = "根据传入的editorJson来保存表单模型设计内容")
@ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "表单模型ID", required = true, dataType = "Long", paramType = "path"), @ApiImplicitParam(name = "editorJson", value = "表单模型设计内容", required = true, dataType = "String") })
@RequestMapping(value = "/form-models/{id}/json", method = RequestMethod.PUT)
@ResponseStatus(value = HttpStatus.OK)
public FormModelResponse saveEditorJson(@PathVariable Long id, @RequestBody String editorJson) throws UnsupportedEncodingException {
FormModel formModel = getFormModelFromRequest(id);
formModel.setEditorSourceBytes(editorJson.getBytes("utf-8"));
formModelRepository.save(formModel);
return responseFactory.createFormModelResponse(formModel);
}
Aggregations