Browse Source

不限制返点多少71

master
wanghongjun 3 years ago
parent
commit
f2472e0281
  1. 4
      app/controller/AdminAgentTeam.php

4
app/controller/AdminAgentTeam.php

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

Loading…
Cancel
Save