Commit e62ef728 authored by zw's avatar zw

Merge remote-tracking branch 'origin/1210-v3.0.2' into 1210-v3.0.2

parents e968778e e6c08c4b
......@@ -900,9 +900,6 @@ class Broker extends Basic
/**
* 添加黑名单
* User: 朱伟
* Date: 2018年12月12日
* Time: 11:28:01
*/
public function addAgentsBlackList(){
$params = $this->params;
......@@ -960,9 +957,6 @@ class Broker extends Basic
/**
* 黑名单列表
* User: 朱伟
* Date: 2018年12月12日
* Time: 15:35:40
*/
public function getAgentsBlackList()
{
......@@ -999,6 +993,38 @@ class Broker extends Basic
return $this->response("200", "成功",$data);
}
/**
* 黑名单详情
*/
public function getBlackListInfo(){
$params = $this->params;
// $params = array(
// "agents_black_list_id" => 6
// );
if (!isset($params["agents_black_list_id"])) {
return $this->response("101", "请求参数错误");
}
$m_agents_black_list = new AAgentsBlackList();
$m_agents_black_list_img = new AAgentsBlackListImg();
$field = 'agents_id,content';
$res = $m_agents_black_list->getDataById($params["agents_black_list_id"],$field);
$field = 'file_name';
$get_params['status'] = 0;
$get_params['father_id'] = $params["agents_black_list_id"];
$get_data_res = $m_agents_black_list_img->getDatas($field, $get_params);
$res['img_list']=$get_data_res;
if ($res) {
return $this->response("200", "成功",$res);
} else {
return $this->response("101", "失败");
}
}
}
\ No newline at end of file
......@@ -75,6 +75,14 @@ class AAgentsBlackList extends Model
}
public function getDataById($id,$field)
{
$result = Db::table($this->table)->field($field)->where('id',$id)->find();
//dump($this->getLastSql());
return $result;
}
......
......@@ -379,6 +379,7 @@ Route::group('index', [
'addAgentsBlackList' => [ 'index/broker/addAgentsBlackList', [ 'method' => 'GET|POST' ] ],//添加黑名单
'getAgentsBlackList' => [ 'index/broker/getAgentsBlackList', [ 'method' => 'GET|POST' ] ],//黑名单列表
'getBlackListInfo' => [ 'index/broker/getBlackListInfo', [ '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