Helius
2022-07-12 3a8d8b6de6daf6e7198a2b8d562dc2fbf49a4a2a
Merge branch 'master' of http://120.27.238.55:7000/r/farmer-cms
3 files modified
20 ■■■■■ changed files
src/main/java/com/xcong/farmer/cms/modules/system/service/Impl/ArticleServiceImpl.java 9 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/farmer/cms/modules/system/vo/WebArticleVo.java 6 ●●●●● patch | view | raw | blame | history
src/main/resources/mapper/ArticleMapper.xml 5 ●●●● patch | view | raw | blame | history
src/main/java/com/xcong/farmer/cms/modules/system/service/Impl/ArticleServiceImpl.java
@@ -292,6 +292,15 @@
            articleEntity.setTimeType(timeType);
        }
        IPage<WebArticleVo> list = this.baseMapper.selectWebArticleInPage(page,articleEntity);
        if (CollUtil.isNotEmpty(list.getRecords())) {
            for (WebArticleVo record : list.getRecords()) {
                // 站内
                if (record.getType() == 1) {
                    record.setArticleUrl(record.getBaseUrl() + record.getPath() + "/" + record.getId() + ".html");
                }
            }
        }
        return Result.ok(list);
    }
src/main/java/com/xcong/farmer/cms/modules/system/vo/WebArticleVo.java
@@ -56,4 +56,10 @@
    @ApiModelProperty(value = "外部链接地址")
    private String articleUrl;
    @ApiModelProperty(hidden = true)
    private String baseUrl;
    @ApiModelProperty(hidden = true)
    private String path;
}
src/main/resources/mapper/ArticleMapper.xml
@@ -99,10 +99,13 @@
    <select id="selectWebArticleInPage" resultType="com.xcong.farmer.cms.modules.system.vo.WebArticleVo">
        SELECT
        a.*,
        b.column_name columnName
        b.column_name columnName,
        c.web_address baseUrl,
        b.path path
        FROM
        t_article a
        left join t_column b on a.column_id = b.id
        inner join t_company c on a.company_id=c.id
        <where>
            and a.del_status = 1
            and a.release_status = 1