master
wangxinglong 2021-12-22 10:20:55 +08:00
parent 46010e4ac2
commit f874243c8f
2 changed files with 9 additions and 2 deletions

View File

@ -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) . "";
}

View File

@ -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",