Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
clubAdmin
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhoujun
clubAdmin
Commits
1ffa2d95
Commit
1ffa2d95
authored
Jul 31, 2021
by
zhoujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
0fa9cdfd
Pipeline
#2066
passed with stage
in 0 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
3 deletions
+21
-3
app/Http/Middleware/UserLogin.php
app/Http/Middleware/UserLogin.php
+1
-1
app/Services/Warn/WarnService.php
app/Services/Warn/WarnService.php
+20
-2
No files found.
app/Http/Middleware/UserLogin.php
View file @
1ffa2d95
...
@@ -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
[
'real
User
Name'
]
=
$user
->
real_name
;
unset
(
$user
);
unset
(
$user
);
return
$next
(
$request
);
return
$next
(
$request
);
}
}
...
...
app/Services/Warn/WarnService.php
View file @
1ffa2d95
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment