完善虎牙外部单展示、状态恢复与礼包配置
This commit is contained in:
+25
-1
@@ -10,6 +10,9 @@ from .huya_defaults import (
|
||||
HUYA_DEFAULT_BIND_GID,
|
||||
HUYA_DEFAULT_OUTER_ACT_ID,
|
||||
HUYA_DEFAULT_PAY_CHANNEL,
|
||||
HUYA_DEFAULT_POINTS_PAGE_CODE,
|
||||
HUYA_DEFAULT_POINTS_SCENE,
|
||||
HUYA_DEFAULT_POINTS_SOURCE_ID,
|
||||
HUYA_DEFAULT_ROOM_PID,
|
||||
HUYA_DEFAULT_SID,
|
||||
)
|
||||
@@ -1158,6 +1161,11 @@ class HuyaConfigOut(BaseModel):
|
||||
bind_gid: str = HUYA_DEFAULT_BIND_GID
|
||||
bind_act_id: str = HUYA_DEFAULT_BIND_ACT_ID
|
||||
pay_channel: str = HUYA_DEFAULT_PAY_CHANNEL
|
||||
points_page_code: str = HUYA_DEFAULT_POINTS_PAGE_CODE
|
||||
points_source_id: str = HUYA_DEFAULT_POINTS_SOURCE_ID
|
||||
points_scene: str = HUYA_DEFAULT_POINTS_SCENE
|
||||
points_page_id: str = ""
|
||||
points_tab_ids: str = ""
|
||||
updated_at: datetime | None = None
|
||||
|
||||
@model_serializer
|
||||
@@ -1169,6 +1177,11 @@ class HuyaConfigOut(BaseModel):
|
||||
"bind_gid": self.bind_gid,
|
||||
"bind_act_id": self.bind_act_id,
|
||||
"pay_channel": self.pay_channel,
|
||||
"points_page_code": self.points_page_code,
|
||||
"points_source_id": self.points_source_id,
|
||||
"points_scene": self.points_scene,
|
||||
"points_page_id": self.points_page_id,
|
||||
"points_tab_ids": self.points_tab_ids,
|
||||
"updated_at": _isoformat(self.updated_at),
|
||||
}
|
||||
|
||||
@@ -1180,6 +1193,11 @@ class HuyaConfigUpdate(BaseModel):
|
||||
bind_gid: str | None = None
|
||||
bind_act_id: str | None = None
|
||||
pay_channel: str | None = None
|
||||
points_page_code: str | None = None
|
||||
points_source_id: str | None = None
|
||||
points_scene: str | None = None
|
||||
points_page_id: str | None = None
|
||||
points_tab_ids: str | None = None
|
||||
|
||||
|
||||
class HuyaTaskBatchRequest(BaseModel):
|
||||
@@ -1727,6 +1745,7 @@ class HuyaCollabCkPreviewOut(BaseModel):
|
||||
uid: str = ""
|
||||
yyuid: str = ""
|
||||
hy_username: str = ""
|
||||
nickname: str = ""
|
||||
ck_status: str = "unverified"
|
||||
bind_game_account: str = ""
|
||||
bind_game_role: str = ""
|
||||
@@ -1745,7 +1764,7 @@ class HuyaExternalOrderCreate(BaseModel):
|
||||
礼包名 / **主页截图**必填,且 CK 必须探针通并读到绑定角色;粘贴导入不走这条路。
|
||||
|
||||
``draft``(默认关):先建单后补资料 —— 只登记订单号 + 店铺,状态进「待补资料」,
|
||||
CK / 礼包名 / 主页截图都可以稍后在详情里补(2026-10-17 用户需求)。
|
||||
CK / 礼包名 / 主页截图都可以稍后在详情里补;带了 CK 仍会自动跑一次只读探针。
|
||||
"""
|
||||
|
||||
order_no: str = Field(..., min_length=1, max_length=64)
|
||||
@@ -1785,6 +1804,8 @@ class HuyaExternalOrderStatusRequest(BaseModel):
|
||||
reason: str = Field("", max_length=256)
|
||||
# 目标不是「向前一步」时必须显式置 True,避免误点把状态改回去。
|
||||
rollback: bool = False
|
||||
# 仅超级管理员可用:从「已作废」强制恢复,必须同时填写 reason。
|
||||
force: bool = False
|
||||
expected_version: int | None = None
|
||||
|
||||
|
||||
@@ -1858,6 +1879,7 @@ class HuyaExternalOrderVerifyItemOut(BaseModel):
|
||||
ok: bool = False
|
||||
ck_status: str = ""
|
||||
message: str = ""
|
||||
nickname: str = ""
|
||||
binding: dict[str, str] = Field(default_factory=dict)
|
||||
|
||||
|
||||
@@ -1878,6 +1900,8 @@ class HuyaExternalOrderStatusBatchRequest(BaseModel):
|
||||
reason: str = Field("", max_length=256)
|
||||
# 目标不是「向前」时必须显式置 True(和单行接口一致,避免误点)
|
||||
rollback: bool = False
|
||||
# 仅超级管理员可用;混合批次里只对 void 行生效,必须同时填写 reason。
|
||||
force: bool = False
|
||||
|
||||
|
||||
class HuyaExternalOrderStatusBatchItemOut(BaseModel):
|
||||
|
||||
Reference in New Issue
Block a user