Commit 5bc8494f authored by zw's avatar zw

进场图片

parent d5594252
......@@ -10,6 +10,7 @@ use app\api_broker\service\VerifyRepetitionService;
use app\extra\RedisExt;
use app\model\AAgents;
use app\model\OBargainModel;
use app\model\OImg;
use app\model\OMarchInModel;
use app\model\OrderModel;
use app\model\ORefundModel;
......@@ -80,6 +81,54 @@ class OrderLog extends Basic
}
}
/**
* @return \think\Response
* @throws Exception
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public function marchInV2()
{
$params = $this->params;
if (!isset($params["march_in_area"]) || !isset($params["report_id"]) || !isset($params["reception_id"])
|| !isset($params["reception_name"]) || !isset($params["order_id"]) || !isset($params["order_no"])) {
return $this->response("101", "请求参数错误");
}
/* $params = array(
"reception_id" => 10010,//带看经纪人id
"reception_name" => 1,//带看经纪人id
"report_id" => 1,//报备id
"order_id" => 1, //关联order表id
"order_no" => "123123123123123", //订单no
"march_in_remark" => "有意向购买", //进场备注
"march_in_img" => "123123", //备注图片
"march_in_area" => "上海市虹口区中山公园", //进场地址
);*/
// $params["reception_id"] = $this->agentName;
$march_in_img = isset($params["march_in_img"]) ? json_decode($params["march_in_img"] ,true): "";
$is_execute = $this->verifyService_->verifyStart(1, $params["reception_id"], $params["order_id"]);
if (!$is_execute) {
return $this->response("101", "请不要重复提交");
}
unset($params["march_in_img"]);
$insert_id = $this->o_march_in_model->addMarchIn($params);
if ($insert_id > 0) {
$oImgModel = new OImg();
$oImgModel->addImgAll($insert_id, 1, $march_in_img);
$pushMarchIn = new PushMessageService();
$pushMarchIn->pushMarchInMessage($params["report_id"], 1, $params["report_id"]); //推送
return $this->response("200", "request success", []);
} else {
return $this->response("101", "request faild");
}
}
/**
......
......@@ -526,6 +526,7 @@ Route::group('broker', [
'addFollowUp' => ['api_broker/Report/addFollowUp', ['method' => 'get|post']], //新增跟进
'getFollowUpList' => ['api_broker/Report/getFollowUpList', ['method' => 'get|post']],
'marchIn' => ['api_broker/OrderLog/marchIn', ['method' => 'get|post']],
'marchInV2' => ['api_broker/OrderLog/marchInV2', ['method' => 'get|post']],
'getBeforeBillInfo' => ['api_broker/OrderLog/getBeforeBillInfo', ['method' => 'get|post']],
'savePosBillMessage' => ['api_broker/OrderLog/savePosBillMessage', ['method' => 'get|post']],
'collectingBill' => ['api_broker/OrderLog/collectingBill', ['method' => 'get|post']],
......
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