feat: sku
This commit is contained in:
@@ -286,4 +286,30 @@ class GoodCache
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $kitchenId
|
||||
* @param int $cycleId
|
||||
* @return void
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function delCache(int $kitchenId,int $cycleId)
|
||||
{
|
||||
$keyArr = [
|
||||
ApiRedisKey::mealGoodListKey($cycleId,$kitchenId),
|
||||
ApiRedisKey::optionalGoodListKey($cycleId,$kitchenId),
|
||||
ApiRedisKey::goodStockKey($cycleId,$kitchenId)
|
||||
];
|
||||
|
||||
$script = <<<LUA
|
||||
local corpseCount = 0
|
||||
for _, key in ipairs(KEYS) do
|
||||
corpseCount = corpseCount + redis.call('DEL', key)
|
||||
end
|
||||
return corpseCount
|
||||
LUA;
|
||||
|
||||
$this->redis->eval($script, $keyArr,count($keyArr));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user