<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.excel.wecom.mapper.WecomTagMapper">

    <resultMap id="BaseResultMap" type="com.ruoyi.excel.wecom.domain.WecomTagDomain">
        <id column="id" property="id" />
        <result column="corp_id" property="corpId" />
        <result column="tag_id" property="tagId" />
        <result column="tag_group_id" property="tagGroupId" />
        <result column="name" property="name" />
        <result column="create_time" property="createTime" />
        <result column="order_no" property="orderNo" />
        <result column="sync_time" property="syncTime" />
    </resultMap>

    <sql id="Base_Column_List">
        id, tag_id, tag_group_id, name, create_time, order, sync_time
    </sql>

    <!-- 根据标签ID查询标签 -->
    <select id="selectByTagId" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
        from wecom_tag
        where corp_id = #{corpId} and tag_id = #{tagId}
    </select>

</mapper>
