<?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.zbkj.service.dao.ReviewTagDao">

    <select id="getReviewTagsByProductId" resultType="java.lang.String">
        select t.`name` from eb_review_tag t
         inner join eb_review_tag_category tc on t.id = tc.review_tag_id
         inner join (
            select r.cate_id
            from eb_store_product r where r.id = #{id}
        ) t on FIND_IN_SET(tc.cid,t.cate_id)
        where t.status = 1 and tc.status = 1
    </select>

</mapper>
