Commit 213a208f authored by hujun's avatar hujun

部门

parent c850ed99
......@@ -275,6 +275,9 @@ class PushMessageService
$data['house_id'] = $house_id;
$result = $m_push->addAgentIdArray($agent_id, $operation_id, $type, $data);
break;
case 4 :
$result = $m_push->addAgentIdArray($agent_id, $operation_id, $type, $data);
break;
default :
$result = $m_push->addData($data, $operation_id, $type);
}
......
......@@ -41,7 +41,7 @@ class District extends Basic
$field = '';
if ($this->params['search'] != NULL) {
$field = 'a.id,a.district_name,a.create_time,b.name,b.phone';
$field = 'a.id,a.district_name,a.create_time,b.name,b.phone,a.site_id';
$where .= "a.status=0 AND (phone like '{$this->params['search']}%' or name like '{$this->params['search']}%')";
$join = 1;
}
......
......@@ -104,7 +104,9 @@ class ADistrict extends BaseModel
*/
public function getDistrictById($id) {
if ($id) {
$data['district_name'] = $this->where('id',$id)->value('district_name');
$district = $this->field('district_name,site_id')->where('id',$id)->find();
$data['district_name'] = $district['district_name'];
$data['city'] = Db::table('a_site')->where('id', $district['site_id'])->value('city');
$agents = Db::table('a_agents')->field('name,phone')
->where([
'status' => 0,
......@@ -161,6 +163,12 @@ class ADistrict extends BaseModel
$result[$k]['store_num'] = '';
}
}
if ($v['site_id']) {
$result[$k]['city'] = Db::table('a_site')->where('id', $v['site_id'])->value('city');
} else {
$result[$k]['city'] = "";
}
}
} else {
$data = $this->field($field)->alias('a')
......@@ -184,6 +192,12 @@ class ADistrict extends BaseModel
$result[$k]['store_num'] = '';
}
}
if ($v['site_id']) {
$result[$k]['city'] = Db::table('a_site')->where('id', $v['site_id'])->value('city');
} else {
$result[$k]['city'] = "";
}
}
}
......
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