Merge branch 'master' of http://120.27.238.55:7000/r/farmer-cms
|  |  |  | 
|---|
|  |  |  | 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); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | @ApiModelProperty(value = "外部链接地址") | 
|---|
|  |  |  | private String articleUrl; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiModelProperty(hidden = true) | 
|---|
|  |  |  | private String baseUrl; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiModelProperty(hidden = true) | 
|---|
|  |  |  | private String path; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | <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 | 
|---|