Commit 37bf2a1d authored by hujun's avatar hujun

修改记录盘方判断

parent 98cd926d
...@@ -62,6 +62,7 @@ class Client extends Basic ...@@ -62,6 +62,7 @@ class Client extends Basic
//编辑 //编辑
$data['start'] = $this->user->edit($this->params, $this->params['id']); $data['start'] = $this->user->edit($this->params, $this->params['id']);
if (!empty($this->params['agents_id'])) {
//是否修改客方 //是否修改客方
if ($this->params['agents_id'] != $user_agent_id['agent_id']) { if ($this->params['agents_id'] != $user_agent_id['agent_id']) {
$agent = new AAgents(); $agent = new AAgents();
...@@ -74,13 +75,14 @@ class Client extends Basic ...@@ -74,13 +75,14 @@ class Client extends Basic
$push->pushMessageById($user_agent_id['agent_id'], '客方修改', $content, 'user_info', $user_agent_id['id']); $push->pushMessageById($user_agent_id['agent_id'], '客方修改', $content, 'user_info', $user_agent_id['id']);
$this->operating_records($this->params['ccr_id'], $type=3, $remark,0,$this->params['id']); $this->operating_records($this->params['ccr_id'], $type=3, $remark,0,$this->params['id']);
} }
}
} else { } else {
$table = new AAgents(); $table = new AAgents();
//添加 //添加
$data['start'] = $this->user->edit($this->params); $data['start'] = $this->user->edit($this->params);
if ($data['start'] > 0) { if ($data['start'] > 0 && !empty($this->params['agents_id'])) {
$data['id']= $this->user->id; $data['id']= $this->user->id;
$agent_data = $table->getAgentInfo('name,phone',$this->params['agents_id']); $agent_data = $table->getAgentInfo('name,phone',$this->params['agents_id']);
$remark = '新增为'. $agent_data['name'].'-'.$agent_data['phone']; $remark = '新增为'. $agent_data['name'].'-'.$agent_data['phone'];
......
...@@ -362,11 +362,14 @@ class Member extends Basic{ ...@@ -362,11 +362,14 @@ class Member extends Basic{
$agent_data = $agent->getAgentInfo('name,phone', $this->params['agents_id']); $agent_data = $agent->getAgentInfo('name,phone', $this->params['agents_id']);
$remark = '新增为' . $agent_data['name'] . '-' . $agent_data['phone']; $remark = '新增为' . $agent_data['name'] . '-' . $agent_data['phone'];
$result = $this->user->edit($this->params, $this->params['id']); //新增或编辑 $result = $this->user->edit($this->params, $this->params['id']); //新增或编辑
$this->operating_records($this->userId, $type=3, $remark, $this->params['id']); //记录日志
} else { } else {
$user_data = $this->user->getUserById('id,agent_id', $this->params['id']); $user_data = $this->user->getUserById('id,agent_id', $this->params['id']);
if (empty($user_data)) { if (empty($user_data)) {
return $this->response(101, '没有用户信息'); return $this->response(101, '没有用户信息');
} else { } else {
if (!empty($this->params['agents_id'])) {
//是否修改客方 //是否修改客方
if ($this->params['agents_id'] != $user_data['agent_id']) { if ($this->params['agents_id'] != $user_data['agent_id']) {
$agent = new AAgents(); $agent = new AAgents();
...@@ -376,6 +379,8 @@ class Member extends Basic{ ...@@ -376,6 +379,8 @@ class Member extends Basic{
$remark = '用户编辑'; $remark = '用户编辑';
} }
$result = $this->user->edit($this->params, $this->params['id']); //新增或编辑 $result = $this->user->edit($this->params, $this->params['id']); //新增或编辑
$this->operating_records($this->userId, $type=3, $remark, $this->params['id']); //记录日志
}
} }
} }
...@@ -390,8 +395,6 @@ class Member extends Basic{ ...@@ -390,8 +395,6 @@ class Member extends Basic{
$this->code = 101; $this->code = 101;
$this->msg = '没有新增VIP权限';break; $this->msg = '没有新增VIP权限';break;
} }
$this->operating_records($this->userId, $type=3, $remark, $this->params['id']);
} else { } else {
//编辑获取用户信息 //编辑获取用户信息
......
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