pull/282/head
zijiren233 2 months ago
parent fd9294fccd
commit 587efadd39

@ -62,11 +62,13 @@ func GetSettingItemValue(name string) (string, error) {
}
func FirstOrCreateSettingItemValue(s *model.Setting) error {
return db.Where("name = ?", s.Name).FirstOrCreate(s, model.Setting{
Value: s.Value,
Type: s.Type,
Group: s.Group,
}).Error
return db.
Where("name = ?", s.Name).
Attrs(model.Setting{
Value: s.Value,
Type: s.Type,
Group: s.Group,
}).FirstOrCreate(s).Error
}
func UpdateSettingItemValue(name, value string) error {

Loading…
Cancel
Save