/** * Sửa thông tin thuộc tính model theo id * * @param propertys * @return * @throws java.lang.Exception */ @RequestMapping(value = "/editproperties", method = RequestMethod.POST) @ResponseBody public Response editProperties(@RequestBody HashMap<String, String> propertys) throws Exception { try { String idModel = propertys.get("id"); List<ModelProperty> propertysx = gson.fromJson( propertys.get("propertys"), new TypeToken<List<ModelProperty>>() {}.getType()); modelService.updateProperties(idModel, propertysx); return new Response(true, "Cập nhật thành công thuộc tính"); } catch (Exception e) { return new Response(false, e.getMessage()); } }