|
|
|
@ -18,25 +18,52 @@ |
|
|
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> |
|
|
|
<result column="sort" jdbcType="INTEGER" property="sort" /> |
|
|
|
</resultMap> |
|
|
|
|
|
|
|
<resultMap id="imgList" 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" select="com.bnyer.img.mapper.ImgSignRelationMapper.querySignListByImgId" column="id"/> |
|
|
|
</resultMap> |
|
|
|
<resultMap id="imgSignList" type="com.bnyer.img.vo.ImgSignVo"> |
|
|
|
<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.SignRelationVo" select="com.bnyer.img.mapper.ImgSignRelationMapper.querySignRelationByImgId" column="id"/> |
|
|
|
</resultMap> |
|
|
|
<sql id="Base_Column_List"> |
|
|
|
<!--@mbg.generated--> |
|
|
|
id, img_url, creator_id, type_id, download_num, great_num, collection_num, `status`, |
|
|
|
is_hot, is_show, create_time, update_time, sort |
|
|
|
</sql> |
|
|
|
<select id="queryInList" resultType="com.bnyer.img.vo.TiktokImgVo"> |
|
|
|
<select id="queryInList" resultMap="imgSignList"> |
|
|
|
select |
|
|
|
id,img_url,creator_id,type_id,download_num, great_num, collection_num,status,is_hot |
|
|
|
from img_tiktok_img |
|
|
|
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 |
|
|
|
from img_tiktok_img iti |
|
|
|
<where> |
|
|
|
is_show = '1' |
|
|
|
iti.is_show = '1' |
|
|
|
<if test="creatorId != null and creatorId != ''"> |
|
|
|
and creator_id = #{creatorId} |
|
|
|
and iti.creator_id = #{creatorId} |
|
|
|
</if> |
|
|
|
<if test="typeId != null and typeId != ''"> |
|
|
|
and type_id = #{typeId} |
|
|
|
and iti.type_id = #{typeId} |
|
|
|
</if> |
|
|
|
</where> |
|
|
|
order by create_time desc |
|
|
|
order by iti.create_time desc |
|
|
|
</select> |
|
|
|
<!-- <select id="queryOutList" resultType="com.bnyer.img.vo.TiktokImgVo">--> |
|
|
|
<!-- select--> |
|
|
|
@ -53,37 +80,45 @@ |
|
|
|
<!-- </where>--> |
|
|
|
<!-- order by create_time desc--> |
|
|
|
<!-- </select>--> |
|
|
|
<select id="queryThreeImgs" resultType="com.bnyer.img.vo.TiktokImgVo"> |
|
|
|
<select id="queryThreeImgs" resultMap="imgList"> |
|
|
|
select |
|
|
|
id,img_url,creator_id,type_id,download_num, great_num, collection_num,status,is_hot |
|
|
|
from img_tiktok_img |
|
|
|
where creator_id = #{creatorId} and is_show = '1' and status = '3' |
|
|
|
order by create_time desc |
|
|
|
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 greatNum, iti.collection_num as collectionNum, |
|
|
|
iti.status as status,iti.is_hot as isHot |
|
|
|
from img_tiktok_img iti |
|
|
|
where iti.creator_id = #{creatorId} and iti.is_show = '1' and iti.status = '3' |
|
|
|
order by iti.create_time desc |
|
|
|
limit 3 |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="queryTypeImgList" resultType="com.bnyer.img.vo.TiktokImgVo"> |
|
|
|
<select id="queryTypeImgList" resultMap="imgList"> |
|
|
|
select |
|
|
|
id,img_url,creator_id,type_id,download_num, great_num, collection_num,status,is_hot |
|
|
|
from img_tiktok_img |
|
|
|
where creator_id = #{creatorId} and is_show = '1' and status = '3' |
|
|
|
order by create_time desc |
|
|
|
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 |
|
|
|
from img_tiktok_img iti |
|
|
|
where iti.creator_id = #{creatorId} and iti.is_show = '1' and iti.status = '3' |
|
|
|
order by iti.create_time desc |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="queryDetails" resultType="com.bnyer.img.vo.TiktokImgVo"> |
|
|
|
<select id="queryDetails" resultMap="imgList"> |
|
|
|
select |
|
|
|
id,img_url,creator_id,type_id,download_num, great_num, collection_num,status,is_hot |
|
|
|
from img_tiktok_img |
|
|
|
where is_show = '1' and status = '3' and id = #{imgId} |
|
|
|
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 |
|
|
|
from img_tiktok_img iti |
|
|
|
where iti.is_show = '1' and iti.status = '3' and iti.id = #{imgId} |
|
|
|
</select> |
|
|
|
<select id="queryFrontPage" resultType="com.bnyer.img.vo.TiktokImgVo"> |
|
|
|
<select id="queryFrontPage" resultMap="imgList"> |
|
|
|
select |
|
|
|
id,img_url,creator_id,type_id,download_num, great_num, collection_num,status,is_hot |
|
|
|
from img_tiktok_img |
|
|
|
where is_show = '1' and status = '3' |
|
|
|
iti.id as id,iti.img_url as imgUrl,iti.creator_id as creatorId, |
|
|
|
iti.type_id as typeId,iti.download_num downloadNum, iti.great_num as greatNum, |
|
|
|
iti.collection_num as collectionNum,iti.status as status,iti.is_hot as isHot |
|
|
|
from img_tiktok_img iti |
|
|
|
where iti.is_show = '1' and iti.status = '3' |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="queryImgsByScanCodeAndTypeId" resultType="com.bnyer.img.vo.TiktokImgVo"> |
|
|
|
<select id="queryImgsByScanCodeAndTypeId" resultMap="imgList"> |
|
|
|
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, |
|
|
|
@ -101,4 +136,13 @@ |
|
|
|
where type_id = #{typeId} and creator_id = #{creatorId} and is_show = '1' |
|
|
|
and status = '1' |
|
|
|
</select> |
|
|
|
<select id="querySignImgBySignIdAndTypeId" resultMap="imgList"> |
|
|
|
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 |
|
|
|
from img_tiktok_img iti |
|
|
|
where iti.id in |
|
|
|
(select img_id from img_img_sign_relation where sign_id = #{signId} and type_id = #{typeId}) |
|
|
|
</select> |
|
|
|
</mapper> |
|
|
|
|