feat: 添加了根据环境变量排除特定门店统计的功能

This commit is contained in:
mkm 2024-08-25 16:34:56 +08:00
parent 807b4cacd6
commit 5ab280a05f

View File

@ -194,6 +194,11 @@ class WarehouseLogic extends BaseLogic
if(isset($parmas['store_id']) && $parmas['store_id'] > 0){
$where[]=['store_id','=',$parmas['store_id']];
}
$store_arr=getenv('NO_STORE_STATISTICS');
if($store_arr){
$store_arr=explode(',',$store_arr);
$where[]=['store_id','not in',$store_arr];
}
$list = StoreBranchProduct::where($where)->page($parmas['page_no'], 15)->select()
->each(function ($item) {
$item->remark = SystemStore::where('id', $item['store_id'])->value('name');