|
|
@ -16,6 +16,7 @@ namespace app\common\repositories\store\coupon; |
|
|
|
|
|
|
|
|
|
|
|
use app\common\dao\store\coupon\StoreCouponIssueUserDao; |
|
|
|
use app\common\dao\store\coupon\StoreCouponIssueUserDao; |
|
|
|
use app\common\repositories\BaseRepository; |
|
|
|
use app\common\repositories\BaseRepository; |
|
|
|
|
|
|
|
use app\common\repositories\user\UserRepository; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Class StoreCouponIssueUserRepository |
|
|
|
* Class StoreCouponIssueUserRepository |
|
|
@ -37,8 +38,10 @@ class StoreCouponIssueUserRepository extends BaseRepository |
|
|
|
|
|
|
|
|
|
|
|
public function issue($couponId, $uid) |
|
|
|
public function issue($couponId, $uid) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
$user = app(UserRepository::class)->get($uid); |
|
|
|
return $this->dao->create([ |
|
|
|
return $this->dao->create([ |
|
|
|
'coupon_id' => $couponId, |
|
|
|
'coupon_id' => $couponId, |
|
|
|
|
|
|
|
'phone' => $user['phone'] ?? '', |
|
|
|
'uid' => $uid, |
|
|
|
'uid' => $uid, |
|
|
|
]); |
|
|
|
]); |
|
|
|
} |
|
|
|
} |
|
|
|