...
|
...
|
@@ -46,7 +46,7 @@ func (systemSettingService *SystemSettingService) GetSystemSetting(getSystemSett |
|
|
if len(systemSettings) == 0 {
|
|
|
//获取默认设置项
|
|
|
setting := domain.SystemSetting{}
|
|
|
defaultSet := setting.GetDefaultSetting(getSystemSettingQuery.SettingCode)
|
|
|
defaultSet := setting.GetDefaultSetting(getSystemSettingQuery.SettingCode, "")
|
|
|
if len(defaultSet) == 0 {
|
|
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, "获取设置项失败,settingCode="+getSystemSettingQuery.SettingCode)
|
|
|
}
|
...
|
...
|
@@ -102,7 +102,7 @@ func (systemSettingService *SystemSettingService) ListSystemSetting(listSystemSe |
|
|
code := systemSettings[i].SettingCode
|
|
|
settingMap[code] = systemSettings[i]
|
|
|
}
|
|
|
defaultSettings := new(domain.SystemSetting).GetDefaultSetting("")
|
|
|
defaultSettings := new(domain.SystemSetting).GetDefaultSetting("", listSystemSettingQuery.SettingName)
|
|
|
for i := range defaultSettings {
|
|
|
if v, ok := settingMap[defaultSettings[i].SettingCode]; ok {
|
|
|
defaultSettings[i].Value = v.Value
|
...
|
...
|
@@ -151,7 +151,7 @@ func (systemSettingService *SystemSettingService) UpdateSystemSetting(updateSyst |
|
|
var systemSetting *domain.SystemSetting
|
|
|
if len(systemSettings) == 0 {
|
|
|
//未找到历史数据,使用默认配置
|
|
|
defaultSet := new(domain.SystemSetting).GetDefaultSetting(updateSystemSettingCommand.SettingCode)
|
|
|
defaultSet := new(domain.SystemSetting).GetDefaultSetting(updateSystemSettingCommand.SettingCode, "")
|
|
|
if len(defaultSet) > 0 {
|
|
|
systemSetting = &domain.SystemSetting{}
|
|
|
*systemSetting = defaultSet[0]
|
...
|
...
|
|