作者 tangxuhui

更新

{"D:\\workspaceGo\\src\\allied-creation-basic\\pkg\\port\\beego":1629512512589801900}
\ No newline at end of file
{"D:\\workspaceGo\\src\\allied-creation-basic\\pkg\\port\\beego":1629526811710336200}
\ No newline at end of file
... ...
... ... @@ -93,6 +93,9 @@ func (noticeSettingService *NoticeSettingService) ListNoticeSetting(listNoticeSe
if err := transactionContext.CommitTransaction(); err != nil {
return 0, nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
}
if len(noticeSettings) == 0 {
noticeSettings = []*domain.NoticeSetting{}
}
return count,
noticeSettings,
nil
... ...
... ... @@ -152,11 +152,11 @@ func (repository *NoticePersonalRepository) Find(queryOptions map[string]interfa
query := sqlbuilder.BuildQuery(tx.Model(&noticePersonalModels), queryOptions)
query.SetOffsetAndLimit(20)
query.SetOrderDirect("notice_personal_id", "DESC")
query.SetWhereByQueryOption("notice_personal.user_id", "userId")
query.SetWhereByQueryOption("notice_personal.org_id", "orgId")
query.SetWhereByQueryOption("notice_personal.company_id", "companyId")
query.SetWhereByQueryOption("notice_personal.is_read", "isRead")
query.SetWhereByQueryOption("notice_personal.user_base_id", "userBaseId")
query.SetWhereByQueryOption("notice_personal.user_id=?", "userId")
query.SetWhereByQueryOption("notice_personal.org_id=?", "orgId")
query.SetWhereByQueryOption("notice_personal.company_id=?", "companyId")
query.SetWhereByQueryOption("notice_personal.is_read=?", "isRead")
query.SetWhereByQueryOption("notice_personal.user_base_id=?", "userBaseId")
if count, err := query.SelectAndCount(); err != nil {
return 0, noticePersonals, err
} else {
... ...