Merge branch 'dev-lzh-1029' into dev

This commit is contained in:
lzh 2025-11-07 13:50:32 +08:00
commit 5473324d2d
3 changed files with 11 additions and 11 deletions

View File

@ -12291,7 +12291,7 @@ type MetricsBundlePurchaseItem struct {
PaymentAmount float32 `protobuf:"fixed32,11,opt,name=paymentAmount,proto3" json:"paymentAmount,omitempty"`
FinalAmount float32 `protobuf:"fixed32,12,opt,name=finalAmount,proto3" json:"finalAmount,omitempty"`
FeeAmount float32 `protobuf:"fixed32,13,opt,name=feeAmount,proto3" json:"feeAmount,omitempty"`
Rate float32 `protobuf:"fixed32,14,opt,name=rate,proto3" json:"rate,omitempty"`
Rate int64 `protobuf:"varint,14,opt,name=rate,proto3" json:"rate,omitempty"`
}
func (x *MetricsBundlePurchaseItem) Reset() {
@ -12417,7 +12417,7 @@ func (x *MetricsBundlePurchaseItem) GetFeeAmount() float32 {
return 0
}
func (x *MetricsBundlePurchaseItem) GetRate() float32 {
func (x *MetricsBundlePurchaseItem) GetRate() int64 {
if x != nil {
return x.Rate
}
@ -15470,7 +15470,7 @@ var file_pb_bundle_proto_rawDesc = []byte{
0x6e, 0x61, 0x6c, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x66, 0x65, 0x65,
0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x02, 0x52, 0x09, 0x66, 0x65,
0x65, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x61, 0x74, 0x65, 0x18,
0x0e, 0x20, 0x01, 0x28, 0x02, 0x52, 0x04, 0x72, 0x61, 0x74, 0x65, 0x22, 0x35, 0x0a, 0x1d, 0x4d,
0x0e, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x72, 0x61, 0x74, 0x65, 0x22, 0x35, 0x0a, 0x1d, 0x4d,
0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x41, 0x72, 0x74, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f,
0x75, 0x6e, 0x74, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05,
0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x6f, 0x6e,

View File

@ -7,8 +7,8 @@ import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/protobuf/types/descriptorpb"
_ "github.com/mwitkow/go-proto-validators"
_ "google.golang.org/protobuf/types/descriptorpb"
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
)

View File

@ -83,9 +83,9 @@ func MetricsBundlePurchaseExport(ctx *gin.Context) {
f.SetCellValue(sheet, fmt.Sprintf("B%d", endRow), "合计结算金额(美元)")
f.SetCellValue(sheet, fmt.Sprintf("C%d", endRow), "合计手续费金额(美元)")
f.SetCellValue(sheet, fmt.Sprintf("A%d", endRow+1), fmt.Sprintf("%.2f", lo.SumBy(data, func(i *bundle.MetricsBundlePurchaseItem) float32 { return i.PaymentAmount })))
f.SetCellValue(sheet, fmt.Sprintf("B%d", endRow+1), fmt.Sprintf("%.2f", lo.SumBy(data, func(i *bundle.MetricsBundlePurchaseItem) float32 { return i.FinalAmount })))
f.SetCellValue(sheet, fmt.Sprintf("C%d", endRow+1), fmt.Sprintf("%.2f", lo.SumBy(data, func(i *bundle.MetricsBundlePurchaseItem) float32 { return i.FeeAmount })))
f.SetCellValue(sheet, fmt.Sprintf("A%d", endRow+1), fmt.Sprintf("$%.2f", lo.SumBy(data, func(i *bundle.MetricsBundlePurchaseItem) float32 { return i.PaymentAmount })))
f.SetCellValue(sheet, fmt.Sprintf("B%d", endRow+1), fmt.Sprintf("$%.2f", lo.SumBy(data, func(i *bundle.MetricsBundlePurchaseItem) float32 { return i.FinalAmount })))
f.SetCellValue(sheet, fmt.Sprintf("C%d", endRow+1), fmt.Sprintf("$%.2f", lo.SumBy(data, func(i *bundle.MetricsBundlePurchaseItem) float32 { return i.FeeAmount })))
// 创建黑色边框样式
borderStyle, err := f.NewStyle(&excelize.Style{
Border: []excelize.Border{
@ -171,7 +171,7 @@ func MetricsArtistAccountExport(ctx *gin.Context) {
cell := fmt.Sprintf("%s%d", col, row)
return f.SetCellValue(sheet, cell, v)
}
_ = write(1, r)
_ = write(1, r+1)
_ = write(2, it.ArtistName)
_ = write(3, it.UserNum)
_ = write(4, it.DmAccount)
@ -234,7 +234,7 @@ func MetricsVideoSubmitExport(ctx *gin.Context) {
cell := fmt.Sprintf("%s%d", col, row)
return f.SetCellValue(sheet, cell, v)
}
_ = write(1, r)
_ = write(1, r+1)
_ = write(2, it.ArtistName)
_ = write(3, it.UserNum)
_ = write(4, it.VideoTitle)
@ -301,8 +301,8 @@ func MetricsBalanceDetailExport(ctx *gin.Context) {
BundleAmount: item.BundleAmount,
IncreaseAmount: item.IncreaseAmount,
TotalPayAmount: item.TotalPayAmount,
Currency: item.Currency,
Fee: item.Fee,
Currency: "美元",
Fee: "$" + item.Fee,
BundleVideoNumber: item.BundleVideoNumber,
IncreaseVideoNumber: item.IncreaseVideoNumber,
BundleVideoUnitPrice: item.BundleVideoUnitPrice,