fix: tax_type

master
howell 3 years ago
parent 7738f98047
commit 9a5a48b3b8

@ -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

Loading…
Cancel
Save