Merge pull request 'fix' (#1) from devad/pcm-coordinator:master into master
Former-commit-id: 734c3784f984a64ae3cbc9c02eafd55b19c5a688
This commit is contained in:
commit
5f3476decf
|
@ -409,7 +409,7 @@ type (
|
||||||
NsID string `json:"nsId,omitempty" db:"ns_id"`
|
NsID string `json:"nsId,omitempty" db:"ns_id"`
|
||||||
TenantId string `json:"tenantId,omitempty" db:"tenant_id"`
|
TenantId string `json:"tenantId,omitempty" db:"tenant_id"`
|
||||||
CreatedTime string `json:"createdTime,omitempty" db:"created_time" gorm:"autoCreateTime"`
|
CreatedTime string `json:"createdTime,omitempty" db:"created_time" gorm:"autoCreateTime"`
|
||||||
UpdatedTime string `json:"updatedTime,omitempty" db:"updated_time" gorm:"autoUpdateTime"`
|
UpdatedTime string `json:"updatedTime,omitempty" db:"updated_time"`
|
||||||
AdapterTypeDict int `json:"adapterTypeDict" db:"create_time" gorm:"adapter_type_dict"` //任务类型(对应字典表的值
|
AdapterTypeDict int `json:"adapterTypeDict" db:"create_time" gorm:"adapter_type_dict"` //任务类型(对应字典表的值
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
|
@ -109,9 +109,7 @@ func (l *PageListTaskLogic) updateTaskStatus(tasks []*types.TaskModel, ch chan<-
|
||||||
task.Status = aiTask[0].Status
|
task.Status = aiTask[0].Status
|
||||||
task.StartTime = aiTask[0].StartTime
|
task.StartTime = aiTask[0].StartTime
|
||||||
task.EndTime = aiTask[0].EndTime
|
task.EndTime = aiTask[0].EndTime
|
||||||
tx = l.svcCtx.DbEngin.Model(&types.TaskModel{}).Table("task")
|
tx = l.svcCtx.DbEngin.Model(task).Table("task").Where("deleted_at is null").Updates(task)
|
||||||
tx = tx.Where("deleted_at is null")
|
|
||||||
tx = tx.Updates(task)
|
|
||||||
if tx.Error != nil {
|
if tx.Error != nil {
|
||||||
logx.Errorf(tx.Error.Error())
|
logx.Errorf(tx.Error.Error())
|
||||||
return
|
return
|
||||||
|
@ -174,7 +172,7 @@ func (l *PageListTaskLogic) updateTaskStatus(tasks []*types.TaskModel, ch chan<-
|
||||||
}
|
}
|
||||||
|
|
||||||
task.UpdatedTime = time.Now().Format(constants.Layout)
|
task.UpdatedTime = time.Now().Format(constants.Layout)
|
||||||
tx = l.svcCtx.DbEngin.Table("task").Updates(task)
|
tx = l.svcCtx.DbEngin.Table("task").Model(task).Updates(task)
|
||||||
if tx.Error != nil {
|
if tx.Error != nil {
|
||||||
logx.Errorf(tx.Error.Error())
|
logx.Errorf(tx.Error.Error())
|
||||||
return
|
return
|
||||||
|
|
|
@ -345,7 +345,7 @@ type TaskModel struct {
|
||||||
NsID string `json:"nsId,omitempty" db:"ns_id"`
|
NsID string `json:"nsId,omitempty" db:"ns_id"`
|
||||||
TenantId string `json:"tenantId,omitempty" db:"tenant_id"`
|
TenantId string `json:"tenantId,omitempty" db:"tenant_id"`
|
||||||
CreatedTime string `json:"createdTime,omitempty" db:"created_time" gorm:"autoCreateTime"`
|
CreatedTime string `json:"createdTime,omitempty" db:"created_time" gorm:"autoCreateTime"`
|
||||||
UpdatedTime string `json:"updatedTime,omitempty" db:"updated_time" gorm:"autoUpdateTime"`
|
UpdatedTime string `json:"updatedTime,omitempty" db:"updated_time"`
|
||||||
AdapterTypeDict int `json:"adapterTypeDict" db:"create_time" gorm:"adapter_type_dict"` //任务类型(对应字典表的值
|
AdapterTypeDict int `json:"adapterTypeDict" db:"create_time" gorm:"adapter_type_dict"` //任务类型(对应字典表的值
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue