Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
liexin_supplier
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
06419166
authored
Apr 27, 2021
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix
parent
d301f8d9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
app/Http/Controllers/Filter/SupplierFilter.php
app/Http/Middleware/CheckLogin.php
app/Http/Controllers/Filter/SupplierFilter.php
View file @
06419166
...
@@ -121,8 +121,13 @@ class SupplierFilter
...
@@ -121,8 +121,13 @@ class SupplierFilter
$query
->
whereRaw
(
DB
::
raw
(
"(create_uid in
$inUserIdSql
or purchase_uid in
$inCodeIdSql
or channel_uid REGEXP '
$likeSqlRaw
') "
));
$query
->
whereRaw
(
DB
::
raw
(
"(create_uid in
$inUserIdSql
or purchase_uid in
$inCodeIdSql
or channel_uid REGEXP '
$likeSqlRaw
') "
));
}
else
{
}
else
{
//剩下的就只是看自己相关的
if
(
$codeId
)
{
$query
->
whereRaw
(
DB
::
raw
(
"(create_uid =
$userId
or purchase_uid =
$codeId
or channel_uid like '%${codeId}%') "
));
//剩下的就只是看自己相关的
$query
->
whereRaw
(
DB
::
raw
(
"(create_uid =
$userId
or purchase_uid =
$codeId
or channel_uid like '%${codeId}%') "
));
}
else
{
$query
->
whereRaw
(
DB
::
raw
(
"(create_uid =
$userId
)"
));
}
}
}
}
}
//先判断获取类型
//先判断获取类型
...
...
app/Http/Middleware/CheckLogin.php
View file @
06419166
...
@@ -78,7 +78,7 @@ class CheckLogin
...
@@ -78,7 +78,7 @@ class CheckLogin
$user
=
$ret
->
data
;
$user
=
$ret
->
data
;
$intracodeModel
=
new
IntracodeModel
();
$intracodeModel
=
new
IntracodeModel
();
$codeId
=
$intracodeModel
->
where
(
'admin_id'
,
$user
->
userId
)
->
value
(
'code_id'
);
$codeId
=
$intracodeModel
->
where
(
'admin_id'
,
$user
->
userId
)
->
value
(
'code_id'
);
$user
->
codeId
=
$codeId
;
$user
->
codeId
=
$codeId
?:
99999
;
$request
->
user
=
$user
;
$request
->
user
=
$user
;
}
}
...
@@ -93,7 +93,7 @@ class CheckLogin
...
@@ -93,7 +93,7 @@ class CheckLogin
{
{
$userId
=
request
()
->
user
->
userId
;
$userId
=
request
()
->
user
->
userId
;
$permsUrl
=
env
(
'PERM_LIST'
)
.
'/'
.
$userId
.
'/'
.
env
(
'PERM_ID'
)
.
'/'
;
$permsUrl
=
env
(
'PERM_LIST'
)
.
'/'
.
$userId
.
'/'
.
env
(
'PERM_ID'
)
.
'/'
;
$permsResult
=
json_decode
(
curl
(
$permsUrl
),
true
);
$permsResult
=
json_decode
(
curl
(
$permsUrl
),
true
);
$perms
=
[];
$perms
=
[];
if
(
isset
(
$permsResult
[
'retcode'
])
&&
$permsResult
[
'retcode'
]
===
0
)
{
if
(
isset
(
$permsResult
[
'retcode'
])
&&
$permsResult
[
'retcode'
]
===
0
)
{
$perms
=
$permsResult
[
'data'
][
'perms'
];
$perms
=
$permsResult
[
'data'
][
'perms'
];
...
...
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