|
|
|
@ -177,7 +177,9 @@ class AdminAgentTeam extends BaseController |
|
|
|
'password|密码' => 'min:6|max:20', |
|
|
|
'rebate_ratio|返点占比' => 'float' |
|
|
|
])->check($param); |
|
|
|
if (empty($param['password']) && strlen($param['rebate_ratio']) <= 0) { |
|
|
|
$password = $param['password'] ?? ''; |
|
|
|
$rebate_ratio = $param['rebate_ratio'] ?? ''; |
|
|
|
if (empty($password) && strlen($rebate_ratio) <= 0) { |
|
|
|
throw new ValidateException('请填写修改的密码或返点占比'); |
|
|
|
} |
|
|
|
|
|
|
|
@ -185,7 +187,7 @@ class AdminAgentTeam extends BaseController |
|
|
|
$connection->startTrans(); |
|
|
|
|
|
|
|
# 保存密码 |
|
|
|
if (!empty($param['password'])) { |
|
|
|
if (!empty($password)) { |
|
|
|
|
|
|
|
$param['user_id'] = $param['aid']; |
|
|
|
|
|
|
|
@ -198,7 +200,7 @@ class AdminAgentTeam extends BaseController |
|
|
|
Event::trigger(AgentPasswordChange::class,$event); |
|
|
|
} |
|
|
|
# 保存返点占比 |
|
|
|
if (strlen($param['rebate_ratio']) > 0) { |
|
|
|
if (strlen($rebate_ratio) > 0) { |
|
|
|
$rebate_ratio = $param['rebate_ratio'] ?? 0; |
|
|
|
AgentInfo::updateRebateRatio($param['aid'],$rebate_ratio); |
|
|
|
} |
|
|
|
|