作者 郭鑫

订单生成

@@ -43,7 +43,7 @@ class OrderController extends CommonController @@ -43,7 +43,7 @@ class OrderController extends CommonController
43 $agency_model = new AgencyModel(); 43 $agency_model = new AgencyModel();
44 $order_model = new OrderModel(); 44 $order_model = new OrderModel();
45 if($data['_type'] == 1 || $data['_type'] == 3) { 45 if($data['_type'] == 1 || $data['_type'] == 3) {
46 - $info = $user_need_model->where(['id'=>$data['need_id'],'user_id'=>$user_id])->find(); 46 + $info = $user_need_model->where(['id'=>$data['need_id']])->find();
47 if(empty($info['status'])) { 47 if(empty($info['status'])) {
48 $this->apiResponse(0,'需求不存在'); 48 $this->apiResponse(0,'需求不存在');
49 } 49 }
@@ -51,7 +51,7 @@ class OrderController extends CommonController @@ -51,7 +51,7 @@ class OrderController extends CommonController
51 $money = $info['pay_money']; 51 $money = $info['pay_money'];
52 } 52 }
53 if($data['_type'] == 2) { 53 if($data['_type'] == 2) {
54 - $info = $agency_model->where(['need_id'=>$data['need_id'],'agency_id'=>$user_id])->find(); 54 + $info = $agency_model->where(['need_id'=>$data['need_id']])->find();
55 $need = $user_need_model->where(['id'=>$info['need_id']])->find(); 55 $need = $user_need_model->where(['id'=>$info['need_id']])->find();
56 if($need['status'] != 3) { 56 if($need['status'] != 3) {
57 $this->apiResponse(0,'该需求当前状态无法进行报价'); 57 $this->apiResponse(0,'该需求当前状态无法进行报价');