|
|
@ -8,6 +8,7 @@ import com.huoran.iasf.common.utils.R; |
|
|
|
import com.huoran.iasf.common.utils.TreeStructureUtils; |
|
|
|
import com.huoran.iasf.common.utils.TreeStructureUtils; |
|
|
|
import com.huoran.iasf.entity.SysColumn; |
|
|
|
import com.huoran.iasf.entity.SysColumn; |
|
|
|
import com.huoran.iasf.mapper.SysColumnMapper; |
|
|
|
import com.huoran.iasf.mapper.SysColumnMapper; |
|
|
|
|
|
|
|
import com.huoran.iasf.mapper.SysContentMapper; |
|
|
|
import com.huoran.iasf.service.SysColumnService; |
|
|
|
import com.huoran.iasf.service.SysColumnService; |
|
|
|
import com.huoran.iasf.vo.FatherContentRespVO; |
|
|
|
import com.huoran.iasf.vo.FatherContentRespVO; |
|
|
|
import com.huoran.iasf.vo.req.ColumnWeightReqVO; |
|
|
|
import com.huoran.iasf.vo.req.ColumnWeightReqVO; |
|
|
@ -33,6 +34,9 @@ public class SysColumnServiceImpl extends ServiceImpl<SysColumnMapper, SysColumn |
|
|
|
@Autowired |
|
|
|
@Autowired |
|
|
|
private SysColumnMapper mapper; |
|
|
|
private SysColumnMapper mapper; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
|
|
private SysContentMapper contentMapper; |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public boolean sameLevelJudgment(ColumnWeightReqVO column) { |
|
|
|
public boolean sameLevelJudgment(ColumnWeightReqVO column) { |
|
|
|
QueryWrapper<SysColumn> queryWrapper = new QueryWrapper<>(); |
|
|
|
QueryWrapper<SysColumn> queryWrapper = new QueryWrapper<>(); |
|
|
@ -160,6 +164,26 @@ public class SysColumnServiceImpl extends ServiceImpl<SysColumnMapper, SysColumn |
|
|
|
return R.success(TreeStructureUtils.forMethod(getsTheSubColumn)); |
|
|
|
return R.success(TreeStructureUtils.forMethod(getsTheSubColumn)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public R queryArticlesByColumnType(String ids, Integer id) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Integer count = 0; |
|
|
|
|
|
|
|
for (String columnId : ids.split(",")) { |
|
|
|
|
|
|
|
++count; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<SysColumn> queryByColumnType = baseMapper.queryByColumnType(ids); |
|
|
|
|
|
|
|
//为1表示该层级下以及它本身列表样式模板一直则查询全部的
|
|
|
|
|
|
|
|
if (count > 1) { |
|
|
|
|
|
|
|
if (queryByColumnType.size() == 1) { |
|
|
|
|
|
|
|
return R.success(contentMapper.columnConditionsFilterArticles(ids)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
//表示该层级下的全部层级不一致只查本身
|
|
|
|
|
|
|
|
return R.success(contentMapper.columnConditionsFilterArticles(id + "")); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|