作者 郭文星

'132'

... ... @@ -24,7 +24,7 @@ class Business extends Base
$postParam = $this->request->param();
$this->postParam = $postParam;
parent::_initialize();
//$this->auth->id=3 ;//测试用
$this->auth->id=3 ;//测试用
$postParam = $this->request->param();
$this->postParam = $postParam;
if (empty($postParam['store_id'])) {
... ... @@ -54,6 +54,8 @@ class Business extends Base
public function getstaff(){
$data = $this->staff;
$store = Db::name('verification_store')->where(['id'=>$data['verification_store_id']])->find();
$user=Db::name("user")->find($data['user_id']);
$data['avatar']=$user['avatar'];
$data['image'] = !empty($store['image'])?request()->domain().$store['image']:'';
$this->success('获取成功',$data);
... ... @@ -97,11 +99,13 @@ class Business extends Base
'verification_receive_id'=>$receive['id'],
'createtime'=>$time,
];
$cancel=Db::name('verification_cancel')->insertGetId($canceldata);
//查询本订单是否所有卡卷都已核销
$receivewhere['verification_order_id']=['=',$receive['verification_order_id']];
$receivewhere['type']=['=',0];
$isuser=Db::name('verification_receive')->where(['verification_order_id','=',$receive['verification_order_id']])->count();
$isuser=Db::name('verification_receive')->where(['verification_order_id'=>$receive['verification_order_id']])->count();
if($isuser==0){
$isorderuser['id']=['=',$receive['verification_order_id']];
$isuserdata=[
... ... @@ -262,6 +266,7 @@ class Business extends Base
$where["id"] = ["=", $id];
$where["verification_store_id"] = ["=", $this->store_id];
$receive=Db::name('verification_receive')->where($where)->find();
if(empty($receive)){
$this->error('无效卡卷');
}
... ...