修复插件
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
yiqiu
2025-12-28 16:34:20 +08:00
parent fcd4a2d016
commit d59c363f6c

View File

@@ -87,8 +87,13 @@ class ThemeConfigModel
'update_time' => time(),
];
// 删除所有旧记录,确保只有一条最新记录
$this->query()->delete();
// 查询是否有旧记录
$exists = $this->query()->find();
if ($exists) {
// 有旧记录:删除所有旧记录,确保只有一条最新记录
$this->query()->delete();
}
// 插入新记录
$this->query()->insert($payload);