From f874243c8f0d3c3a530f4a436b66d2f1fad95739 Mon Sep 17 00:00:00 2001 From: wangxinglong <2371974647@qq.com> Date: Wed, 22 Dec 2021 10:20:55 +0800 Subject: [PATCH] sesttter --- app/controller/api/Coupon.php | 2 +- app/repository/CommentRepository.php | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app/controller/api/Coupon.php b/app/controller/api/Coupon.php index 85dc9a0..a5d72fc 100644 --- a/app/controller/api/Coupon.php +++ b/app/controller/api/Coupon.php @@ -115,7 +115,7 @@ class Coupon extends Base $endTime = strtotime($item->endTime); $ExpirationTime = abs(($endTime - $time) / 86400); if (($endTime > $time) ) { - $expirationStr = "还有".ceil($ExpirationTime)."天过期期"; + $expirationStr = "还有".ceil($ExpirationTime)."天过期"; } else { $expirationStr = "已过期" . ceil($ExpirationTime) . "天"; } diff --git a/app/repository/CommentRepository.php b/app/repository/CommentRepository.php index af4e382..8792e48 100644 --- a/app/repository/CommentRepository.php +++ b/app/repository/CommentRepository.php @@ -31,7 +31,14 @@ class CommentRepository extends Repository return CommentModel::alias("a") ->join("account b" ,"a.user_code = b.user_code") ->where($whereMap) - ->whereTime("b.blank_time","<",date("Y-m-d H:i:s")) + ->whereOr( + [ + ["b.blank_time","=","null"], + ["b.blank_time","=",""], + ["b.blank_time","<",date("Y-m-d H:i:s")], + ] + + ) ->field([ "a.comment", "a.user_code as userCode",