Commit 33c77bbc authored by zw's avatar zw

异常捕获

parent fcc83182
......@@ -5,6 +5,7 @@ namespace app\api_broker\controller;
use app\api_broker\extend\Basic;
use app\api_broker\service\ReportService;
use app\model\FollowUpLogModel;
use think\Exception;
/**
* Created by PhpStorm.
......@@ -82,7 +83,7 @@ class Report extends Basic
*/
public function addFollowUp()
{
$params = array(
/* $params = array(
"report_id" => 1,
"agent_id" => 12,
"user_type" =>"1,2", // 用户类型
......@@ -97,9 +98,9 @@ class Report extends Basic
"other_area" =>"1,2",//其他地区
"explain" =>"1,2",//备注
"explain_img" =>"1,2"//备注图
);
);*/
//$params = $this->params;
$params = $this->params;
if (!isset($params['report_id']) || !isset($params['agent_id']) || !isset($params['user_type']) ||
!isset($params['industry_type']) || !isset($params['area_requirement']) || !isset($params['price_requirement'])) {
return $this->response("101", "请求参数错误");
......@@ -138,13 +139,17 @@ class Report extends Basic
if (isset($params["agent_id"])) {
$where_["agent_id"] = $params["agent_id"];
}
try {
$result = $this->fulModel->selectFollowUpList($field_, $where_, $order_);
if (count($result) > 0) {
return $this->response("200", "request success", $result);
} else {
return $this->response("300", "not fund list", []);
}
return $this->response("101", "request error");
} catch (Exception $e) {
return $this->response("101", "request error:" . $e);
}
}
}
\ 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