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