mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-13 21:32:07 +08:00
禅道#636、#670问题修复
This commit is contained in:
+11
@@ -1,6 +1,7 @@
|
|||||||
package com.cf.imes.module.system.controller.admin.notice;
|
package com.cf.imes.module.system.controller.admin.notice;
|
||||||
|
|
||||||
import cn.hutool.core.lang.Assert;
|
import cn.hutool.core.lang.Assert;
|
||||||
|
import com.cf.imes.framework.common.enums.CommonStatusEnum;
|
||||||
import com.cf.imes.framework.common.enums.UserTypeEnum;
|
import com.cf.imes.framework.common.enums.UserTypeEnum;
|
||||||
import com.cf.imes.framework.common.pojo.CommonResult;
|
import com.cf.imes.framework.common.pojo.CommonResult;
|
||||||
import com.cf.imes.framework.common.pojo.PageResult;
|
import com.cf.imes.framework.common.pojo.PageResult;
|
||||||
@@ -62,11 +63,21 @@ public class NoticeController {
|
|||||||
|
|
||||||
@GetMapping("/page")
|
@GetMapping("/page")
|
||||||
@Operation(summary = "获取通知公告列表")
|
@Operation(summary = "获取通知公告列表")
|
||||||
|
@PreAuthorize("@ss.hasPermission('system:notice:query')")
|
||||||
public CommonResult<PageResult<NoticeRespVO>> getNoticePage(@Validated NoticePageReqVO pageReqVO) {
|
public CommonResult<PageResult<NoticeRespVO>> getNoticePage(@Validated NoticePageReqVO pageReqVO) {
|
||||||
PageResult<NoticeDO> pageResult = noticeService.getNoticePage(pageReqVO);
|
PageResult<NoticeDO> pageResult = noticeService.getNoticePage(pageReqVO);
|
||||||
return success(BeanUtils.toBean(pageResult, NoticeRespVO.class));
|
return success(BeanUtils.toBean(pageResult, NoticeRespVO.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/homepage")
|
||||||
|
@Operation(summary = "获取首页通知公告列表")
|
||||||
|
public CommonResult<PageResult<NoticeRespVO>> getHomePageNoticePage(@Validated NoticePageReqVO pageReqVO) {
|
||||||
|
// 首页只看生效的公告
|
||||||
|
pageReqVO.setStatus(CommonStatusEnum.ENABLE.getStatus());
|
||||||
|
PageResult<NoticeDO> pageResult = noticeService.getNoticePage(pageReqVO);
|
||||||
|
return success(BeanUtils.toBean(pageResult, NoticeRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
@GetMapping("/get")
|
@GetMapping("/get")
|
||||||
@Operation(summary = "获得通知公告")
|
@Operation(summary = "获得通知公告")
|
||||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
|
|||||||
+1
-1
@@ -36,7 +36,7 @@ public interface RoleMapper extends BaseMapperX<RoleDO> {
|
|||||||
.eqIfPresent(RoleDO::getStatus, reqVO.getStatus())
|
.eqIfPresent(RoleDO::getStatus, reqVO.getStatus())
|
||||||
.betweenIfPresent(RoleDO::getCreateTime, reqVO.getCreateTime())
|
.betweenIfPresent(RoleDO::getCreateTime, reqVO.getCreateTime())
|
||||||
.ne(RoleDO::getId, 1)
|
.ne(RoleDO::getId, 1)
|
||||||
.orderByAsc(RoleDO::getId);
|
.orderByAsc(RoleDO::getSort).orderByAsc(RoleDO::getId);
|
||||||
|
|
||||||
return selectPage(reqVO, lambdaQueryWrapperX);
|
return selectPage(reqVO, lambdaQueryWrapperX);
|
||||||
}
|
}
|
||||||
|
|||||||
-5
@@ -54,11 +54,6 @@ public class NoticeServiceImpl implements NoticeService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageResult<NoticeDO> getNoticePage(NoticePageReqVO reqVO) {
|
public PageResult<NoticeDO> getNoticePage(NoticePageReqVO reqVO) {
|
||||||
// 没有显示传入状态默认查有效的
|
|
||||||
Integer status = reqVO.getStatus();
|
|
||||||
if (ObjectUtil.isNull(status)) {
|
|
||||||
reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus());
|
|
||||||
}
|
|
||||||
return noticeMapper.selectPage(reqVO);
|
return noticeMapper.selectPage(reqVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user