diff --git a/src/main/java/com/huoran/iasf/controller/SysColumnController.java b/src/main/java/com/huoran/iasf/controller/SysColumnController.java index 5658612..9216dc8 100644 --- a/src/main/java/com/huoran/iasf/controller/SysColumnController.java +++ b/src/main/java/com/huoran/iasf/controller/SysColumnController.java @@ -217,11 +217,12 @@ public class SysColumnController { @ApiOperation("某一级查全部") @PostMapping("/oneLevelChecksThemAll") - public R oneLevelChecksThemAll(@ApiParam(name = "id", value = "栏目id", required = true) @RequestParam Integer id) { + public R oneLevelChecksThemAll(@ApiParam(name = "id", value = "栏目id", required = true) @RequestParam Integer id, + @ApiParam(name = "isSort", value = "判断是否为排序接口调用(1为排序接口调用 0我栏目管理列表调用)", required = true) @RequestParam Integer isSort) { Integer pid = service.oneLevelChecksThemAll(id); String ids = this.getIds(pid); - return service.getSubColumn(pid, ids); + return service.getSubColumn(pid, ids,isSort); } diff --git a/src/main/java/com/huoran/iasf/mapper/SysColumnMapper.java b/src/main/java/com/huoran/iasf/mapper/SysColumnMapper.java index 337d3fc..3f1a387 100644 --- a/src/main/java/com/huoran/iasf/mapper/SysColumnMapper.java +++ b/src/main/java/com/huoran/iasf/mapper/SysColumnMapper.java @@ -34,7 +34,7 @@ public interface SysColumnMapper extends BaseMapper { //依据子级查询父级 List getParentInformationBasedOnChild(@Param("id")Integer id); - List getsTheSubColumn(@Param("parentId")Integer parentId ,@Param("ids")String ids); + List getsTheSubColumn(@Param("parentId")Integer parentId ,@Param("ids")String ids ,@Param("isSort")Integer isSort); Integer oneLevelChecksThemAll(@Param("theChildId")Integer theChildId); diff --git a/src/main/java/com/huoran/iasf/mapper/xml/SysColumnMapper.xml b/src/main/java/com/huoran/iasf/mapper/xml/SysColumnMapper.xml index 12609e7..bed1a19 100644 --- a/src/main/java/com/huoran/iasf/mapper/xml/SysColumnMapper.xml +++ b/src/main/java/com/huoran/iasf/mapper/xml/SysColumnMapper.xml @@ -148,53 +148,51 @@ --> diff --git a/src/main/java/com/huoran/iasf/mapper/xml/SysContentMapper.xml b/src/main/java/com/huoran/iasf/mapper/xml/SysContentMapper.xml index 2ae29d4..aa7c0eb 100644 --- a/src/main/java/com/huoran/iasf/mapper/xml/SysContentMapper.xml +++ b/src/main/java/com/huoran/iasf/mapper/xml/SysContentMapper.xml @@ -57,6 +57,7 @@ sys_content s WHERE is_disable = 0 + AND s.deleted = 1 AND is_release = 1 ) t WHERE @@ -157,6 +158,8 @@ ) t WHERE FIND_IN_SET( t.column_id, #{columnId} ) + + ORDER BY t.create_time desc diff --git a/src/main/java/com/huoran/iasf/service/SysColumnService.java b/src/main/java/com/huoran/iasf/service/SysColumnService.java index 0579830..b50d578 100644 --- a/src/main/java/com/huoran/iasf/service/SysColumnService.java +++ b/src/main/java/com/huoran/iasf/service/SysColumnService.java @@ -38,7 +38,7 @@ public interface SysColumnService extends IService { Integer oneLevelChecksThemAll(Integer theChildId); - R getSubColumn(Integer parentId,String ids); + R getSubColumn(Integer parentId,String ids,Integer isSort); R queryArticlesByColumnType(String ids,Integer id); diff --git a/src/main/java/com/huoran/iasf/service/impl/SysColumnServiceImpl.java b/src/main/java/com/huoran/iasf/service/impl/SysColumnServiceImpl.java index 14d2888..8b407ab 100644 --- a/src/main/java/com/huoran/iasf/service/impl/SysColumnServiceImpl.java +++ b/src/main/java/com/huoran/iasf/service/impl/SysColumnServiceImpl.java @@ -140,14 +140,14 @@ public class SysColumnServiceImpl extends ServiceImpl getsTheSubColumn = baseMapper.getsTheSubColumn(pid, ids); + List getsTheSubColumn = baseMapper.getsTheSubColumn(pid, ids,null); return R.success(TreeStructureUtils.buildTree(getsTheSubColumn, pid)); } @Override public R getsSublevelColumnsUnderALevel(Integer parentId, String ids) { - List getsTheSubColumn = baseMapper.getsTheSubColumn(parentId, ids); + List getsTheSubColumn = baseMapper.getsTheSubColumn(parentId, ids,null); List buildTree = TreeStructureUtils.buildTree(getsTheSubColumn, parentId); return R.success(buildTree); } @@ -159,8 +159,8 @@ public class SysColumnServiceImpl extends ServiceImpl getsTheSubColumn = baseMapper.getsTheSubColumn(parentId, ids); + public R getSubColumn(Integer parentId, String ids,Integer isSort) { + List getsTheSubColumn = baseMapper.getsTheSubColumn(parentId, ids,isSort); return R.success(TreeStructureUtils.forMethod(getsTheSubColumn)); }