inleft
2022-07-29 ba780fb8c047c665f8d85c013b02e47f8269451d
snowy-main/src/main/java/vip/xiaonuo/modular/blogarticle/mapper/mapping/BlogArticleMapper.xml
@@ -23,6 +23,8 @@
       a.publish_date,
       a.is_top,
       a.editor_status,
       a.is_allowed_comment,
       a.update_date,
       a.create_date
    </sql>
@@ -30,13 +32,22 @@
        <trim prefix="WHERE" prefixOverrides="AND | OR">
            a.is_enable=1
            and a.editor_status=1
            <if test="param.typeId != null">
                AND a.article_type_id = #{param.typeId}
            </if>
            <choose>
                <when test="param.typeId != null">
                    AND a.article_type_id = #{param.typeId}
                    order by a.is_top desc,a.top_value asc , a.create_date desc
                </when>
                <otherwise>
                    AND a.article_type_id != 4
                    order by a.is_top desc,a.top_value asc , a.update_date desc
                </otherwise>
            </choose>
        </trim>
    </sql>
    <select id="searchList" resultType="vip.xiaonuo.modular.blogarticle.param.BlogArticleVo">
    <select id="searchList" resultType="vip.xiaonuo.modular.blogarticle.entity.BlogArticleVo">
        select
        <include refid="Base_Column_List"/>
        ,IFNULL("",CONCAT("/",f2.file_bucket,"/",f2.file_object_name)) as coverFileURL
@@ -54,8 +65,6 @@
        on f2.id=a.cover_file_id
        <include refid="queryListCondition"/>
        order by a.top_value asc , a.create_date desc
        limit #{param.pageNo},#{param.pageSize}
    </select>