soobin 2 年 前
コミット
183b0d4f2e
1 ファイル変更4 行追加2 行削除
  1. 4 2
      src/main/java/com/szwl/controller/TNoticeController.java

+ 4 - 2
src/main/java/com/szwl/controller/TNoticeController.java

@@ -55,8 +55,10 @@ public class TNoticeController {
         TNotice tNotice = notices.get(0);
         Long noticeId = admin.getNoticeId();
         long time = tNotice.getCreateDate().getTime();
-        if(noticeId > time) {
-            return R.fail(ResponseCodesEnum.A0700,"公告已读");
+        if (noticeId!=null) {
+            if(noticeId > time) {
+                return R.ok(null,"公告已读");
+            }
         }
         return R.ok(tNotice,"获取成功");
     }