浏览代码

出售求购

afa 7 月之前
父节点
当前提交
9dcac9fc2e
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      application/api/controller/Market.php

+ 1 - 1
application/api/controller/Market.php

@@ -151,7 +151,7 @@ class Market extends Api
         if(!$validate->scene('sellbuying')->check($params)) $this->error($validate->getError());
         if(!$validate->scene('sellbuying')->check($params)) $this->error($validate->getError());
         $buying = $productBuying::get($params['buying_id']);
         $buying = $productBuying::get($params['buying_id']);
         if(empty($buying)) $this->error('订单不存在');
         if(empty($buying)) $this->error('订单不存在');
-        if($buying->user_id!= $this->auth->id) $this->error('无权操作');
+        if($buying->user_id == $this->auth->id) $this->error('无权操作');
         if($buying->status != ProductBuying::Normal) $this->error('订单已完成');
         if($buying->status != ProductBuying::Normal) $this->error('订单已完成');
       
       
         // 启动事务
         // 启动事务