feat: support article demo videos and category counts
This commit is contained in:
@@ -11,6 +11,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="articleType" column="article_type" />
|
||||
<result property="keyword" column="keyword" />
|
||||
<result property="showImg" column="show_img" />
|
||||
<result property="videoFeedId" column="video_feed_id" />
|
||||
<result property="videoFeedId2" column="video_feed_id_2" />
|
||||
<result property="appResourceId" column="app_resource_id" />
|
||||
<result property="lookNumber" column="look_number" />
|
||||
<result property="loveNumber" column="love_number" />
|
||||
@@ -46,12 +48,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectAppBlogArticleVo">
|
||||
select id, title, content_info, article_type, keyword, show_img, app_resource_id, look_number, weight, love_number, is_recommendation, is_show, is_ad, ad_number, del_flag, create_by, create_time, remark from app_blog_article
|
||||
select id, title, content_info, article_type, keyword, show_img, video_feed_id, video_feed_id_2, app_resource_id, look_number, weight, love_number, is_recommendation, is_show, is_ad, ad_number, del_flag, create_by, create_time, remark from app_blog_article
|
||||
</sql>
|
||||
|
||||
<select id="selectAppBlogArticleList" parameterType="AppBlogArticle" resultMap="AppBlogArticleWithResourceResult">
|
||||
select
|
||||
a.id, a.title, a.content_info, a.article_type, a.keyword, a.show_img, a.app_resource_id,
|
||||
a.id, a.title, a.content_info, a.article_type, a.keyword, a.show_img, a.video_feed_id, a.video_feed_id_2, a.app_resource_id,
|
||||
a.look_number, a.weight, a.love_number, a.is_recommendation, a.is_show, a.is_ad,
|
||||
a.ad_number, a.del_flag, a.create_by, a.create_time, a.remark,
|
||||
r.id as resource_id,
|
||||
@@ -83,6 +85,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</where>
|
||||
<choose>
|
||||
<when test="orderType == 'look_number'"> ORDER BY a.look_number desc, a.create_time desc</when >
|
||||
<when test="orderType == 'create_time'"> ORDER BY a.create_time desc, a.id desc</when>
|
||||
<otherwise> ORDER BY a.weight desc, a.create_time desc</otherwise >
|
||||
</choose>
|
||||
</select>
|
||||
@@ -106,6 +109,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="articleType != null">article_type,</if>
|
||||
<if test="keyword != null and keyword != ''">keyword,</if>
|
||||
<if test="showImg != null">show_img,</if>
|
||||
<if test="videoFeedId != null">video_feed_id,</if>
|
||||
<if test="videoFeedId2 != null">video_feed_id_2,</if>
|
||||
<if test="appResourceId != null">app_resource_id,</if>
|
||||
<if test="lookNumber != null">look_number,</if>
|
||||
<if test="loveNumber != null">love_number,</if>
|
||||
@@ -125,6 +130,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="articleType != null">#{articleType},</if>
|
||||
<if test="keyword != null and keyword != ''">#{keyword},</if>
|
||||
<if test="showImg != null">#{showImg},</if>
|
||||
<if test="videoFeedId != null">#{videoFeedId},</if>
|
||||
<if test="videoFeedId2 != null">#{videoFeedId2},</if>
|
||||
<if test="appResourceId != null">#{appResourceId},</if>
|
||||
<if test="lookNumber != null">#{lookNumber},</if>
|
||||
<if test="loveNumber != null">#{loveNumber},</if>
|
||||
@@ -148,6 +155,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="articleType != null">article_type = #{articleType},</if>
|
||||
<if test="keyword != null and keyword != ''">keyword = #{keyword},</if>
|
||||
<if test="showImg != null">show_img = #{showImg},</if>
|
||||
<if test="videoFeedId != null">video_feed_id = #{videoFeedId},</if>
|
||||
<if test="videoFeedId2 != null">video_feed_id_2 = #{videoFeedId2},</if>
|
||||
<if test="appResourceId != null">app_resource_id = #{appResourceId},</if>
|
||||
<if test="lookNumber != null">look_number = #{lookNumber},</if>
|
||||
<if test="loveNumber != null">love_number = #{loveNumber},</if>
|
||||
|
||||
Reference in New Issue
Block a user