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
c8c15c00
authored
Sep 26, 2022
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
审核数量问题
parent
c488e216
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
20 deletions
app/Http/Controllers/Filter/SupplierFilter.php
app/Http/Controllers/Sync/SupplierSyncController.php
app/Http/Middleware/CheckLogin.php
app/Http/Controllers/Filter/SupplierFilter.php
View file @
c8c15c00
...
@@ -136,17 +136,17 @@ class SupplierFilter
...
@@ -136,17 +136,17 @@ class SupplierFilter
//默认过滤带有-1字符串的供应商名称的数据
//默认过滤带有-1字符串的供应商名称的数据
$query
->
whereRaw
(
'supplier_name NOT LIKE "%-1"'
);
$query
->
whereRaw
(
'supplier_name NOT LIKE "%-1"'
);
if
(
config
(
'website.domain'
)
==
'liexin.net'
&&
!
in_array
(
request
()
->
user
->
userId
,
[
//
if (config('website.domain') == 'liexin.net' && !in_array(request()->user->userId, [
1611
,
//
1611,
1499
,
//
1499,
1354
,
//
1354,
1613
,
//
1613,
1000
,
//
1000,
1619
,
//
1619,
1629
//
1629
]))
{
//
])) {
$query
->
where
(
'supplier_channel.supplier_id'
,
'>'
,
12211
);
//
$query->where('supplier_channel.supplier_id', '>', 12211);
}
//
}
return
$query
;
return
$query
;
}
}
...
...
app/Http/Controllers/Sync/SupplierSyncController.php
View file @
c8c15c00
...
@@ -4,6 +4,7 @@ namespace App\Http\Controllers\Sync;
...
@@ -4,6 +4,7 @@ namespace App\Http\Controllers\Sync;
use
App\Http\Controllers\Controller
;
use
App\Http\Controllers\Controller
;
use
App\Http\Controllers\Filter\SupplierFilter
;
use
App\Http\Controllers\Filter\SupplierFilter
;
use
App\Http\Middleware\CheckLogin
;
use
App\Http\Services\AdminUserService
;
use
App\Http\Services\AdminUserService
;
use
App\Http\Services\SupplierService
;
use
App\Http\Services\SupplierService
;
use
App\Http\Services\SyncSupplierService
;
use
App\Http\Services\SyncSupplierService
;
...
@@ -53,20 +54,23 @@ class SupplierSyncController extends BaseSyncController
...
@@ -53,20 +54,23 @@ class SupplierSyncController extends BaseSyncController
{
{
$userId
=
$request
->
input
(
'user_id'
);
$userId
=
$request
->
input
(
'user_id'
);
if
(
!
$userId
)
{
if
(
!
$userId
)
{
$this
->
response
(
-
1
,
'user_id不能为空'
);
$this
->
response
(
-
1
,
'user_id不能为空'
);
}
}
$codeId
=
(
new
AdminUserService
())
->
getCodeIdsByUserId
(
$userId
);
$codeId
=
(
new
AdminUserService
())
->
getCodeIdsByUserId
(
$userId
);
request
()
->
merge
([
'user'
=>
(
object
)[
request
()
->
merge
([
'userId'
=>
$userId
,
'user'
=>
(
object
)[
'codeId'
=>
$codeId
,
'userId'
=>
$userId
,
]]);
'codeId'
=>
$codeId
,
// request()->user->userId = $userId;
]
// request()->user->codeId = $codeId;
]);
$perms
=
(
new
CheckLogin
())
->
getPerms
();
request
()
->
merge
([
'perms'
=>
$perms
]);
$model
=
new
SupplierChannelModel
();
$model
=
new
SupplierChannelModel
();
$query
=
$model
->
orderBy
(
'update_time'
,
'desc'
);
$query
=
$model
->
orderBy
(
'update_time'
,
'desc'
);
$filter
=
new
SupplierFilter
();
$filter
=
new
SupplierFilter
();
$params
=
$request
->
except
(
'user'
);
$params
=
$request
->
except
(
'user'
,
'perms'
);
$params
[
'need_audit'
]
=
1
;
$params
[
'need_audit'
]
=
1
;
$params
[
'source_type'
]
=
'all'
;
$query
=
$filter
->
listFilter
(
$params
,
$query
);
$query
=
$filter
->
listFilter
(
$params
,
$query
);
$count
=
$query
->
count
();
$count
=
$query
->
count
();
$this
->
response
(
0
,
'ok'
,
$count
);
$this
->
response
(
0
,
'ok'
,
$count
);
...
...
app/Http/Middleware/CheckLogin.php
View file @
c8c15c00
...
@@ -92,7 +92,7 @@ class CheckLogin
...
@@ -92,7 +92,7 @@ class CheckLogin
return
$next
(
$request
);
return
$next
(
$request
);
}
}
p
rivate
function
getPerms
()
p
ublic
function
getPerms
()
{
{
$userId
=
request
()
->
user
->
userId
;
$userId
=
request
()
->
user
->
userId
;
$permsUrl
=
env
(
'PERM_LIST'
)
.
'/'
.
$userId
.
'/'
.
env
(
'PERM_ID'
)
.
'/'
;
$permsUrl
=
env
(
'PERM_LIST'
)
.
'/'
.
$userId
.
'/'
.
env
(
'PERM_ID'
)
.
'/'
;
...
...
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