Authored by qinchao

监控对象添加标签

... ... @@ -32,9 +32,6 @@ public class TypeInfoCtrl {
@RequestMapping(value = "/query", method = RequestMethod.GET)
public BaseResponse queryTypeInfo() {
DEBUG.debug("Query all typeInfo...");
List<TypeInfo> allTypeInfo = null;
BaseResponse response = new BaseResponse();
... ... @@ -43,15 +40,11 @@ public class TypeInfoCtrl {
allTypeInfo = typeInfoService.queryAllTypesInfo();
if (null != allTypeInfo) {
response.setData(allTypeInfo);
}
} catch (Exception e) {
DEBUG.error("Failed to query all typeInfo, error: {}", e);
response.setCode(400);
response.setMessage(e.getMessage());
}
... ... @@ -160,9 +153,6 @@ public class TypeInfoCtrl {
@RequestMapping(value = "/add", method = RequestMethod.POST)
public BaseResponse addTypeInfo(@RequestBody TypeInfo request) {
DEBUG.debug("Add typeInfo: {}", request);
BaseResponse response = new BaseResponse();
try {
... ...
... ... @@ -18,4 +18,6 @@ public class TypeInfo implements Serializable{
private int typeParentId;
private String tags;
}
... ...
... ... @@ -10,9 +10,10 @@
<id property="typeName" column="alias"></id>
<id property="typeIsLeaf" column="isLeaf"></id>
<id property="typeParentId" column="parent_id"></id>
<result property="tags" column="tags" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List"> id, alias, isLeaf, parent_id </sql>
<sql id="Base_Column_List"> id, alias, isLeaf, parent_id ,tags </sql>
<select id="getAllTypesInfo" resultType="com.model.TypeInfo" resultMap="typeInfoMap">
SELECT
... ... @@ -32,7 +33,7 @@
</select>
<insert id="insertTypeInfo" useGeneratedKeys="true" keyProperty="typeId" parameterType="com.model.TypeInfo">
INSERT INTO type_info(alias,isLeaf,parent_id) VALUES (#{typeName},#{typeIsLeaf},#{typeParentId})
INSERT INTO type_info(alias,isLeaf,parent_id,tags) VALUES (#{typeName},#{typeIsLeaf},#{typeParentId},#{tags})
</insert>
<delete id="deleteTypeInfo" parameterType="int">
... ...