|
@@ -8,6 +8,7 @@ import com.eitc.common.core.domain.AjaxResult;
|
8
|
8
|
import com.eitc.common.enums.BusinessType;
|
9
|
9
|
import com.eitc.common.utils.StringUtils;
|
10
|
10
|
import com.eitc.patient.domain.NoticeManage;
|
|
11
|
+import com.eitc.patient.enums.NoticeManagePublishStatusEnum;
|
11
|
12
|
import com.eitc.patient.service.INoticeManageService;
|
12
|
13
|
import io.swagger.annotations.Api;
|
13
|
14
|
import io.swagger.annotations.ApiOperation;
|
|
@@ -84,7 +85,7 @@ public class NoticeManageController extends BaseController {
|
84
|
85
|
if (Objects.isNull(noticeManage)) {
|
85
|
86
|
return AjaxResult.error("公告不存在");
|
86
|
87
|
}
|
87
|
|
- if (Objects.equals(noticeManage.getPublishStatus(), 1)) {
|
|
88
|
+ if (Objects.equals(noticeManage.getPublishStatus(), NoticeManagePublishStatusEnum.PUBLISH.getCode())) {
|
88
|
89
|
return AjaxResult.error("请先撤回");
|
89
|
90
|
}
|
90
|
91
|
noticeManage.setDisplayStatus(noticeManageService.checkDisplayStatus(noticeManage));
|
|
@@ -103,7 +104,7 @@ public class NoticeManageController extends BaseController {
|
103
|
104
|
return AjaxResult.error("公告不存在");
|
104
|
105
|
}
|
105
|
106
|
NoticeManage notice = new NoticeManage();
|
106
|
|
- notice.setPublishStatus(0);
|
|
107
|
+ notice.setPublishStatus(NoticeManagePublishStatusEnum.NO_PUBLISH.getCode());
|
107
|
108
|
notice.setId(entry.getId());
|
108
|
109
|
return toAjax(noticeManageService.updateById(notice));
|
109
|
110
|
}
|
|
@@ -119,7 +120,7 @@ public class NoticeManageController extends BaseController {
|
119
|
120
|
if (Objects.isNull(noticeManage)) {
|
120
|
121
|
return AjaxResult.error("公告不存在");
|
121
|
122
|
}
|
122
|
|
- if (Objects.equals(noticeManage.getPublishStatus(), 1)) {
|
|
123
|
+ if (Objects.equals(noticeManage.getPublishStatus(), NoticeManagePublishStatusEnum.PUBLISH.getCode())) {
|
123
|
124
|
return AjaxResult.error("请先撤回");
|
124
|
125
|
}
|
125
|
126
|
return toAjax(noticeManageService.removeById(id));
|