正在显示
1 个修改的文件
包含
7 行增加
和
2 行删除
| @@ -24,7 +24,7 @@ class Business extends Base | @@ -24,7 +24,7 @@ class Business extends Base | ||
| 24 | $postParam = $this->request->param(); | 24 | $postParam = $this->request->param(); |
| 25 | $this->postParam = $postParam; | 25 | $this->postParam = $postParam; |
| 26 | parent::_initialize(); | 26 | parent::_initialize(); |
| 27 | - //$this->auth->id=3 ;//测试用 | 27 | + $this->auth->id=3 ;//测试用 |
| 28 | $postParam = $this->request->param(); | 28 | $postParam = $this->request->param(); |
| 29 | $this->postParam = $postParam; | 29 | $this->postParam = $postParam; |
| 30 | if (empty($postParam['store_id'])) { | 30 | if (empty($postParam['store_id'])) { |
| @@ -54,6 +54,8 @@ class Business extends Base | @@ -54,6 +54,8 @@ class Business extends Base | ||
| 54 | public function getstaff(){ | 54 | public function getstaff(){ |
| 55 | $data = $this->staff; | 55 | $data = $this->staff; |
| 56 | $store = Db::name('verification_store')->where(['id'=>$data['verification_store_id']])->find(); | 56 | $store = Db::name('verification_store')->where(['id'=>$data['verification_store_id']])->find(); |
| 57 | + $user=Db::name("user")->find($data['user_id']); | ||
| 58 | + $data['avatar']=$user['avatar']; | ||
| 57 | $data['image'] = !empty($store['image'])?request()->domain().$store['image']:''; | 59 | $data['image'] = !empty($store['image'])?request()->domain().$store['image']:''; |
| 58 | 60 | ||
| 59 | $this->success('获取成功',$data); | 61 | $this->success('获取成功',$data); |
| @@ -97,11 +99,13 @@ class Business extends Base | @@ -97,11 +99,13 @@ class Business extends Base | ||
| 97 | 'verification_receive_id'=>$receive['id'], | 99 | 'verification_receive_id'=>$receive['id'], |
| 98 | 'createtime'=>$time, | 100 | 'createtime'=>$time, |
| 99 | ]; | 101 | ]; |
| 102 | + | ||
| 100 | $cancel=Db::name('verification_cancel')->insertGetId($canceldata); | 103 | $cancel=Db::name('verification_cancel')->insertGetId($canceldata); |
| 101 | //查询本订单是否所有卡卷都已核销 | 104 | //查询本订单是否所有卡卷都已核销 |
| 102 | $receivewhere['verification_order_id']=['=',$receive['verification_order_id']]; | 105 | $receivewhere['verification_order_id']=['=',$receive['verification_order_id']]; |
| 103 | $receivewhere['type']=['=',0]; | 106 | $receivewhere['type']=['=',0]; |
| 104 | - $isuser=Db::name('verification_receive')->where(['verification_order_id','=',$receive['verification_order_id']])->count(); | 107 | + $isuser=Db::name('verification_receive')->where(['verification_order_id'=>$receive['verification_order_id']])->count(); |
| 108 | + | ||
| 105 | if($isuser==0){ | 109 | if($isuser==0){ |
| 106 | $isorderuser['id']=['=',$receive['verification_order_id']]; | 110 | $isorderuser['id']=['=',$receive['verification_order_id']]; |
| 107 | $isuserdata=[ | 111 | $isuserdata=[ |
| @@ -262,6 +266,7 @@ class Business extends Base | @@ -262,6 +266,7 @@ class Business extends Base | ||
| 262 | $where["id"] = ["=", $id]; | 266 | $where["id"] = ["=", $id]; |
| 263 | $where["verification_store_id"] = ["=", $this->store_id]; | 267 | $where["verification_store_id"] = ["=", $this->store_id]; |
| 264 | $receive=Db::name('verification_receive')->where($where)->find(); | 268 | $receive=Db::name('verification_receive')->where($where)->find(); |
| 269 | + | ||
| 265 | if(empty($receive)){ | 270 | if(empty($receive)){ |
| 266 | $this->error('无效卡卷'); | 271 | $this->error('无效卡卷'); |
| 267 | } | 272 | } |
-
请 注册 或 登录 后发表评论