feat: update default skill to AfterSalesEscalation and adjust related service logic

This commit is contained in:
mlogclub
2026-04-14 17:43:58 +08:00
parent f8a3c03213
commit 2369a5a9a1
3 changed files with 53 additions and 21 deletions
+11 -11
View File
@@ -148,17 +148,17 @@ func (s *skillDefinitionService) UpdateSkillDefinition(req request.UpdateSkillDe
return errorsx.InvalidParam("Skill 编码已存在")
}
return repositories.SkillDefinitionRepository.Updates(sqls.DB(), req.ID, map[string]any{
"code": normalized.Code,
"name": normalized.Name,
"description": normalized.Description,
"instruction": normalized.Instruction,
"examples": mustMarshalSkillStringArray(normalized.Examples),
"allowed_tool_codes": mustMarshalSkillStringArray(normalized.ToolWhitelist),
"priority": resolveSkillPriorityForService(normalized.Priority, current.Priority),
"remark": normalized.Remark,
"update_user_id": operator.UserID,
"update_user_name": operator.Username,
"updated_at": time.Now(),
"code": normalized.Code,
"name": normalized.Name,
"description": normalized.Description,
"instruction": normalized.Instruction,
"examples": mustMarshalSkillStringArray(normalized.Examples),
"tool_whitelist": mustMarshalSkillStringArray(normalized.ToolWhitelist),
"priority": resolveSkillPriorityForService(normalized.Priority, current.Priority),
"remark": normalized.Remark,
"update_user_id": operator.UserID,
"update_user_name": operator.Username,
"updated_at": time.Now(),
})
}