From 9a5a48b3b88214d7aa6c5d92d32c11275905e09b Mon Sep 17 00:00:00 2001 From: howell <2827207845@qq.com> Date: Thu, 7 Apr 2022 14:43:18 +0800 Subject: [PATCH] fix: tax_type --- internal/api/mobile/users/my_info.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/api/mobile/users/my_info.go b/internal/api/mobile/users/my_info.go index a7a5db8..c06d64c 100644 --- a/internal/api/mobile/users/my_info.go +++ b/internal/api/mobile/users/my_info.go @@ -14,6 +14,7 @@ import ( "recook/internal/service/app/orders" "recook/internal/service/app/tree" "recook/internal/service/comFunc" + "recook/internal/v2/model/company" "recook/internal/v2/model/jyy" manage "recook/internal/v2/model/recook/order" "recook/tools" @@ -49,6 +50,7 @@ type MyInfoResp struct { Deposit decimal.Decimal `json:"deposit"` IsEnterprise bool `json:"is_enterprise"` AllDeposit decimal.Decimal `json:"all_deposit"` + Tax string `json:"tax"` } type Notify struct { @@ -186,6 +188,8 @@ func MyInfo(c *gin.Context) { var collectNum int64 dbc.DB.Table((&goods.Favorites{}).TableName()).Where("user_id=?", p.UserID).Count(&collectNum) + var company company.Info + dbc.DB.First(&company, "user_id = ?", userInfo.ID) // 组装返回 var res = MyInfoResp{ Balance: uWallet.Balance, @@ -237,6 +241,7 @@ func MyInfo(c *gin.Context) { Start: &userInfo.VipUpgradeStart.Time, End: &userInfo.VipUpgradeEnd.Time, IsEnterprise: userInfo.IsEnterprise, + Tax: company.TaxType, } back.Suc(c, "操作成功", &res) return