Commit 1ee01750 by mushishixian

黑名单查看

parent 106de497
...@@ -116,7 +116,7 @@ class SupplierFilter ...@@ -116,7 +116,7 @@ class SupplierFilter
//默认展示的数据查询 //默认展示的数据查询
//看全部的权限,优先级最高 //看全部的权限,优先级最高
if ($canViewAllSupplier) { if ($canViewAllSupplier || $sourceType == 'block') {
//能查看所有的话,限制基本没有 //能查看所有的话,限制基本没有
} else { } else {
//如果能看部下的,那需要判断的地方就多了不少 //如果能看部下的,那需要判断的地方就多了不少
...@@ -160,9 +160,12 @@ class SupplierFilter ...@@ -160,9 +160,12 @@ class SupplierFilter
} }
} }
// $query->orwhere('status', SupplierChannelModel::STATUS_BLOCK);
//先判断获取类型 //先判断获取类型
switch ($sourceType) { switch ($sourceType) {
case "all": case "all":
//还要看到所有黑名单
$query->orWhere('status', SupplierChannelModel::STATUS_BLOCK);
break; break;
case "pending": case "pending":
//待复审供应商 //待复审供应商
...@@ -229,6 +232,7 @@ class SupplierFilter ...@@ -229,6 +232,7 @@ class SupplierFilter
break; break;
case "block": case "block":
$query->where('status', SupplierChannelModel::STATUS_BLOCK); $query->where('status', SupplierChannelModel::STATUS_BLOCK);
// $query->orWhere('status', SupplierChannelModel::STATUS_BLOCK);
break; break;
case "has_supplier_tag": case "has_supplier_tag":
$query->where(function ($q) { $query->where(function ($q) {
......
...@@ -78,7 +78,7 @@ class SupplierStatisticsService ...@@ -78,7 +78,7 @@ class SupplierStatisticsService
return $value; return $value;
}, $result); }, $result);
$redis->set('supplier_list_statistics', json_encode($result)); $redis->set('supplier_list_statistics', json_encode($result));
$redis->expire('supplier_list_statistics', 100); $redis->expire('supplier_list_statistics', 1);
return $result; return $result;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment