inleft
2022-02-25 cb2e50914c13bf63c9415fae01063fe74e7ae292
调整主页查询日志条件
2 files modified
19 ■■■■■ changed files
snowy-main/src/main/java/vip/xiaonuo/modular/blogarticle/controller/BlogArticleOutsideController.java 6 ●●●● patch | view | raw | blame | history
snowy-main/src/main/java/vip/xiaonuo/modular/blogarticle/mapper/mapping/BlogArticleMapper.xml 13 ●●●● patch | view | raw | blame | history
snowy-main/src/main/java/vip/xiaonuo/modular/blogarticle/controller/BlogArticleOutsideController.java
@@ -124,15 +124,11 @@
        BlogArticle article = new BlogArticle();
        BeanUtil.copyProperties(addDto, article);
        article.setSeparateYear(DateUtil.year(article.getPublishDate()));
        article.setSeparateMonth(DateUtil.month(article.getPublishDate()));
        article.setSeparateMonth(DateUtil.month(article.getPublishDate())+1);
        article.setSeparateDay(DateUtil.dayOfMonth(article.getPublishDate()));
        article.setIsEnable(MyConstant.Yes);
        blogArticleService.save(article);
        System.out.println(article.toString());
//        blogArticleService.add(blogArticleParam);
        return new SuccessResponseData();
    }
snowy-main/src/main/java/vip/xiaonuo/modular/blogarticle/mapper/mapping/BlogArticleMapper.xml
@@ -30,10 +30,17 @@
        <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">