inleft
2022-03-02 42b7d05dfdf60ee67c876084a3240ff48a3bf3a5
snowy-main/src/main/java/vip/xiaonuo/modular/blogarticle/mapper/mapping/BlogArticleMapper.xml
@@ -23,6 +23,7 @@
       a.publish_date,
       a.is_top,
       a.editor_status,
       a.is_allowed_comment,
       a.create_date
    </sql>
@@ -30,16 +31,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}
                </when>
                <otherwise>
                    AND a.article_type_id != 4
                </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"/>
        ,CONCAT("/",f1.file_bucket,"/",f1.file_object_name) as articleFileURL
        ,IFNULL("",CONCAT("/",f2.file_bucket,"/",f2.file_object_name)) as coverFileURL
        ,t.type_name as articleTypeName
        from
@@ -56,7 +63,7 @@
        <include refid="queryListCondition"/>
        order by a.top_value asc , a.create_date desc
        order by a.is_top desc,a.top_value asc , a.create_date desc
        limit #{param.pageNo},#{param.pageSize}
    </select>