opt checkTagObject info (#847)

This commit is contained in:
daikon
2024-03-21 00:54:44 +08:00
committed by GitHub
parent 01bfb57149
commit 449ad8b117
4 changed files with 45 additions and 34 deletions

View File

@@ -3,28 +3,28 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.tencent.supersonic.headless.server.persistence.mapper.TagCustomMapper">
<resultMap id="BaseTagDO" type="com.tencent.supersonic.headless.server.persistence.dataobject.TagDO">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="item_id" jdbcType="BIGINT" property="itemId" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="created_by" jdbcType="VARCHAR" property="createdBy" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="updated_by" jdbcType="VARCHAR" property="updatedBy" />
<id column="id" jdbcType="BIGINT" property="id"/>
<result column="item_id" jdbcType="BIGINT" property="itemId"/>
<result column="type" jdbcType="VARCHAR" property="type"/>
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt"/>
<result column="created_by" jdbcType="VARCHAR" property="createdBy"/>
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt"/>
<result column="updated_by" jdbcType="VARCHAR" property="updatedBy"/>
</resultMap>
<resultMap id="TagResp" type="com.tencent.supersonic.headless.api.pojo.response.TagResp">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="domain_id" jdbcType="BIGINT" property="domainId" />
<result column="domain_name" jdbcType="VARCHAR" property="domainName" />
<result column="model_id" jdbcType="BIGINT" property="modelId" />
<result column="model_name" jdbcType="VARCHAR" property="modelName" />
<result column="tag_object_id" jdbcType="BIGINT" property="tagObjectId" />
<result column="tag_object_name" jdbcType="VARCHAR" property="tagObjectName" />
<result column="type" jdbcType="VARCHAR" property="tagDefineType" />
<result column="item_id" jdbcType="VARCHAR" property="itemId" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="biz_name" jdbcType="VARCHAR" property="bizName" />
<result column="description" jdbcType="VARCHAR" property="description" />
<id column="id" jdbcType="BIGINT" property="id"/>
<result column="domain_id" jdbcType="BIGINT" property="domainId"/>
<result column="domain_name" jdbcType="VARCHAR" property="domainName"/>
<result column="model_id" jdbcType="BIGINT" property="modelId"/>
<result column="model_name" jdbcType="VARCHAR" property="modelName"/>
<result column="tag_object_id" jdbcType="BIGINT" property="tagObjectId"/>
<result column="tag_object_name" jdbcType="VARCHAR" property="tagObjectName"/>
<result column="type" jdbcType="VARCHAR" property="tagDefineType"/>
<result column="item_id" jdbcType="VARCHAR" property="itemId"/>
<result column="name" jdbcType="VARCHAR" property="name"/>
<result column="biz_name" jdbcType="VARCHAR" property="bizName"/>
<result column="description" jdbcType="VARCHAR" property="description"/>
</resultMap>
<select id="getTagDOList" resultMap="BaseTagDO">
@@ -116,7 +116,16 @@
delete from s2_tag where id = #{id}
</delete>
<delete id="deleteBatch">
<delete id="deleteBatchByIds">
delete from s2_tag
where id in
<foreach collection="ids" index="index" item="tagId" open="(" close=")"
separator=",">
#{tagId}
</foreach>
</delete>
<delete id="deleteBatchByType">
delete from s2_tag
where type = #{type}
<if test="itemIds != null and itemIds.size >0">
@@ -126,14 +135,6 @@
#{itemId}
</foreach>
</if>
<if test="ids != null and ids.size >0">
and id in
<foreach collection="ids" index="index" item="tagId" open="(" close=")"
separator=",">
#{tagId}
</foreach>
</if>
</delete>
</mapper>