切换导航条
此项目
正在载入...
登录
allied-creation
/
performance
·
提交
转到一个项目
GitLab
转到群组
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
tangxvhui
2 years ago
提交
3b41c2d244a72420b93ca94ff97946a92c5592e0
1 个父辈
1a13a957
日常保存
隐藏空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
5 行增加
和
1 行删除
pkg/domain/task.go
pkg/infrastructure/pg/models/task.go
pkg/infrastructure/repository/pg_task_repository.go
pkg/domain/task.go
查看文件 @
3b41c2d
...
...
@@ -26,6 +26,7 @@ type Task struct {
RelatedUser
[]
int
`json:"relatedUser"`
// 相关的员工id
RunAt
int64
`json:"runAt"`
// 启动的时间戳,秒
StopAt
int64
`json:"stopAt"`
// 停止的时间戳,秒
Anomaly
int
`json:"anomaly"`
//异常反馈的次数
}
type
TaskLeader
struct
{
...
...
pkg/infrastructure/pg/models/task.go
查看文件 @
3b41c2d
...
...
@@ -23,4 +23,5 @@ type Task struct {
RelatedUser
[]
int
`pg:"related_user"`
//
RunAt
int64
`pg:"run_at"`
// 启动的时间
StopAt
int64
`pg:"stop_at"`
// 停止的时间
Anomaly
int
`json:"anomaly"`
// 异常反馈的数量
}
...
...
pkg/infrastructure/repository/pg_task_repository.go
查看文件 @
3b41c2d
...
...
@@ -29,6 +29,7 @@ func (repo *TaskRepository) TransformToDomain(d *models.Task) *domain.Task {
CreatedAt
:
d
.
CreatedAt
,
UpdatedAt
:
d
.
UpdatedAt
,
DeletedAt
:
d
.
DeletedAt
,
CompanyId
:
d
.
CompanyId
,
Name
:
d
.
Name
,
Alias
:
d
.
Alias
,
Leader
:
d
.
Leader
,
...
...
@@ -38,7 +39,7 @@ func (repo *TaskRepository) TransformToDomain(d *models.Task) *domain.Task {
RelatedUser
:
d
.
RelatedUser
,
RunAt
:
d
.
RunAt
,
StopAt
:
d
.
StopAt
,
CompanyId
:
d
.
CompanyId
,
Anomaly
:
d
.
Anomaly
,
}
}
...
...
@@ -62,6 +63,7 @@ func (repo *TaskRepository) Save(param *domain.Task) error {
RunAt
:
param
.
RunAt
,
CompanyId
:
param
.
CompanyId
,
StopAt
:
param
.
StopAt
,
Anomaly
:
param
.
Anomaly
,
}
db
:=
repo
.
transactionContext
.
PgTx
if
m
.
Id
==
0
{
...
...
请
注册
或
登录
后发表评论