|
|
|
@ -27,10 +27,14 @@ |
|
|
|
<!--@mbg.generated--> |
|
|
|
<!--@Table img_creator--> |
|
|
|
<id column="id" jdbcType="BIGINT" property="id" /> |
|
|
|
<result column="scan_code" jdbcType="VARCHAR" property="scanCode" /> |
|
|
|
<result column="scanCode" jdbcType="VARCHAR" property="scanCode" /> |
|
|
|
<result column="img" jdbcType="VARCHAR" property="img" /> |
|
|
|
<result column="is_hot" jdbcType="CHAR" property="isHot" /> |
|
|
|
<result column="isHot" jdbcType="CHAR" property="isHot" /> |
|
|
|
<result column="sort" jdbcType="INTEGER" property="sort" /> |
|
|
|
<result column="intro" jdbcType="VARCHAR" property="intro" /> |
|
|
|
<result column="imgTotalNum" jdbcType="INTEGER" property="imgTotalNum" /> |
|
|
|
<result column="imgCollectionNum" jdbcType="INTEGER" property="imgCollectionNum" /> |
|
|
|
<result column="imgLikeNum" jdbcType="INTEGER" property="imgLikeNum" /> |
|
|
|
<collection property="imgList" ofType="com.bnyer.img.vo.TiktokImgVo" select="com.bnyer.img.mapper.TiktokImgMapper.queryThreeImgs" column="id"/> |
|
|
|
</resultMap> |
|
|
|
<sql id="Base_Column_List"> |
|
|
|
@ -41,15 +45,21 @@ |
|
|
|
|
|
|
|
<select id="queryThreeImgCreatorList" resultMap="CreatorThreeList"> |
|
|
|
select |
|
|
|
id, scan_code,img,is_hot,sort |
|
|
|
ic.id as id, ic.scan_code as scanCode,ic.img as img,ic.is_hot as isHot,ic.sort as sort,ic.intro as intro, |
|
|
|
(select count(id) from img_tiktok_img where creator_id = ic.id) as imgTotalNum, |
|
|
|
(select sum(great_num) from img_tiktok_img where creator_id = ic.id) as imgLikeNum, |
|
|
|
(select sum(collection_num) from img_tiktok_img where creator_id = ic.id) as imgCollectionNum |
|
|
|
from img_creator ic |
|
|
|
where ic.is_show = '1' |
|
|
|
order by ic.create_time desc |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="queryThreeImgCreatorListByScanCode" resultMap="CreatorThreeList"> |
|
|
|
<select id="queryThreeImgCreatorListByScanCode" resultMap="CreatorThreeList"> |
|
|
|
select |
|
|
|
id, scan_code,img,is_hot,sort |
|
|
|
ic.id as id, ic.scan_code as scanCode,ic.img as img,ic.is_hot as isHot,ic.sort as sort,ic.intro as intro, |
|
|
|
(select count(id) from img_tiktok_img where creator_id = ic.id) as imgTotalNum, |
|
|
|
(select sum(great_num) from img_tiktok_img where creator_id = ic.id) as imgLikeNum, |
|
|
|
(select sum(collection_num) from img_tiktok_img where creator_id = ic.id) as imgCollectionNum |
|
|
|
from img_creator ic |
|
|
|
where ic.is_show = '1' and ic.scan_code = #{scanCode} |
|
|
|
</select> |
|
|
|
@ -98,4 +108,11 @@ |
|
|
|
where id = #{item.id} |
|
|
|
</foreach> |
|
|
|
</update> |
|
|
|
<select id="queryHotCreatorList" resultType="com.bnyer.img.vo.CreatorHotVo"> |
|
|
|
select |
|
|
|
ic.id,ic.scan_code,ic.is_hot,ic.img, |
|
|
|
(select sum(download_num+great_num+collection_num) from img_tiktok_img where creator_id = ic.id) as hotNum |
|
|
|
from img_creator ic |
|
|
|
order by hotNum desc limit 10 |
|
|
|
</select> |
|
|
|
</mapper> |
|
|
|
|