提交代码

master
rong.liu 2 years ago
parent 73e9b218c2
commit 17964852a3
  1. 35
      src/main/java/com/huoran/iasf/mapper/xml/SysContentMapper.xml
  2. 8
      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>
<if test="req.templateStatus ==0"> <if test="req.isDisable != null and req.isDisable != '' or req.isDisable==0">
AND c.is_disable = #{req.templateStatus} AND c.is_disable = #{req.isDisable}
</if> </if>
@ -59,7 +59,6 @@
</if> </if>
</select> </select>
@ -162,24 +161,20 @@
</if> </if>
</select> </select>
<select id="columnConditionsFilterArticles" resultType="com.huoran.iasf.vo.resp.PageContentRespVO"> <select id="columnConditionsFilterArticles" resultType="com.huoran.iasf.vo.resp.PageContentRespVO">
SELECT SELECT t.*,
t.*, (SELECT cl.list_style_id FROM sys_column cl WHERE cl.id = t.column_id) AS listStyleId
( SELECT cl.list_style_id FROM sys_column cl WHERE cl.id = t.column_id ) AS listStyleId FROM (SELECT s.*,
FROM (SELECT GROUP_CONCAT(label_name)
( FROM sys_content_label l
SELECT WHERE deleted = 1 AND FIND_IN_SET(l.id, s.lable_id)) AS labelName,
s.*, (SELECT c.classification_name
( SELECT GROUP_CONCAT( label_name ) FROM sys_content_label l WHERE deleted = 1 AND FIND_IN_SET( l.id, s.lable_id ) ) AS labelName, FROM sys_content_classification c
( SELECT c.classification_name FROM sys_content_classification c WHERE deleted = 1 AND s.classification_id = c.id ) AS classificationName WHERE deleted = 1 AND s.classification_id = c.id) AS classificationName
FROM FROM sys_content s
sys_content s WHERE s.deleted = 1
WHERE
s.deleted = 1
AND is_disable = 0 AND is_disable = 0
AND is_release = 1 AND is_release = 1) t
) t WHERE FIND_IN_SET(t.column_id, #{columnId})
WHERE
FIND_IN_SET( t.column_id, #{columnId} )
ORDER BY t.release_time DESC ORDER BY t.release_time DESC
</select> </select>

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

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