Commit 22207889 authored by hujun's avatar hujun

order_id

parent 9cd64933
......@@ -16,6 +16,7 @@ use app\model\AAgents;
use app\model\AppointWatchShop;
use app\model\GHouses;
use app\model\FollowUp;
use app\model\OrderModel;
use think\Request;
class AppointmentShop extends Basic
......@@ -151,9 +152,11 @@ class AppointmentShop extends Basic
$data['msg'] = '报备成功并通知经纪人';
$appoint_watch->commit(); //提交事务
$m_order = new OrderModel();
$order_id = $m_order->getFieldValue('id', ['f_id'=>$is_ok]);
$push = new PushMessageService();
$push->pushReportMessage($appoint_data["house_id"], $agent_id, 1, $this->agentId);
return $this->response("200", $data['msg'], ['user_id'=>$appoint_data["user_id"], 'order_id'=>$is_ok]);
return $this->response("200", $data['msg'], ['user_id'=>$appoint_data["user_id"], 'order_id'=>$order_id]);
} else {
$appoint_watch->rollback(); //回滚事务
return $this->response("101", "save exception");
......
......@@ -271,4 +271,13 @@ class OrderModel extends Model
//dump($this->getLastSql());
return $result;
}
/**
* @param $field
* @param $where
* @return mixed
*/
public function getFieldValue($field, $where) {
return $this->db_->where($where)->value($field);
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment