|
@@ -0,0 +1,58 @@
|
|
|
+package com.qizhen.healsphere.web;
|
|
|
+
|
|
|
+import com.qizhen.healsphere.service.PropertyService;
|
|
|
+import com.qizhen.healsphere.web.dto.RespDTO;
|
|
|
+import com.qizhen.healsphere.web.vo.DeletePropertyVO;
|
|
|
+import com.qizhen.healsphere.web.vo.EntityVO;
|
|
|
+import com.qizhen.healsphere.web.vo.UpdatePropertyVO;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.stereotype.Controller;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
+import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+@Controller
|
|
|
+@RequestMapping("/property")
|
|
|
+@Api(value = "属性API", tags = { "属性API" })
|
|
|
+public class PropertyController {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ PropertyService propertyService;
|
|
|
+
|
|
|
+ @ApiOperation(value = "批量新增实体属性",
|
|
|
+ notes = "")
|
|
|
+ @RequestMapping(value = "/createEntityProperty",method = RequestMethod.POST)
|
|
|
+ @ResponseBody
|
|
|
+ public RespDTO<List<Map<String, Object>>> createEntityProperty(@RequestBody List<EntityVO> entityList) {
|
|
|
+
|
|
|
+ List<Map<String, Object>> list = propertyService.createEntityProperty(entityList);
|
|
|
+ return RespDTO.onSuc(list);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "删除实体属性",
|
|
|
+ notes = "")
|
|
|
+ @RequestMapping(value = "/deleteEntityProperty",method = RequestMethod.DELETE)
|
|
|
+ @ResponseBody
|
|
|
+ public RespDTO<List<Map<String, Object>>> deleteEntityProperty(@RequestBody List<DeletePropertyVO> deletePropertyList) {
|
|
|
+
|
|
|
+ List<Map<String, Object>> list = propertyService.deleteEntityProperty(deletePropertyList);
|
|
|
+ return RespDTO.onSuc(list);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation(value = "更新实体属性",
|
|
|
+ notes = "")
|
|
|
+ @RequestMapping(value = "/updateEntityProperty",method = RequestMethod.PUT)
|
|
|
+ @ResponseBody
|
|
|
+ public RespDTO<Map<String, Object>> updateEntityProperty(@RequestBody UpdatePropertyVO updateProperty) {
|
|
|
+
|
|
|
+ Map<String, Object> entity = propertyService.updateEntityProperty(updateProperty);
|
|
|
+ return RespDTO.onSuc(entity);
|
|
|
+ }
|
|
|
+
|
|
|
+}
|