Authored by qinchao

监控对象添加标签

@@ -32,9 +32,6 @@ public class TypeInfoCtrl { @@ -32,9 +32,6 @@ public class TypeInfoCtrl {
32 32
33 @RequestMapping(value = "/query", method = RequestMethod.GET) 33 @RequestMapping(value = "/query", method = RequestMethod.GET)
34 public BaseResponse queryTypeInfo() { 34 public BaseResponse queryTypeInfo() {
35 -  
36 - DEBUG.debug("Query all typeInfo...");  
37 -  
38 List<TypeInfo> allTypeInfo = null; 35 List<TypeInfo> allTypeInfo = null;
39 36
40 BaseResponse response = new BaseResponse(); 37 BaseResponse response = new BaseResponse();
@@ -43,15 +40,11 @@ public class TypeInfoCtrl { @@ -43,15 +40,11 @@ public class TypeInfoCtrl {
43 allTypeInfo = typeInfoService.queryAllTypesInfo(); 40 allTypeInfo = typeInfoService.queryAllTypesInfo();
44 41
45 if (null != allTypeInfo) { 42 if (null != allTypeInfo) {
46 -  
47 response.setData(allTypeInfo); 43 response.setData(allTypeInfo);
48 } 44 }
49 } catch (Exception e) { 45 } catch (Exception e) {
50 -  
51 DEBUG.error("Failed to query all typeInfo, error: {}", e); 46 DEBUG.error("Failed to query all typeInfo, error: {}", e);
52 -  
53 response.setCode(400); 47 response.setCode(400);
54 -  
55 response.setMessage(e.getMessage()); 48 response.setMessage(e.getMessage());
56 } 49 }
57 50
@@ -160,9 +153,6 @@ public class TypeInfoCtrl { @@ -160,9 +153,6 @@ public class TypeInfoCtrl {
160 153
161 @RequestMapping(value = "/add", method = RequestMethod.POST) 154 @RequestMapping(value = "/add", method = RequestMethod.POST)
162 public BaseResponse addTypeInfo(@RequestBody TypeInfo request) { 155 public BaseResponse addTypeInfo(@RequestBody TypeInfo request) {
163 -  
164 - DEBUG.debug("Add typeInfo: {}", request);  
165 -  
166 BaseResponse response = new BaseResponse(); 156 BaseResponse response = new BaseResponse();
167 157
168 try { 158 try {
@@ -18,4 +18,6 @@ public class TypeInfo implements Serializable{ @@ -18,4 +18,6 @@ public class TypeInfo implements Serializable{
18 18
19 private int typeParentId; 19 private int typeParentId;
20 20
  21 + private String tags;
  22 +
21 } 23 }
@@ -10,9 +10,10 @@ @@ -10,9 +10,10 @@
10 <id property="typeName" column="alias"></id> 10 <id property="typeName" column="alias"></id>
11 <id property="typeIsLeaf" column="isLeaf"></id> 11 <id property="typeIsLeaf" column="isLeaf"></id>
12 <id property="typeParentId" column="parent_id"></id> 12 <id property="typeParentId" column="parent_id"></id>
  13 + <result property="tags" column="tags" jdbcType="VARCHAR" />
13 </resultMap> 14 </resultMap>
14 15
15 - <sql id="Base_Column_List"> id, alias, isLeaf, parent_id </sql> 16 + <sql id="Base_Column_List"> id, alias, isLeaf, parent_id ,tags </sql>
16 17
17 <select id="getAllTypesInfo" resultType="com.model.TypeInfo" resultMap="typeInfoMap"> 18 <select id="getAllTypesInfo" resultType="com.model.TypeInfo" resultMap="typeInfoMap">
18 SELECT 19 SELECT
@@ -32,7 +33,7 @@ @@ -32,7 +33,7 @@
32 </select> 33 </select>
33 34
34 <insert id="insertTypeInfo" useGeneratedKeys="true" keyProperty="typeId" parameterType="com.model.TypeInfo"> 35 <insert id="insertTypeInfo" useGeneratedKeys="true" keyProperty="typeId" parameterType="com.model.TypeInfo">
35 - INSERT INTO type_info(alias,isLeaf,parent_id) VALUES (#{typeName},#{typeIsLeaf},#{typeParentId}) 36 + INSERT INTO type_info(alias,isLeaf,parent_id,tags) VALUES (#{typeName},#{typeIsLeaf},#{typeParentId},#{tags})
36 </insert> 37 </insert>
37 38
38 <delete id="deleteTypeInfo" parameterType="int"> 39 <delete id="deleteTypeInfo" parameterType="int">