mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-03 23:20:26 +08:00
简化数据库查询代码
This commit is contained in:
@@ -63,7 +63,7 @@ func (this *SysSettingDAO) UpdateSetting(codeFormat string, valueJSON []byte, co
|
||||
op := NewSysSettingOperator()
|
||||
op.Code = codeFormat
|
||||
op.Value = valueJSON
|
||||
_, err = this.Save(op)
|
||||
err = this.Save(op)
|
||||
if err != nil {
|
||||
lastErr = err
|
||||
|
||||
@@ -77,7 +77,7 @@ func (this *SysSettingDAO) UpdateSetting(codeFormat string, valueJSON []byte, co
|
||||
op := NewSysSettingOperator()
|
||||
op.Id = settingId
|
||||
op.Value = valueJSON
|
||||
_, err = this.Save(op)
|
||||
err = this.Save(op)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user