diff --git a/internal/biz/do/ctx.go b/internal/biz/do/ctx.go index 9527177..a80858a 100644 --- a/internal/biz/do/ctx.go +++ b/internal/biz/do/ctx.go @@ -430,7 +430,7 @@ func (d *Do) getTaskIdByChat(chat []entitys.Response) (taskId int32) { // ι€šθΏ‡ taskIndex θŽ·ε– taskId cond := builder.NewCond().And(builder.Eq{"`index`": taskIndex}) taskMap, _ := d.taskImpl.GetOneBySearch(&cond) - if taskMap == nil { + if taskMap == nil || taskMap["task_id"] == nil { return } diff --git a/internal/entitys/chat_history.go b/internal/entitys/chat_history.go index 084adfe..f4aa8de 100644 --- a/internal/entitys/chat_history.go +++ b/internal/entitys/chat_history.go @@ -69,7 +69,7 @@ func (c *ChatHisQueryResponse) parseTaskIndex(taskIndex string) string { reverseMap[v] = k } - if _, ok := reverseMap[taskIndex]; !ok { + if _, ok := reverseMap[taskIndex]; ok { return reverseMap[taskIndex] }