From b822d8e8cf97711d606cbde0e9c1c220b1559ff3 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Fri, 2 Aug 2024 14:25:17 +0800 Subject: [PATCH] 1 --- server/marketserver/api/v1/user/user.go | 3 +++ server/marketserver/service/recharge.go | 15 +++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/server/marketserver/api/v1/user/user.go b/server/marketserver/api/v1/user/user.go index 37322d59..5d804f8c 100644 --- a/server/marketserver/api/v1/user/user.go +++ b/server/marketserver/api/v1/user/user.go @@ -18,8 +18,11 @@ func (this *UserApi) Info(c *gin.Context) { rspObj := struct { ErrCode int32 `json:"errcode"` ErrMsg string `json:"errmsg"` + NickName string `json:"nickname"` + Email string `json:"email"` ContributionPoint string `json:"contribution_point"` Gold string `json:"gold"` + Diamond string `json:"diamond"` }{ } var contributionPoint float64 diff --git a/server/marketserver/service/recharge.go b/server/marketserver/service/recharge.go index c3dccd67..0481c46f 100644 --- a/server/marketserver/service/recharge.go +++ b/server/marketserver/service/recharge.go @@ -1,6 +1,7 @@ package service import ( + "q5" "f5" "main/constant" ) @@ -10,14 +11,28 @@ func AddRechargeOrder(accountId string, orderId string, shortOrderId string, currencyAddress string, currencyName string, itemId int32, itemNum int64, price string) bool { ok := false + nowTime := f5.GetApp().GetRealSeconds() f5.GetGoStyleDb().UpsertEx( constant.BCNFT_DB, "t_recharge_order", [][]string{ + {"short_order_id", shortOrderId}, }, [][]string{ }, [][]string{ + {"account_id", accountId}, + {"order_id", orderId}, + {"short_order_id", shortOrderId}, + {"account_address", accountAddress}, + {"passport_address", passportAddress}, + {"currency_name", currencyName}, + {"currency_address", currencyAddress}, + {"item_id", q5.ToString(itemId)}, + {"item_num", q5.ToString(itemNum)}, + {"price", price}, + {"createtime", q5.ToString(nowTime)}, + {"modifytime", q5.ToString(nowTime)}, }, func (err error, lastInsertId int64, rowsAffected int64) { ok = err == nil