fix(topup):修复商户充值中的自动复制对应关系。
This commit is contained in:
parent
06f86e3cd4
commit
1db60a0e4f
|
@ -51,8 +51,10 @@ func listTopUps(c *fiber.Ctx) error {
|
|||
topUpLog.Error("查询符合条件的商户充值记录,查询失败", zap.Error(err))
|
||||
return result.Error(fiber.StatusInternalServerError, "商户充值记录查询不成功")
|
||||
}
|
||||
var topUpDetails []*vo.TopUpDetailQueryResponse
|
||||
topUpLog.Debug("检查获取到的数据", zap.Any("topUps", topUps), zap.Int64("total", total))
|
||||
topUpDetails := make([]*vo.TopUpDetailQueryResponse, 0)
|
||||
copier.Copy(&topUpDetails, &topUps)
|
||||
topUpLog.Debug("检查转换后的数据", zap.Any("topUpDetails", topUpDetails))
|
||||
return result.Success(
|
||||
"已经获取到符合条件的商户充值记录",
|
||||
response.NewPagedResponse(page, total).ToMap(),
|
||||
|
|
10
vo/top_up.go
10
vo/top_up.go
|
@ -1,6 +1,10 @@
|
|||
package vo
|
||||
|
||||
import "github.com/shopspring/decimal"
|
||||
import (
|
||||
"electricity_bill_calc/types"
|
||||
|
||||
"github.com/shopspring/decimal"
|
||||
)
|
||||
|
||||
type TopUpCreationForm struct {
|
||||
Tenement string `json:"tenement"`
|
||||
|
@ -9,12 +13,12 @@ type TopUpCreationForm struct {
|
|||
}
|
||||
|
||||
type TopUpDetailQueryResponse struct {
|
||||
Id string `json:"id" copier:"topUpCode"`
|
||||
Id string `json:"id" copier:"TopUpCode"`
|
||||
Tenement string `json:"tenement"`
|
||||
TenementName string `json:"tenementName"`
|
||||
Meter string `json:"meter"`
|
||||
MeterAddress string `json:"meterAddress"`
|
||||
ToppedUpAt string `json:"toppedUpAt"`
|
||||
ToppedUpAt types.DateTime `json:"toppedUpAt"`
|
||||
Amount decimal.Decimal `json:"amount"`
|
||||
PaymentType int16 `json:"paymentType"`
|
||||
SyncStatus int16 `json:"syncStatus" copier:"SyncStatus"`
|
||||
|
|
Loading…
Reference in New Issue
Block a user