soobin 2 lat temu
rodzic
commit
183b0d4f2e

+ 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,"获取成功");
     }