refactor: 清理废弃模块并重构管理端与全端代码
- 移除所有废弃的旧首页配置模块,包括destinationHero、demand相关、HomeExperience、vehicleService等表结构与代码,新增数据库迁移删除遗留表 - 重构管理端后台布局为标准RuoYi风格,新增Sidebar、Navbar、SettingsDrawer等组件,替换旧的过渡菜单实现 - 调整移动端响应断点为768px,更新布局相关测试用例,新增布局组件测试 - 删除OperationsTools发布/重置页面,移除/tools菜单入口,清理对应的API调用与测试代码 - 重构玩法模块编辑器:替换旧的图片手动输入框为图片上传组件,移除冗余的取消按钮 - 新增线索查询offset参数支持,完善查询参数处理逻辑 - 优化rbac菜单构建逻辑,新增可见性控制参数 - 修正管家编辑器提示文案,优化系统资源编辑器表单初始化逻辑 - 清理小程序端废弃的体验推荐组件与相关测试代码 - 更新文档与种子脚本,匹配新的API契约与使用说明
This commit is contained in:
1 parent
f6c5ad589f
commit
fbf2c772a8
63 files changed
+2272
-1991
No files matched your search
@@ -1,7 +1,7 @@
|
||||
from datetime import datetime, timezone
|
||||
from uuid import uuid4
|
||||
from sqlalchemy import Boolean, DateTime, ForeignKey, Integer, String, Text, UniqueConstraint
|
||||
from sqlalchemy.dialects.postgresql import ARRAY, JSONB
|
||||
from sqlalchemy.dialects.postgresql import JSONB
|
||||
from sqlalchemy.orm import Mapped, mapped_column, relationship
|
||||
from .database import Base
|
||||
|
||||
@@ -155,19 +155,6 @@ class HeroSlide(AdminOwnedContent, Base):
|
||||
updatedAt: Mapped[datetime] = mapped_column(DateTime, default=utc_now, onupdate=utc_now, nullable=False)
|
||||
|
||||
|
||||
class DestinationHero(AdminOwnedContent, Base):
|
||||
__tablename__ = "DestinationHero"
|
||||
|
||||
id: Mapped[str] = mapped_column(String, primary_key=True, default=new_id)
|
||||
title: Mapped[str] = mapped_column(String, nullable=False)
|
||||
kicker: Mapped[str | None] = mapped_column(String)
|
||||
image: Mapped[str | None] = mapped_column(String)
|
||||
sortOrder: Mapped[int] = mapped_column(Integer, default=0, nullable=False)
|
||||
isActive: Mapped[bool] = mapped_column(Boolean, default=True, nullable=False)
|
||||
createdAt: Mapped[datetime] = mapped_column(DateTime, default=utc_now, nullable=False)
|
||||
updatedAt: Mapped[datetime] = mapped_column(DateTime, default=utc_now, onupdate=utc_now, nullable=False)
|
||||
|
||||
|
||||
class VehicleOption(AdminOwnedContent, Base):
|
||||
__tablename__ = "VehicleOption"
|
||||
|
||||
@@ -181,36 +168,6 @@ class VehicleOption(AdminOwnedContent, Base):
|
||||
updatedAt: Mapped[datetime] = mapped_column(DateTime, default=utc_now, onupdate=utc_now, nullable=False)
|
||||
|
||||
|
||||
class VehicleServiceConfig(AdminOwnedContent, Base):
|
||||
__tablename__ = "VehicleServiceConfig"
|
||||
|
||||
id: Mapped[str] = mapped_column(String, primary_key=True, default=new_id)
|
||||
introTitle: Mapped[str] = mapped_column(String, nullable=False)
|
||||
intro: Mapped[str] = mapped_column(Text, nullable=False)
|
||||
serviceSections: Mapped[list[dict[str, str]]] = mapped_column(JSONB, default=list, nullable=False)
|
||||
advantages: Mapped[list[str]] = mapped_column(JSONB, default=list, nullable=False)
|
||||
processSteps: Mapped[list[dict[str, str]]] = mapped_column(JSONB, default=list, nullable=False)
|
||||
isActive: Mapped[bool] = mapped_column(Boolean, default=True, nullable=False)
|
||||
createdAt: Mapped[datetime] = mapped_column(DateTime, default=utc_now, nullable=False)
|
||||
updatedAt: Mapped[datetime] = mapped_column(DateTime, default=utc_now, onupdate=utc_now, nullable=False)
|
||||
|
||||
|
||||
class HomeExperience(AdminOwnedContent, Base):
|
||||
__tablename__ = "HomeExperience"
|
||||
|
||||
id: Mapped[str] = mapped_column(String, primary_key=True, default=new_id)
|
||||
badge: Mapped[str] = mapped_column(String, nullable=False)
|
||||
category: Mapped[str] = mapped_column(String, nullable=False)
|
||||
title: Mapped[str] = mapped_column(String, nullable=False)
|
||||
englishTitle: Mapped[str] = mapped_column(String, nullable=False)
|
||||
image: Mapped[str] = mapped_column(String, nullable=False)
|
||||
demandKeyword: Mapped[str] = mapped_column(String, nullable=False)
|
||||
isActive: Mapped[bool] = mapped_column(Boolean, default=True, nullable=False, index=True)
|
||||
sortOrder: Mapped[int] = mapped_column(Integer, default=0, nullable=False, index=True)
|
||||
createdAt: Mapped[datetime] = mapped_column(DateTime, default=utc_now, nullable=False)
|
||||
updatedAt: Mapped[datetime] = mapped_column(DateTime, default=utc_now, onupdate=utc_now, nullable=False)
|
||||
|
||||
|
||||
class HomeTeamBuilding(AdminOwnedContent, Base):
|
||||
__tablename__ = "HomeTeamBuilding"
|
||||
|
||||
@@ -338,49 +295,6 @@ class ConciergeAdvisor(AdminOwnedContent, Base):
|
||||
updatedAt: Mapped[datetime] = mapped_column(DateTime, default=utc_now, onupdate=utc_now, nullable=False)
|
||||
|
||||
|
||||
class DemandHero(AdminOwnedContent, Base):
|
||||
__tablename__ = "DemandHero"
|
||||
|
||||
id: Mapped[str] = mapped_column(String, primary_key=True, default=new_id)
|
||||
title: Mapped[str] = mapped_column(String, nullable=False)
|
||||
kicker: Mapped[str | None] = mapped_column(String)
|
||||
description: Mapped[str | None] = mapped_column(Text)
|
||||
steps: Mapped[list[str]] = mapped_column(ARRAY(String), default=list, nullable=False)
|
||||
sortOrder: Mapped[int] = mapped_column(Integer, default=0, nullable=False)
|
||||
isActive: Mapped[bool] = mapped_column(Boolean, default=True, nullable=False)
|
||||
createdAt: Mapped[datetime] = mapped_column(DateTime, default=utc_now, nullable=False)
|
||||
updatedAt: Mapped[datetime] = mapped_column(DateTime, default=utc_now, onupdate=utc_now, nullable=False)
|
||||
|
||||
|
||||
class DemandFeatureCard(AdminOwnedContent, Base):
|
||||
__tablename__ = "DemandFeatureCard"
|
||||
|
||||
id: Mapped[str] = mapped_column(String, primary_key=True, default=new_id)
|
||||
title: Mapped[str] = mapped_column(String, nullable=False)
|
||||
description: Mapped[str | None] = mapped_column(Text)
|
||||
sortOrder: Mapped[int] = mapped_column(Integer, default=0, nullable=False)
|
||||
isActive: Mapped[bool] = mapped_column(Boolean, default=True, nullable=False)
|
||||
createdAt: Mapped[datetime] = mapped_column(DateTime, default=utc_now, nullable=False)
|
||||
updatedAt: Mapped[datetime] = mapped_column(DateTime, default=utc_now, onupdate=utc_now, nullable=False)
|
||||
|
||||
|
||||
class DemandForm(AdminOwnedContent, Base):
|
||||
__tablename__ = "DemandForm"
|
||||
|
||||
id: Mapped[str] = mapped_column(String, primary_key=True, default=new_id)
|
||||
destinationLabel: Mapped[str] = mapped_column(String, default="目的地/玩法", nullable=False)
|
||||
destinationPlaceholder: Mapped[str | None] = mapped_column(String)
|
||||
phoneLabel: Mapped[str] = mapped_column(String, default="联系方式", nullable=False)
|
||||
phonePlaceholder: Mapped[str | None] = mapped_column(String)
|
||||
noteLabel: Mapped[str] = mapped_column(String, default="补充说明", nullable=False)
|
||||
notePlaceholder: Mapped[str | None] = mapped_column(String)
|
||||
submitLabel: Mapped[str] = mapped_column(String, default="提交出行需求", nullable=False)
|
||||
chips: Mapped[list[str]] = mapped_column(ARRAY(String), default=list, nullable=False)
|
||||
isActive: Mapped[bool] = mapped_column(Boolean, default=True, nullable=False)
|
||||
createdAt: Mapped[datetime] = mapped_column(DateTime, default=utc_now, nullable=False)
|
||||
updatedAt: Mapped[datetime] = mapped_column(DateTime, default=utc_now, onupdate=utc_now, nullable=False)
|
||||
|
||||
|
||||
class Lead(AdminOwnedContent, Base):
|
||||
__tablename__ = "Lead"
|
||||
|
||||
@@ -447,17 +361,6 @@ class Order(Base):
|
||||
customer: Mapped[Customer | None] = relationship(back_populates="orders")
|
||||
|
||||
|
||||
class SiteVersion(Base):
|
||||
__tablename__ = "SiteVersion"
|
||||
|
||||
id: Mapped[str] = mapped_column(String, primary_key=True, default=new_id)
|
||||
title: Mapped[str] = mapped_column(String, nullable=False)
|
||||
status: Mapped[str] = mapped_column(String, default="draft", nullable=False)
|
||||
snapshot: Mapped[dict | list] = mapped_column(JSONB, nullable=False)
|
||||
publishedAt: Mapped[datetime | None] = mapped_column(DateTime)
|
||||
createdAt: Mapped[datetime] = mapped_column(DateTime, default=utc_now, nullable=False)
|
||||
|
||||
|
||||
class AuditLog(Base):
|
||||
__tablename__ = "AuditLog"
|
||||
|
||||
|
||||
Reference in new issue
Block a user