业务更名为撞车并切换crash路由
用户可见文案与页面/API路径改为撞车与crash,保留mohong表与权限码兼容;移动端入口去掉租/撞图标。
This commit is contained in:
@@ -169,6 +169,22 @@ func (r *Repository) EnsureSupportConversation(ctx context.Context, userID uint6
|
||||
_ = tx.Model(&existing).Update("support_scene", SupportSceneGeneral).Error
|
||||
}
|
||||
}
|
||||
// 兼容旧摸大红场景码 mohong → crash
|
||||
if existing.ID == 0 && scene == SupportSceneCrash {
|
||||
err = tx.Table("chat_conversations AS c").
|
||||
Select("c.*").
|
||||
Joins("JOIN chat_participants AS cp ON cp.conversation_id = c.id").
|
||||
Where(
|
||||
"c.type = ? AND c.support_scene = ? AND cp.participant_type = ? AND cp.participant_id = ?",
|
||||
ConversationTypeGeneralSupport, SupportSceneMohong, "user", userID,
|
||||
).
|
||||
Order("c.id ASC").
|
||||
Limit(1).
|
||||
Find(&existing).Error
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
if existing.ID > 0 {
|
||||
conversationID = existing.ID
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user