...
|
...
|
@@ -128,6 +128,7 @@ func (noticeSettingService *NoticeSettingService) UpdateNoticeSetting(updateNoti |
|
|
} else {
|
|
|
noticeSettingRepository = value
|
|
|
}
|
|
|
|
|
|
var (
|
|
|
noticeSettings []*domain.NoticeSetting
|
|
|
noticeSetting *domain.NoticeSetting
|
...
|
...
|
@@ -158,7 +159,19 @@ func (noticeSettingService *NoticeSettingService) UpdateNoticeSetting(updateNoti |
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
moduleAction, err := domain.GetNoticeModuleAction(updateNoticeSettingCommand.Module, updateNoticeSettingCommand.ModuleAction)
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
module, err := domain.GetNoticeModule(updateNoticeSettingCommand.Module)
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
err = noticeSetting.Update(map[string]interface{}{
|
|
|
"module": module.ModuleCode,
|
|
|
"moduleName": module.ModuleName,
|
|
|
"moduleAction": moduleAction.ActionCode,
|
|
|
"moduleActionName": moduleAction.ActionName,
|
|
|
"content": updateNoticeSettingCommand.Content,
|
|
|
"isPush": updateNoticeSettingCommand.IsPush,
|
|
|
"updatedAt": time.Now(),
|
...
|
...
|
|