<?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.liquidnet.service.goblin.mapper.GoblinSelfTagMapper">

    <select id="countsForList" resultType="com.liquidnet.service.goblin.entity.GoblinSelfTag">
        SELECT tag_id tagId, count(1) counts FROM goblin_goods_tag
        WHERE tag_id IN
        <foreach item="tagId" collection="tagIds" open="(" separator="," close=")">
            #{tagId}
        </foreach>
          AND del_flg='0' AND tag_belong='0'
        GROUP BY tag_id
    </select>
</mapper>
