sesttter
parent
46010e4ac2
commit
f874243c8f
|
@ -115,7 +115,7 @@ class Coupon extends Base
|
||||||
$endTime = strtotime($item->endTime);
|
$endTime = strtotime($item->endTime);
|
||||||
$ExpirationTime = abs(($endTime - $time) / 86400);
|
$ExpirationTime = abs(($endTime - $time) / 86400);
|
||||||
if (($endTime > $time) ) {
|
if (($endTime > $time) ) {
|
||||||
$expirationStr = "还有".ceil($ExpirationTime)."天过期期";
|
$expirationStr = "还有".ceil($ExpirationTime)."天过期";
|
||||||
} else {
|
} else {
|
||||||
$expirationStr = "已过期" . ceil($ExpirationTime) . "天";
|
$expirationStr = "已过期" . ceil($ExpirationTime) . "天";
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,14 @@ class CommentRepository extends Repository
|
||||||
return CommentModel::alias("a")
|
return CommentModel::alias("a")
|
||||||
->join("account b" ,"a.user_code = b.user_code")
|
->join("account b" ,"a.user_code = b.user_code")
|
||||||
->where($whereMap)
|
->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([
|
->field([
|
||||||
"a.comment",
|
"a.comment",
|
||||||
"a.user_code as userCode",
|
"a.user_code as userCode",
|
||||||
|
|
Loading…
Reference in New Issue