Commit 1ee01750 by mushishixian

黑名单查看

parent 106de497
......@@ -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) {
......
......@@ -78,7 +78,7 @@ class SupplierStatisticsService
return $value;
}, $result);
$redis->set('supplier_list_statistics', json_encode($result));
$redis->expire('supplier_list_statistics', 100);
$redis->expire('supplier_list_statistics', 1);
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