|
|
|
@ -43,6 +43,21 @@ |
|
|
|
<result column="isHot" jdbcType="CHAR" property="isHot" /> |
|
|
|
<collection property="signList" ofType="com.bnyer.img.vo.SignRelationVo" select="com.bnyer.img.mapper.ImgSignRelationMapper.querySignRelationByImgId" column="id"/> |
|
|
|
</resultMap> |
|
|
|
<resultMap id="imgListBySignName" type="com.bnyer.img.vo.TiktokImgVo"> |
|
|
|
<id column="id" jdbcType="BIGINT" property="id" /> |
|
|
|
<result column="imgUrl" jdbcType="VARCHAR" property="imgUrl" /> |
|
|
|
<result column="creatorId" jdbcType="BIGINT" property="creatorId" /> |
|
|
|
<result column="typeId" jdbcType="BIGINT" property="typeId" /> |
|
|
|
<result column="downloadNum" jdbcType="INTEGER" property="downloadNum" /> |
|
|
|
<result column="greatNum" jdbcType="INTEGER" property="greatNum" /> |
|
|
|
<result column="collectionNum" jdbcType="INTEGER" property="collectionNum" /> |
|
|
|
<result column="status" jdbcType="CHAR" property="status" /> |
|
|
|
<result column="isHot" jdbcType="CHAR" property="isHot" /> |
|
|
|
<collection property="signList" ofType="com.bnyer.img.vo.SignVo"> |
|
|
|
<id column="signId" jdbcType="BIGINT" property="id" /> |
|
|
|
<result column="signName" jdbcType="VARCHAR" property="name" /> |
|
|
|
</collection> |
|
|
|
</resultMap> |
|
|
|
<sql id="Base_Column_List"> |
|
|
|
<!--@mbg.generated--> |
|
|
|
id, img_url, creator_id, type_id, download_num, great_num, collection_num, `status`, |
|
|
|
@ -145,4 +160,21 @@ |
|
|
|
where iti.id in |
|
|
|
(select img_id from img_img_sign_relation where sign_id = #{signId} and type_id = #{typeId}) |
|
|
|
</select> |
|
|
|
<select id="queryImgPageBySignName" resultMap="imgListBySignName"> |
|
|
|
select |
|
|
|
iti.id as id,iti.img_url as imgUrl,iti.creator_id as creatorId, |
|
|
|
iti.type_id as typeId,iti.download_num as downloadNum, iti.great_num as greatNum, |
|
|
|
iti.collection_num as collectionNum,iti.status as status,iti.is_hot as isHot, |
|
|
|
iis.id as signId,iis.name as signName |
|
|
|
from img_tiktok_img iti |
|
|
|
join img_img_sign_relation iisr on iisr.img_id = iti.id |
|
|
|
join img_sign iis on iisr.sign_id = iis.id |
|
|
|
<where> |
|
|
|
iis.is_show = '1' and iti.is_show = '1' and iti.status = '3' |
|
|
|
<if test="signName != null and signName != ''"> |
|
|
|
and iis.name like concat('%', #{signName}, '%') |
|
|
|
</if> |
|
|
|
</where> |
|
|
|
order by iti.create_time desc |
|
|
|
</select> |
|
|
|
</mapper> |
|
|
|
|