作者 郭鑫

订单生成

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