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
1ee01750
authored
Aug 05, 2021
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
黑名单查看
parent
106de497
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
app/Http/Controllers/Filter/SupplierFilter.php
app/Http/Services/SupplierStatisticsService.php
app/Http/Controllers/Filter/SupplierFilter.php
View file @
1ee01750
...
...
@@ -116,7 +116,7 @@ class SupplierFilter
//默认展示的数据查询
//看全部的权限,优先级最高
if
(
$canViewAllSupplier
)
{
if
(
$canViewAllSupplier
||
$sourceType
==
'block'
)
{
//能查看所有的话,限制基本没有
}
else
{
//如果能看部下的,那需要判断的地方就多了不少
...
...
@@ -160,9 +160,12 @@ class SupplierFilter
}
}
// $query->orwhere('status', SupplierChannelModel::STATUS_BLOCK);
//先判断获取类型
switch
(
$sourceType
)
{
case
"all"
:
//还要看到所有黑名单
$query
->
orWhere
(
'status'
,
SupplierChannelModel
::
STATUS_BLOCK
);
break
;
case
"pending"
:
//待复审供应商
...
...
@@ -229,6 +232,7 @@ class SupplierFilter
break
;
case
"block"
:
$query
->
where
(
'status'
,
SupplierChannelModel
::
STATUS_BLOCK
);
// $query->orWhere('status', SupplierChannelModel::STATUS_BLOCK);
break
;
case
"has_supplier_tag"
:
$query
->
where
(
function
(
$q
)
{
...
...
app/Http/Services/SupplierStatisticsService.php
View file @
1ee01750
...
...
@@ -78,7 +78,7 @@ class SupplierStatisticsService
return
$value
;
},
$result
);
$redis
->
set
(
'supplier_list_statistics'
,
json_encode
(
$result
));
$redis
->
expire
(
'supplier_list_statistics'
,
1
00
);
$redis
->
expire
(
'supplier_list_statistics'
,
1
);
return
$result
;
}
...
...
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