|
@@ -128,6 +128,7 @@ func (noticeSettingService *NoticeSettingService) UpdateNoticeSetting(updateNoti |
|
@@ -128,6 +128,7 @@ func (noticeSettingService *NoticeSettingService) UpdateNoticeSetting(updateNoti |
128
|
} else {
|
128
|
} else {
|
129
|
noticeSettingRepository = value
|
129
|
noticeSettingRepository = value
|
130
|
}
|
130
|
}
|
|
|
131
|
+
|
131
|
var (
|
132
|
var (
|
132
|
noticeSettings []*domain.NoticeSetting
|
133
|
noticeSettings []*domain.NoticeSetting
|
133
|
noticeSetting *domain.NoticeSetting
|
134
|
noticeSetting *domain.NoticeSetting
|
|
@@ -158,7 +159,19 @@ func (noticeSettingService *NoticeSettingService) UpdateNoticeSetting(updateNoti |
|
@@ -158,7 +159,19 @@ func (noticeSettingService *NoticeSettingService) UpdateNoticeSetting(updateNoti |
158
|
if err != nil {
|
159
|
if err != nil {
|
159
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
160
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
160
|
}
|
161
|
}
|
|
|
162
|
+ moduleAction, err := domain.GetNoticeModuleAction(updateNoticeSettingCommand.Module, updateNoticeSettingCommand.ModuleAction)
|
|
|
163
|
+ if err != nil {
|
|
|
164
|
+ return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
165
|
+ }
|
|
|
166
|
+ module, err := domain.GetNoticeModule(updateNoticeSettingCommand.Module)
|
|
|
167
|
+ if err != nil {
|
|
|
168
|
+ return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
169
|
+ }
|
161
|
err = noticeSetting.Update(map[string]interface{}{
|
170
|
err = noticeSetting.Update(map[string]interface{}{
|
|
|
171
|
+ "module": module.ModuleCode,
|
|
|
172
|
+ "moduleName": module.ModuleName,
|
|
|
173
|
+ "moduleAction": moduleAction.ActionCode,
|
|
|
174
|
+ "moduleActionName": moduleAction.ActionName,
|
162
|
"content": updateNoticeSettingCommand.Content,
|
175
|
"content": updateNoticeSettingCommand.Content,
|
163
|
"isPush": updateNoticeSettingCommand.IsPush,
|
176
|
"isPush": updateNoticeSettingCommand.IsPush,
|
164
|
"updatedAt": time.Now(),
|
177
|
"updatedAt": time.Now(),
|