Ver Fonte

fix: 提现接口增加remark可选参数

alphah há 1 semana atrás
pai
commit
deb252492d

+ 1 - 0
backend/app/plugin/module_payment/account/schema.py

@@ -150,6 +150,7 @@ class AccountWithdrawSchema(BaseModel):
     enterprise_id: str = Field(description="企业ID")
     account_book_id: str = Field(description="资金专户号")
     amount: Decimal = Field(max_digits=10, decimal_places=2, gt=0, description="提现金额")
+    remark: Optional[str] = Field(default=None, description="提现备注")
 
 
 class AccountQuerySchema(BaseModel):

+ 2 - 0
backend/app/plugin/module_payment/account/service.py

@@ -530,6 +530,8 @@ class AccountService:
         model.account_book_id = data.account_book_id
         model.amount = str(data.amount)
         model.out_biz_no = get_snowflake_id_str(auth.tenant_id)
+        if data.remark:
+            model.remark = data.remark
 
         request = AlipayCommerceEcTransAccountWithdrawRequest()
         request.biz_model = model