feat(User): 移除冗余的onBeforeWrite和onAfterWrite方法,简化代码逻辑
This commit is contained in:
parent
1e03c45df2
commit
7c5a651b3e
@ -196,13 +196,4 @@ class User extends BaseModel
|
||||
})->field("FROM_UNIXTIME($create_time,'$timeType') as days,count(id) as num")->group('days')->select()->toArray();
|
||||
}
|
||||
|
||||
public static function onBeforeWrite($data)
|
||||
{
|
||||
channelLog($data->getData()??[], 'user', '更新前');
|
||||
}
|
||||
public static function onAfterWrite($data)
|
||||
{
|
||||
|
||||
channelLog($data->toArray()??[], 'user', '更新后');
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user