Commit 4e049ceb authored by zhuwei's avatar zhuwei

bug

parent 7197a280
...@@ -1092,4 +1092,18 @@ class Broker extends Basic ...@@ -1092,4 +1092,18 @@ class Broker extends Basic
$data['total'] = $res_total; $data['total'] = $res_total;
return $this->response("200", "成功",$data); return $this->response("200", "成功",$data);
} }
public function getAgentDistrictId(){
header('Access-Control-Allow-Origin:*');
$params = $this->params;
if (!isset($params["phone"])) {
return $this->response("101", "请求参数错误");
}
$get_params['a.phone'] = $params['phone'];
$get_params["a.status"] = array("in","0,3");
$get_params['a.level'] = array('in','30,40');
$data = $this->a_agents->getAgentDistrictId("a.id,a.name,a.site_id,b.name", $get_params);
return $this->response("200", "成功",$data);
}
} }
\ No newline at end of file
...@@ -246,7 +246,7 @@ class SquareService ...@@ -246,7 +246,7 @@ class SquareService
} }
public function getCommenInfo($params){ public function getCommenInfo($params){
$field = 'Comment.id,Comment.comment,Comment.create_time';// $field = 'Comment.id,Comment.comment,Comment.create_time,Comment.agent_id';//
$get_params['Comment.id'] = $params['id']; $get_params['Comment.id'] = $params['id'];
$res = $this->m_coment->getCommenInfo($field,$get_params); $res = $this->m_coment->getCommenInfo($field,$get_params);
...@@ -292,7 +292,6 @@ class SquareService ...@@ -292,7 +292,6 @@ class SquareService
$res[$key2]['agent_name_a']=$agent_a['name']; $res[$key2]['agent_name_a']=$agent_a['name'];
$res[$key2]['agent_name_b']=$agent_b['name']; $res[$key2]['agent_name_b']=$agent_b['name'];
} }
} }
return [ 'data' => $res, 'total' => $res_total ]; return [ 'data' => $res, 'total' => $res_total ];
......
...@@ -107,12 +107,8 @@ class Square extends Basic ...@@ -107,12 +107,8 @@ class Square extends Basic
return $this->response("101", "参数不全"); return $this->response("101", "参数不全");
} }
$res= $this->s_square->editSquare($params); $this->s_square->editSquare($params);
if ($res) { return $this->response("200", "成功");
return $this->response("200", "成功");
} else {
return $this->response("101", "失败");
}
} }
......
...@@ -1650,4 +1650,15 @@ class AAgents extends BaseModel ...@@ -1650,4 +1650,15 @@ class AAgents extends BaseModel
->find(); ->find();
} }
public function getAgentDistrictId($field, $params)
{
$result = Db::table($this->table)
->alias('a')
->field($field)
->join('a_site b', 'a.site_id=b.id', 'left')
->where($params)
->select();
return $result;
}
} }
\ No newline at end of file
...@@ -866,6 +866,9 @@ Route::group('broker', [ ...@@ -866,6 +866,9 @@ Route::group('broker', [
'getSquareCommentExtList' => [ 'api_broker/Square/getSquareCommentExtList', [ 'method' => 'GET|POST' ] ], 'getSquareCommentExtList' => [ 'api_broker/Square/getSquareCommentExtList', [ 'method' => 'GET|POST' ] ],
'editCommenSort' => [ 'api_broker/Square/editCommenSort', [ 'method' => 'GET|POST' ] ], 'editCommenSort' => [ 'api_broker/Square/editCommenSort', [ 'method' => 'GET|POST' ] ],
'getAgentDistrictId' => [ 'api_broker/Broker/getAgentDistrictId', [ 'method' => 'GET|POST' ] ],
]); ]);
//Route::miss('api/index/miss');//处理错误的url //Route::miss('api/index/miss');//处理错误的url
\ 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