Commit e4a93755 authored by hujun's avatar hujun

新增客户验证操作人

parent 44fbb2a0
...@@ -60,7 +60,7 @@ class Client extends Basic ...@@ -60,7 +60,7 @@ class Client extends Basic
$user_agent_id = $this->user->getUserById('id,user_name,agent_id', $this->params['id']); //查询原始客方 $user_agent_id = $this->user->getUserById('id,user_name,agent_id', $this->params['id']); //查询原始客方
//编辑 //编辑
$data['start'] = $this->user->edit($this->params, $this->params['id']); $data['start'] = $this->user->edit($this->params, $this->params['id'], $this->agentId);
//是否修改客方 //是否修改客方
if ($this->params['agents_id'] != $user_agent_id['agent_id']) { if ($this->params['agents_id'] != $user_agent_id['agent_id']) {
...@@ -78,7 +78,7 @@ class Client extends Basic ...@@ -78,7 +78,7 @@ class Client extends Basic
$table = new AAgents(); $table = new AAgents();
//添加 //添加
$data['start'] = $this->user->edit($this->params); $data['start'] = $this->user->edit($this->params, 0, $this->agentId);
if ($data['start'] > 0) { if ($data['start'] > 0) {
$data['id']= $this->user->id; $data['id']= $this->user->id;
......
...@@ -343,7 +343,7 @@ class Member extends Basic{ ...@@ -343,7 +343,7 @@ class Member extends Basic{
$agent = new AAgents(); $agent = new AAgents();
$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->userId); //新增或编辑
} 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)) {
...@@ -357,7 +357,7 @@ class Member extends Basic{ ...@@ -357,7 +357,7 @@ class Member extends Basic{
} else { } else {
$remark = '用户编辑'; $remark = '用户编辑';
} }
$result = $this->user->edit($this->params, $this->params['id']); //新增或编辑 $result = $this->user->edit($this->params, $this->params['id'], $this->userId); //新增或编辑
} }
} }
......
...@@ -238,9 +238,10 @@ class Users extends Model ...@@ -238,9 +238,10 @@ class Users extends Model
* *
* @param $data * @param $data
* @param int $id * @param int $id
* @return false|int * @param $operation_id
* @return int|mixed
*/ */
public function edit($data, $id = 0) public function edit($data, $id = 0, $operation_id)
{ {
if (!empty($data['user_name'])) { if (!empty($data['user_name'])) {
$insert_data['user_name'] = $data['user_name']; $insert_data['user_name'] = $data['user_name'];
...@@ -263,7 +264,7 @@ class Users extends Model ...@@ -263,7 +264,7 @@ class Users extends Model
if ($data['vip'] == 1 && $insert_data['agent_id'] != 1) { if ($data['vip'] == 1 && $insert_data['agent_id'] != 1) {
$vip = new VipService(); $vip = new VipService();
if ($vip->vip($insert_data['agent_id'], 'add_vip')) { if ($vip->vip($operation_id, 'add_vip')) {
return -3; return -3;
} }
} }
......
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