作者 郭文星
... ... @@ -283,7 +283,7 @@ class Client extends Base
//每个微信用户只能购买一次一个活动
$count = Db::name('verification_order')->where(['user_id'=>$this->auth->id,'type'=>['<>','0']])->count();
if($count >=1){
$this->error("该活动仅限购买1次!");
//$this->error("该活动仅限购买1次!");
}
$phone=$this->postParam['phone'];
$name=$this->postParam['name'];
... ...
... ... @@ -497,10 +497,6 @@ truncate cv_verification_receive;
public function send_gift_certificate_url($pid,$order_id,$time){
$order_info = Db::name('verification_order')->where(['id'=>$order_id])->find();
$store = Db::name('verification_store')->where(['id'=>$order_info['verification_store_id']])->find();
//判断当前父级的所有下级的订单数,是否满足 send_rule_limit 的规则
$subIds = Db::name('user')->where(['pid'=>$pid])->column('id');
$subOrderCount = Db::name('verification_order')->where(['user_id'=>['in',$subIds],'type'=>['>','0']])->count();
... ... @@ -513,7 +509,7 @@ truncate cv_verification_receive;
if(!empty($coupon)){
//发送给pid用户
$save = [];
$save['verification_coupon_id'] = $store['verification_coupon_id'];
$save['verification_coupon_id'] = $coupon['id'];
$save['verification_store_id'] = $store['id'];
$save['user_id'] = $pid;
... ...