'拆分活动的校验权限,分为发券和核券。'
This commit is contained in:
@@ -16,14 +16,12 @@ class User extends Authenticatable
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $guarded = [];
|
||||
|
||||
/**
|
||||
* The attributes that should be hidden for arrays.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $hidden = [
|
||||
@@ -91,7 +89,7 @@ class User extends Authenticatable
|
||||
/**
|
||||
* Notes: 密码加密
|
||||
* @Author: <C.Jason>
|
||||
* @Date: 2019/9/6 11:37
|
||||
* @Date : 2019/9/6 11:37
|
||||
* @param $password
|
||||
*/
|
||||
protected function setPasswordAttribute($password)
|
||||
@@ -129,12 +127,12 @@ class User extends Authenticatable
|
||||
public function getCouponCount($type, $date = '')
|
||||
{
|
||||
return $this->coupons()
|
||||
->whereIn('status', [2])
|
||||
->where('thirdPartyGoodsId', $type)
|
||||
->when($date, function ($q) {
|
||||
$q->whereDate('created_at', now()->format('Y-m-d'));
|
||||
})
|
||||
->count();
|
||||
->whereIn('status', [2])
|
||||
->where('thirdPartyGoodsId', $type)
|
||||
->when($date, function ($q) {
|
||||
$q->whereDate('created_at', now()->format('Y-m-d'));
|
||||
})
|
||||
->count();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user