支持客服入口按业务场景分流到客服分组

联系客服支持 scene(general/mohong),按用户与场景复用会话;摸大红入口走摸大红分组选人。
This commit is contained in:
yml2213
2026-07-16 20:05:10 +08:00
parent e07532a188
commit 66ca2693b3
17 changed files with 224 additions and 21 deletions
@@ -62,7 +62,10 @@ func (h *Handler) EnsureSupportConversation(c *gin.Context) {
response.Unauthorized(c, "缺少用户上下文")
return
}
item, err := h.service.EnsureSupportConversation(c.Request.Context(), userID)
var req EnsureSupportRequest
// scene 可选;空 body 仍按平台客服处理
_ = c.ShouldBindJSON(&req)
item, err := h.service.EnsureSupportConversation(c.Request.Context(), userID, req.Scene)
if err != nil {
writeChatError(c, err)
return