Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
media-resource
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨昕
media-resource
Commits
d744d114
Commit
d744d114
authored
May 20, 2021
by
杨昕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
兼容mis_uid为空的数据
parent
879cf731
Pipeline
#14723
passed with stages
in 4 minutes 30 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
UserModel.php
app/Model/UserModel.php
+4
-2
No files found.
app/Model/UserModel.php
View file @
d744d114
...
...
@@ -225,7 +225,7 @@ class UserModel extends Authenticatable
* 用户名称是有三部分组成,姓名-新账号-旧账号
*/
$user
=
UserModel
::
where
(
'name'
,
'regexp'
,
'/^.*?'
.
$username
.
'/'
)
->
first
();
if
(
empty
(
$user
)
||
!
isset
(
$user
[
'mis_uid'
])){
if
(
empty
(
$user
)
||
!
isset
(
$user
[
'mis_uid'
])
||
$user
[
'mis_uid'
]
==
""
){
/**
* 获取mis用户基本信息
*/
...
...
@@ -302,6 +302,7 @@ class UserModel extends Authenticatable
}
$result
=
self
::
getUserPrivilege
(
$request
,[
'mis_uid'
=>
$userid
]);
if
(
empty
(
$result
)){
LogModel
::
addlog
([
"暂无业务权限,请联系管理员"
,
$request
->
all
()]);
throw
new
\Exception
(
'暂无业务权限,请联系管理员'
,
403
);
...
...
@@ -345,12 +346,13 @@ class UserModel extends Authenticatable
$catgList
=
MediaCategoryModel
::
where
(
"status"
,
0
)
->
get
()
->
toArray
();
$tmp
=
[];
foreach
(
$catgList
as
$key
=>
$catg
){
$request
->
replace
(
array_merge
(
$request
->
all
(),[
'appid'
=>
$catg
[
'media_category_id'
]]));
$url
=
getRbac
(
$request
,
'api/open/check'
,
$catg
[
'media_category_id'
]
);
$url
=
getRbac
(
$request
,
'api/open/check'
);
$data
[
'appid'
]
=
$catg
[
'media_category_id'
];
$data
[
'uid'
]
=
$request
->
mis_uid
;
...
...
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