Commit 0426d9c0 authored by hujun's avatar hujun

Merge branch 'test' into test-0806-bug

# Conflicts: # application/index/controller/Member.php
parents 94132e28 e4a93755
......@@ -60,7 +60,7 @@ class Client extends Basic
$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 (!empty($this->params['agents_id'])) {
//是否修改客方
......@@ -80,7 +80,7 @@ class Client extends Basic
$table = new AAgents();
//添加
$data['start'] = $this->user->edit($this->params);
$data['start'] = $this->user->edit($this->params, 0, $this->agentId);
if ($data['start'] > 0 && !empty($this->params['agents_id'])) {
$data['id']= $this->user->id;
......
......@@ -379,8 +379,7 @@ class Member extends Basic{
$agent = new AAgents();
$agent_data = $agent->getAgentInfo('name,phone', $this->params['agents_id']);
$remark = '新增为' . $agent_data['name'] . '-' . $agent_data['phone'];
$result = $this->user->edit($this->params, $this->params['id']); //新增或编辑
$this->operating_records($this->userId, $type=3, $remark, $this->params['id']); //记录日志
$result = $this->user->edit($this->params, $this->params['id'], $this->userId); //新增或编辑
} else {
$user_data = $this->user->getUserById('id,agent_id', $this->params['id']);
if (empty($user_data)) {
......@@ -399,6 +398,10 @@ class Member extends Basic{
$result = $this->user->edit($this->params, $this->params['id']); //新增或编辑
$this->operating_records($this->userId, $type=3, $remark, $this->params['id']); //记录日志
}
} else {
$remark = '用户编辑';
}
$result = $this->user->edit($this->params, $this->params['id'], $this->userId); //新增或编辑
}
}
......
......@@ -238,9 +238,10 @@ class Users extends Model
*
* @param $data
* @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'])) {
$insert_data['user_name'] = $data['user_name'];
......@@ -263,7 +264,7 @@ class Users extends Model
if ($data['vip'] == 1 && $insert_data['agent_id'] != 1) {
$vip = new VipService();
if ($vip->vip($insert_data['agent_id'], 'add_vip')) {
if ($vip->vip($operation_id, 'add_vip')) {
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