Commit 1ffa2d95 authored by zhoujun's avatar zhoujun

bug

parent 0fa9cdfd
Pipeline #2066 passed with stage
in 0 seconds
...@@ -46,7 +46,7 @@ class UserLogin ...@@ -46,7 +46,7 @@ class UserLogin
$user->save(); $user->save();
$request['userId'] = $user->id; $request['userId'] = $user->id;
$request['user'] = $user->name; $request['user'] = $user->name;
$request['realName'] = $user->real_name; $request['realUserName'] = $user->real_name;
unset($user); unset($user);
return $next($request); return $next($request);
} }
......
...@@ -154,10 +154,28 @@ class WarnService implements IWarnService ...@@ -154,10 +154,28 @@ class WarnService implements IWarnService
throw new Exception(config('msg.common.1003'), 1003); throw new Exception(config('msg.common.1003'), 1003);
} }
/**
* 预警配置添加
* @return araay
* @date 2021/07/31
* @author live
*/
public function getConfigAdd($postData) public function getConfigAdd($postData)
{ {
if($postData['platform'] < 1 || $postData['channel'] < 1) throw new Exception(config('msg.common.1014'), 1014);
$verity = WarnPeopleModel::where('platform', $postData['platform'])->where('channel', $postData['channel'])->where('phone',$postData['phone'])->select('id')->first();
if (!$verity) {
$row = new WarnPeopleModel();
$row->platform = $postData['platform'] ?? 0;
$row->channel = $postData['channel'] ?? 0;
$row->name = $postData['remarkName'] ?? '';
$row->phone = $postData['phone'] ?? '';
$row->op_user = $postData['user'] ?? '';
$row->remark = $postData['remark'] ?? '';
if ($row->save()) return $row->id;
throw new Exception(config('msg.common.1006'), 1006);
}
throw new Exception(config('msg.common.1005'), 1005);
} }
} }
\ No newline at end of file
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