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