Compare commits

..

No commits in common. "7728d186494abe4c797a700d07c90ddd0e1225c8" and "ddb1d66185963951ee5f8783f4d739212032f3e9" have entirely different histories.

View File

@ -8,7 +8,6 @@ import (
"micro-bundle/internal/model"
"micro-bundle/pb/bundle"
"strings"
"time"
"go.uber.org/zap"
)
@ -458,26 +457,14 @@ func (b *BundleProvider) GetArtistUploadStatsList(_ context.Context, req *bundle
}
// 转换响应数据
formatTime := func(s string) string {
if s == "" {
return ""
}
if t, err := time.Parse(time.RFC3339, s); err == nil {
return t.Format("2006-01-02 15:04:05")
}
if _, err := time.Parse("2006-01-02 15:04:05", s); err == nil {
return s
}
return s
}
respItems := make([]*bundle.ArtistUploadStatsItem, 0, len(items))
for _, it := range items {
respItems = append(respItems, &bundle.ArtistUploadStatsItem{
SubNum: it.SubNum,
ArtistName: it.UserName,
TelNum: it.UserPhoneNumber,
StartAt: formatTime(it.StartAt),
ExpiredAt: formatTime(it.ExpiredAt),
StartAt: it.StartAt,
ExpiredAt: it.ExpiredAt,
UploadedVideoCount: int32(it.UploadedVideoCount),
BundleVideoTotal: int32(it.BundleVideoTotal),
IncreaseVideoTotal: int32(it.IncreaseVideoTotal),