fix:基础信息

This commit is contained in:
momo
2023-09-21 14:26:14 +08:00
parent e01884cce6
commit 1605da27bf
4 changed files with 29 additions and 14 deletions

View File

@@ -91,9 +91,9 @@ type GetAmountCurrencyUSDReq struct {
// 处理金额(元)
func GetAmountCurrencyFormat(req *gmodel.AmountCurrency) (res gmodel.AmountCurrency) {
return gmodel.AmountCurrency{
ExchangeRate: format.CentitoDollarStr(req.ExchangeRate.(int64)),
CurrentAmount: format.CentitoDollarStr(req.CurrentAmount.(int64)),
OriginalAmount: format.CentitoDollarStr(req.OriginalAmount.(int64)),
ExchangeRate: format.CentitoDollarStr(req.ExchangeRate.(float64)),
CurrentAmount: format.CentitoDollarStr(req.CurrentAmount.(float64)),
OriginalAmount: format.CentitoDollarStr(req.OriginalAmount.(float64)),
CurrentCurrency: req.CurrentCurrency,
OriginalCurrency: req.OriginalCurrency,
}
@@ -101,6 +101,8 @@ func GetAmountCurrencyFormat(req *gmodel.AmountCurrency) (res gmodel.AmountCurre
// 处理金额(元)
func GetAmountInfoFormat(req *gmodel.AmountInfo) gmodel.AmountInfo {
Current := GetAmountCurrencyFormat(&req.Current)
fmt.Println(Current)
return gmodel.AmountInfo{
Change: GetAmountCurrencyFormat(&req.Change),
ChangeRemark: req.ChangeRemark,