Commit 56e0021e authored by hujun's avatar hujun

district_id as id

parent 83db5e0c
...@@ -29,7 +29,7 @@ class District extends Basic ...@@ -29,7 +29,7 @@ class District extends Basic
$pageSize = empty($this->params['pageSize']) ? 10 : $this->params['pageSize']; $pageSize = empty($this->params['pageSize']) ? 10 : $this->params['pageSize'];
$search = $this->params['search']; $search = $this->params['search'];
$agents = new AAgents(); $agents = new AAgents();
$field = 'district_id as id,name,create_time,phone'; $field = 'district_id,id,name,create_time,phone';
$where = ''; $where = '';
$where .= 'level in (30,40) AND status=0'; $where .= 'level in (30,40) AND status=0';
......
...@@ -180,7 +180,6 @@ public function saveList(){ ...@@ -180,7 +180,6 @@ public function saveList(){
$result = array(); $result = array();
foreach ($data as $k=>$v){ foreach ($data as $k=>$v){
$result[$k] = $v; $result[$k] = $v;
$result[$k]['id'] = $v->district_id;
if (isset($v->district_id)) { if (isset($v->district_id)) {
$district_where['id'] = $v->district_id; $district_where['id'] = $v->district_id;
$result[$k]['district_name'] = Db::table('a_district')->where($district_where)->value('district_name'); $result[$k]['district_name'] = Db::table('a_district')->where($district_where)->value('district_name');
......
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