Commit 5420132c authored by hujun's avatar hujun

门店更换部门同步修改经纪人

parent c143767d
...@@ -39,16 +39,19 @@ class AStore extends BaseModel ...@@ -39,16 +39,19 @@ class AStore extends BaseModel
$store_data['site_id'] = $data['site_id']; $store_data['site_id'] = $data['site_id'];
$store_data['code'] = implode('##',$code_arr); $store_data['code'] = implode('##',$code_arr);
$agents = new AAgents();
if ($data['id'] == '') { if ($data['id'] == '') {
$store_data['create_time'] = date('Y-m-d H:i:s'); $store_data['create_time'] = date('Y-m-d H:i:s');
$this->save($store_data); $this->save($store_data);
$result_id = $this->id; $result_id = $this->id;
} else { } else {
$this->save($store_data, ['id'=>$data['id']]); $this->save($store_data, ['id'=>$data['id']]);
$agents->editData(['district_id'=>$data['district_id']], $data['id'],'store_id');
$result_id = $data['id']; $result_id = $data['id'];
} }
$agents = new AAgents();
$agents_info = $agents->where([ $agents_info = $agents->where([
'store_id'=>$data['id'], 'level'=>['in','20,40'] 'store_id'=>$data['id'], 'level'=>['in','20,40']
])->column('id,level'); ])->column('id,level');
......
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