业务更名为撞车并切换crash路由

用户可见文案与页面/API路径改为撞车与crash,保留mohong表与权限码兼容;移动端入口去掉租/撞图标。
This commit is contained in:
yml2213
2026-07-16 21:19:35 +08:00
parent 8b637cf499
commit a4189db4ca
38 changed files with 232 additions and 179 deletions
@@ -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