切换导航条
此项目
正在载入...
登录
allied-creation
/
performance
·
提交
转到一个项目
GitLab
转到群组
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
tangxvhui
2 years ago
提交
c8ac22529287d7d4f605d351876367aa0253cdd8
1 个父辈
84668964
暂存
隐藏空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
41 行增加
和
10 行删除
pkg/application/notify/message_personal.go → pkg/application/notify/service/message_personal.go
pkg/domain/message_personal.go
pkg/infrastructure/pg/models/message_personal.go
pkg/application/notify/message_personal.go → pkg/application/notify/
service/
message_personal.go
查看文件 @
c8ac225
package
notify
import
(
"time"
"github.com/linmadan/egglib-go/core/application"
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/factory"
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/notify/command"
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/domain"
)
// 个人信息提示
...
...
@@ -28,8 +31,19 @@ func (srv *MessagePersonalService) TodayMessageSummaryEvaluationSelf(param *comm
defer
func
()
{
_
=
transactionContext
.
RollbackTransaction
()
}()
// nowTime := time.Now()
nowTime
:=
time
.
Now
()
evaluationRepo
:=
factory
.
CreateSummaryEvaluationRepository
(
map
[
string
]
interface
{}{
"transactionContext"
:
transactionContext
,
})
_
,
evaluationList
,
err
:=
evaluationRepo
.
Find
(
map
[
string
]
interface
{}{
"targetUserId"
:
param
.
UserId
,
"types"
:
domain
.
EvaluationSelf
,
"beginTime"
:
nowTime
,
"endTime"
:
nowTime
,
"limit"
:
20
,
})
_
=
evaluationList
if
err
:=
transactionContext
.
CommitTransaction
();
err
!=
nil
{
return
nil
,
application
.
ThrowError
(
application
.
INTERNAL_SERVER_ERROR
,
err
.
Error
())
}
...
...
pkg/domain/message_personal.go
查看文件 @
c8ac225
...
...
@@ -4,15 +4,15 @@ import "time"
// MessagePersonal 个人的消息提示
type
MessagePersonal
struct
{
Id
int
//
Types
string
//消息类型
TargetUserId
int
//消息指向的用户
ReadFlag
MessageReadFlag
//1:已读、2:未读
Title
string
//消息的标题
Content
string
//消息的内容
CreatedAt
time
.
Time
UpdatedAt
time
.
Time
Payload
string
//消息的额外承载的数据
Id
int
`json:"id"`
//
Types
string
`json:"types"`
//消息类型
TargetUserId
int
`json:"targetUserId"`
//消息指向的用户
ReadFlag
MessageReadFlag
`json:"readFlag"`
//1:已读、2:未读
Title
string
`json:"title"`
//消息的标题
Content
string
`json:"content"`
//消息的内容
CreatedAt
time
.
Time
`json:"createdAt"`
UpdatedAt
time
.
Time
`json:"updatedAt"`
Payload
string
`json:"payload"`
//消息的额外承载的数据
}
type
MessageTypes
string
...
...
pkg/infrastructure/pg/models/message_personal.go
0 → 100644
查看文件 @
c8ac225
package
models
import
"time"
// MessagePersonal 记录个人的提示消息
type
MessagePersonal
struct
{
tableName
struct
{}
`comment:"记录个人的提示消息" pg:"message_personal"`
Id
int
`pg:"id,pk"`
//
Types
string
`pg:"types"`
//消息类型
TargetUserId
int
`pg:"target_user_id"`
//消息指向的用户
ReadFlag
string
`pg:"read_flag"`
//1:已读、2:未读
Title
string
`pg:"title"`
//消息的标题
Content
string
`pg:"content"`
//消息的内容
CreatedAt
time
.
Time
`pg:"created_at"`
UpdatedAt
time
.
Time
`pg:"updated_at"`
Payload
string
`pg:"payload"`
//消息的额外承载的数据
}
...
...
请
注册
或
登录
后发表评论