Merge remote-tracking branch 'origin/master'

master
cheney 2 years ago
commit 202b9d7846
  1. 13
      src/main/java/com/huoran/iasf/controller/SysColumnController.java
  2. 2
      src/main/java/com/huoran/iasf/mapper/xml/SysContentMapper.xml
  3. 5
      src/main/java/com/huoran/iasf/service/impl/SysContentServiceImpl.java

@ -159,6 +159,19 @@ public class SysColumnController {
@ApiOperation(value = "栏目排序(依据id更改)", response = SysColumn.class)
public R sortByColumn(@RequestBody List<SortColumnRespVO> sortColumnRespVOList) {
for (SortColumnRespVO sort : sortColumnRespVOList) {
SysColumn column = service.getById(sort.getId());
QueryWrapper<SysColumn> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("column_name", column.getColumnName());
queryWrapper.eq("site_id", column.getSiteId());
queryWrapper.eq("father_id", sort.getFatherId());
queryWrapper.last(" and id <> " + sort.getId());
List<SysColumn> columnList = service.list(queryWrapper);
if (columnList.size() > 0) {
return R.fail("同级下已存在重复栏目:" + column.getColumnName());
}
SysColumn sysColumn = new SysColumn();
BeanUtils.copyProperties(sort, sysColumn);
service.updateById(sysColumn);

@ -135,7 +135,7 @@
</when>
<otherwise>
ORDER BY
t.create_time DESC
t.sequence asc
</otherwise>
</choose>

@ -65,9 +65,10 @@ public class SysContentServiceImpl extends ServiceImpl<SysContentMapper, SysCont
public R articlePaginationList(PageContentReqVO reqVO) {
Page<PageContentRespVO> page = new Page<PageContentRespVO>(reqVO.getPageNum(), reqVO.getPageSize());
/*if (reqVO.getModifiedTimeSort() == null && reqVO.getPublicationTimeSort() == null) {
//没传任何排序参数时候 默认以发布时间排序
if (reqVO.getModifiedTimeSort() == null && reqVO.getPublicationTimeSort() == null && reqVO.getOrdinalSort() == null) {
reqVO.setPublicationTimeSort(0);
}*/
}
/*if (reqVO.getIsDisable()!=null){
if (reqVO.getIsDisable() == 1) {
//是否禁用(0默认,0启用 1禁用)

Loading…
Cancel
Save