|
@@ -497,10 +497,6 @@ truncate cv_verification_receive; |
|
@@ -497,10 +497,6 @@ truncate cv_verification_receive; |
497
|
public function send_gift_certificate_url($pid,$order_id,$time){
|
497
|
public function send_gift_certificate_url($pid,$order_id,$time){
|
498
|
$order_info = Db::name('verification_order')->where(['id'=>$order_id])->find();
|
498
|
$order_info = Db::name('verification_order')->where(['id'=>$order_id])->find();
|
499
|
$store = Db::name('verification_store')->where(['id'=>$order_info['verification_store_id']])->find();
|
499
|
$store = Db::name('verification_store')->where(['id'=>$order_info['verification_store_id']])->find();
|
500
|
-
|
|
|
501
|
-
|
|
|
502
|
-
|
|
|
503
|
-
|
|
|
504
|
//判断当前父级的所有下级的订单数,是否满足 send_rule_limit 的规则
|
500
|
//判断当前父级的所有下级的订单数,是否满足 send_rule_limit 的规则
|
505
|
$subIds = Db::name('user')->where(['pid'=>$pid])->column('id');
|
501
|
$subIds = Db::name('user')->where(['pid'=>$pid])->column('id');
|
506
|
$subOrderCount = Db::name('verification_order')->where(['user_id'=>['in',$subIds],'type'=>['>','0']])->count();
|
502
|
$subOrderCount = Db::name('verification_order')->where(['user_id'=>['in',$subIds],'type'=>['>','0']])->count();
|
|
@@ -513,7 +509,7 @@ truncate cv_verification_receive; |
|
@@ -513,7 +509,7 @@ truncate cv_verification_receive; |
513
|
if(!empty($coupon)){
|
509
|
if(!empty($coupon)){
|
514
|
//发送给pid用户
|
510
|
//发送给pid用户
|
515
|
$save = [];
|
511
|
$save = [];
|
516
|
- $save['verification_coupon_id'] = $store['verification_coupon_id'];
|
512
|
+ $save['verification_coupon_id'] = $coupon['id'];
|
517
|
$save['verification_store_id'] = $store['id'];
|
513
|
$save['verification_store_id'] = $store['id'];
|
518
|
$save['user_id'] = $pid;
|
514
|
$save['user_id'] = $pid;
|
519
|
|
515
|
|