Quellcode durchsuchen

refactor(contract): 请求体去除 bundle_type(合同包类型) 字段

天空之城 vor 3 Wochen
Ursprung
Commit
5804804f9f

+ 0 - 3
alien_contract/schemas/request/contract.py

@@ -3,8 +3,6 @@ from typing import Literal
 
 from pydantic import BaseModel, Field, field_validator
 
-BundleType = Literal["STORE_STANDARD", "LAWYER_STANDARD"]
-
 
 class BundleCreateRequest(BaseModel):
     subject_type: Literal["store", "lawyer"] = Field(description="主体类型")
@@ -14,7 +12,6 @@ class BundleCreateRequest(BaseModel):
     contact_name: str = Field(description="联系人姓名")
     contact_phone: str = Field(description="联系电话")
     ord_id: str = Field(description="统一社会信用代码")
-    bundle_type: BundleType | None = Field(default=None, description="合同包类型,支持 STORE_STANDARD 或 LAWYER_STANDARD")
 
     @field_validator("contact_phone")
     @classmethod

+ 1 - 1
alien_contract/services/contract_server.py

@@ -58,7 +58,7 @@ class ContractCenterService:
         self.repo = ContractRepository(db)
 
     async def create_bundle(self, req: BundleCreateRequest) -> dict:
-        bundle_type = req.bundle_type or DEFAULT_BUNDLE_BY_SUBJECT[req.subject_type]
+        bundle_type = DEFAULT_BUNDLE_BY_SUBJECT[req.subject_type]
         configs = BUNDLE_CONFIGS.get(bundle_type)
         if not configs:
             return {"success": False, "message": "不支持的合同包类型", "raw": {"bundle_type": bundle_type}}

+ 0 - 1
alien_lawyer/api/router.py

@@ -56,7 +56,6 @@ async def create_esign_templates(
         contact_name=templates_data.contact_name,
         contact_phone=templates_data.contact_phone,
         ord_id=templates_data.ord_id,
-        bundle_type="LAWYER_STANDARD",
     )
     result = await templates_server.create_bundle(request)
     if not result.get("success"):

+ 0 - 1
alien_store/api/router.py

@@ -64,7 +64,6 @@ async def create_esign_templates(
         contact_name=templates_data.merchant_name,
         contact_phone=templates_data.contact_phone,
         ord_id=templates_data.ord_id,
-        bundle_type="STORE_STANDARD",
     )
     result = await templates_server.create_bundle(request)
     if not result.get("success"):