Parcourir la source

fix: total_page_count类型str→int,修复支付宝返回int时报验证错误

alphah il y a 2 semaines
Parent
commit
ebb0fd44b4

+ 1 - 1
backend/app/plugin/module_payment/expense/quota/schema.py

@@ -277,7 +277,7 @@ class IssueBatchRecordsQueryOutSchema(BaseModel):
 
     page_num: int = Field(description="页码")
     page_size: int = Field(description="页大小")
-    total_page_count: str = Field(default="0", description="总页数")
+    total_page_count: int = Field(default=0, description="总页数")
     issue_record_info_list: Optional[list[IssueRecordInfoItem]] = Field(
         default=None, description="发放记录信息列表"
     )

+ 1 - 1
backend/app/plugin/module_payment/expense/quota/service.py

@@ -682,7 +682,7 @@ class QuotaService:
         return IssueBatchRecordsQueryOutSchema(
             page_num=getattr(result, 'page_num', data.page_num),
             page_size=getattr(result, 'page_size', data.page_size),
-            total_page_count=getattr(result, 'total_page_count', "0"),
+            total_page_count=getattr(result, 'total_page_count', 0),
             issue_record_info_list=record_list,
         )
 

+ 1 - 1
frontend/src/api/module_payment/quota.ts

@@ -227,7 +227,7 @@ export interface IssueRecordInfoItem {
 export interface IssueBatchRecordsResp {
   page_num: number;
   page_size: number;
-  total_page_count: string;
+  total_page_count: number;
   issue_record_info_list?: IssueRecordInfoItem[];
 }