settter
parent
a59ef7fdc0
commit
a3581f2846
|
@ -177,6 +177,7 @@ class Coupon extends Base
|
|||
$whereMap[] = ['consumer_code', '=', $accountCode];
|
||||
$whereMap[] = ['business_code', '=', $businessCode];
|
||||
$whereMap[] = ['is_verificated', '=', CouponModel::is_verificated_off];
|
||||
$whereMap[] = ['end_time', '> TIME', date("Y-m-d H:i:s")];
|
||||
$sortOrder = ['sort_weight' => 'desc', 'end_time' => 'asc'];
|
||||
|
||||
$res = CouponRepository::getInstance()->findList($whereMap, $fields, $page, $size,function ($q){
|
||||
|
@ -689,6 +690,7 @@ class Coupon extends Base
|
|||
try {
|
||||
$couponMain->save($couponMainData);
|
||||
$couponMain->usingRule->save($usingRule);
|
||||
CouponRepository::getInstance()->getModel()->where("coupon_id",$couponMain->id)->update(["end_time"=>$couponMainData["end_time"]." 00:00:00"]);
|
||||
Db::commit();
|
||||
return $this->json();
|
||||
} catch (RepositoryException $e) {
|
||||
|
|
|
@ -344,6 +344,7 @@ class Coupon extends Base
|
|||
try {
|
||||
$couponMain->save($data);
|
||||
$couponMain->usingRule->save($usingRule);
|
||||
CouponRepository::getInstance()->getModel()->where("coupon_id",$couponMain->id)->update(["end_time"=>$data["end_time"]." 00:00:00"]);
|
||||
Db::commit();
|
||||
return $this->json();
|
||||
} catch (RepositoryException $e) {
|
||||
|
|
|
@ -34,7 +34,8 @@ class CommentRepository extends Repository
|
|||
->where(function ($q){
|
||||
$q->whereOr(
|
||||
[
|
||||
["b.blank_time","=","null"],
|
||||
// ["b.blank_time","=","null"],
|
||||
["b.blank_time","=",null],
|
||||
["b.blank_time","=",""],
|
||||
["b.blank_time","<",date("Y-m-d H:i:s")],
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue