getWhere(); if($data){ $find = self::where($where)->field(array_keys($data->toArray()))->find(); if($find){ channelLog(array_merge($find->toArray(),$where),'system_store','更新前'); } } } catch (Throwable $e) { Log::error('system_store:' . $e->getMessage()); } } public static function onAfterWrite($data){ try{ channelLog($data->toArray(),'system_store','更新后'); }catch(Throwable $e){ Log::error('system_store:'.$e->getMessage()); } } public static function isActivityStore($storeId) { return in_array($storeId, [5]); } /** * 是否自营门店 * @param $storeId * @return bool */ public static function isSelfOperate($storeId): bool { return !in_array($storeId, [21, 22, 15, 7]); } }