提交代码

master
rong.liu 2 years ago
parent 73e9b218c2
commit 17964852a3
  1. 37
      src/main/java/com/huoran/iasf/mapper/xml/SysContentMapper.xml
  2. 10
      src/main/java/com/huoran/iasf/service/impl/SysContentServiceImpl.java
  3. 7
      src/main/java/com/huoran/iasf/vo/req/PageContentReqVO.java

@ -37,8 +37,8 @@
</if>
<if test="req.templateStatus ==0">
AND c.is_disable = #{req.templateStatus}
<if test="req.isDisable != null and req.isDisable != '' or req.isDisable==0">
AND c.is_disable = #{req.isDisable}
</if>
@ -59,7 +59,6 @@
</if>
</select>
@ -162,24 +161,20 @@
</if>
</select>
<select id="columnConditionsFilterArticles" resultType="com.huoran.iasf.vo.resp.PageContentRespVO">
SELECT
t.*,
( SELECT cl.list_style_id FROM sys_column cl WHERE cl.id = t.column_id ) AS listStyleId
FROM
(
SELECT
s.*,
( SELECT GROUP_CONCAT( label_name ) FROM sys_content_label l WHERE deleted = 1 AND FIND_IN_SET( l.id, s.lable_id ) ) AS labelName,
( SELECT c.classification_name FROM sys_content_classification c WHERE deleted = 1 AND s.classification_id = c.id ) AS classificationName
FROM
sys_content s
WHERE
s.deleted = 1
AND is_disable = 0
AND is_release = 1
) t
WHERE
FIND_IN_SET( t.column_id, #{columnId} )
SELECT t.*,
(SELECT cl.list_style_id FROM sys_column cl WHERE cl.id = t.column_id) AS listStyleId
FROM (SELECT s.*,
(SELECT GROUP_CONCAT(label_name)
FROM sys_content_label l
WHERE deleted = 1 AND FIND_IN_SET(l.id, s.lable_id)) AS labelName,
(SELECT c.classification_name
FROM sys_content_classification c
WHERE deleted = 1 AND s.classification_id = c.id) AS classificationName
FROM sys_content s
WHERE s.deleted = 1
AND is_disable = 0
AND is_release = 1) t
WHERE FIND_IN_SET(t.column_id, #{columnId})
ORDER BY t.release_time DESC
</select>

@ -61,10 +61,12 @@ public class SysContentServiceImpl extends ServiceImpl<SysContentMapper, SysCont
if (reqVO.getModifiedTimeSort() == null && reqVO.getPublicationTimeSort() == null) {
reqVO.setPublicationTimeSort(0);
}
if (reqVO.getTemplateStatus() == null) {
//是否禁用(0默认,0启用 1禁用) todo 此处应该为对is_disable进行设置的
reqVO.setTemplateStatus(0);
}
/*if (reqVO.getIsDisable()!=null){
if (reqVO.getIsDisable() == 1) {
//是否禁用(0默认,0启用 1禁用)
reqVO.setIsDisable(1);
}
}*/
IPage<PageContentRespVO> pageList = baseMapper.articlePaginationList(page, reqVO);
return R.success(pageList);
}

@ -55,8 +55,9 @@ public class PageContentReqVO extends PageReqVO {
@ApiModelProperty(value = "发布时间排序(0默认倒序 1升序)")
private Integer publicationTimeSort;
@ApiModelProperty(value = "模板状态(0禁用;1启用)")
private Integer templateStatus;
/* @ApiModelProperty(value = "模板状态(0禁用;1启用)")
private Integer templateStatus;*/
@ApiModelProperty(value = "是否禁用(0默认,0启用 1禁用)")
private Integer isDisable;
}
Loading…
Cancel
Save