正在显示
1 个修改的文件
包含
12 行增加
和
2 行删除
| @@ -240,6 +240,9 @@ class Wechat extends Api | @@ -240,6 +240,9 @@ class Wechat extends Api | ||
| 240 | $my_user_id = $this->auth->id; | 240 | $my_user_id = $this->auth->id; |
| 241 | if(empty($my_user_id)){return $this->error('用户信息错误');} | 241 | if(empty($my_user_id)){return $this->error('用户信息错误');} |
| 242 | if(empty($param['store_id'])){return $this->error('门店信息错误');} | 242 | if(empty($param['store_id'])){return $this->error('门店信息错误');} |
| 243 | + if($my_user_id == $param['share_id']){ | ||
| 244 | + return $this->error('自行点击不记录'); | ||
| 245 | + } | ||
| 243 | //记录门店浏览统计 | 246 | //记录门店浏览统计 |
| 244 | $this->store_record($param['store_id'],$my_user_id); | 247 | $this->store_record($param['store_id'],$my_user_id); |
| 245 | 248 | ||
| @@ -472,16 +475,23 @@ class Wechat extends Api | @@ -472,16 +475,23 @@ class Wechat extends Api | ||
| 472 | $w1['user_id'] = $pid; | 475 | $w1['user_id'] = $pid; |
| 473 | // $w1['verification_store_id'] = $verification_store_id; | 476 | // $w1['verification_store_id'] = $verification_store_id; |
| 474 | $role = Db::name('verification_staff')->where($w1)->find(); | 477 | $role = Db::name('verification_staff')->where($w1)->find(); |
| 475 | - if(in_array($role['type'],['1','3','0'])){ | 478 | + if(!empty($role) && in_array($role['type'],['1','3','0'])){ |
| 476 | //属于代理 发送红包 | 479 | //属于代理 发送红包 |
| 477 | $this->grant_red_packets($pid,$order_id); | 480 | $this->grant_red_packets($pid,$order_id); |
| 478 | }else{ | 481 | }else{ |
| 479 | //属于普通用户 则领取礼品券 | 482 | //属于普通用户 则领取礼品券 |
| 480 | //$this->send_gift_certificate($pid,$verification_coupon_ids,$order_id,$time); | 483 | //$this->send_gift_certificate($pid,$verification_coupon_ids,$order_id,$time); |
| 481 | //卡券发放规则 | 484 | //卡券发放规则 |
| 482 | - $this->send_gift_certificate_url($pid,$verification_coupon_ids,$order_id,$time); | 485 | + $this->send_gift_certificate_url($pid,$order_id,$time); |
| 483 | } | 486 | } |
| 484 | } | 487 | } |
| 488 | + /** | ||
| 489 | + * | ||
| 490 | + * truncate `cv_user`; | ||
| 491 | +truncate `cv_user_token`; | ||
| 492 | +truncate cv_verification_order; | ||
| 493 | +truncate cv_verification_receive; | ||
| 494 | + */ | ||
| 485 | 495 | ||
| 486 | //发放 对应活动的礼品券 | 496 | //发放 对应活动的礼品券 |
| 487 | public function send_gift_certificate_url($pid,$order_id,$time){ | 497 | public function send_gift_certificate_url($pid,$order_id,$time){ |
-
请 注册 或 登录 后发表评论