Compare commits
No commits in common. "7728d186494abe4c797a700d07c90ddd0e1225c8" and "ddb1d66185963951ee5f8783f4d739212032f3e9" have entirely different histories.
7728d18649
...
ddb1d66185
@ -8,7 +8,6 @@ import (
|
|||||||
"micro-bundle/internal/model"
|
"micro-bundle/internal/model"
|
||||||
"micro-bundle/pb/bundle"
|
"micro-bundle/pb/bundle"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
|
||||||
|
|
||||||
"go.uber.org/zap"
|
"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))
|
respItems := make([]*bundle.ArtistUploadStatsItem, 0, len(items))
|
||||||
for _, it := range items {
|
for _, it := range items {
|
||||||
respItems = append(respItems, &bundle.ArtistUploadStatsItem{
|
respItems = append(respItems, &bundle.ArtistUploadStatsItem{
|
||||||
SubNum: it.SubNum,
|
SubNum: it.SubNum,
|
||||||
ArtistName: it.UserName,
|
ArtistName: it.UserName,
|
||||||
TelNum: it.UserPhoneNumber,
|
TelNum: it.UserPhoneNumber,
|
||||||
StartAt: formatTime(it.StartAt),
|
StartAt: it.StartAt,
|
||||||
ExpiredAt: formatTime(it.ExpiredAt),
|
ExpiredAt: it.ExpiredAt,
|
||||||
UploadedVideoCount: int32(it.UploadedVideoCount),
|
UploadedVideoCount: int32(it.UploadedVideoCount),
|
||||||
BundleVideoTotal: int32(it.BundleVideoTotal),
|
BundleVideoTotal: int32(it.BundleVideoTotal),
|
||||||
IncreaseVideoTotal: int32(it.IncreaseVideoTotal),
|
IncreaseVideoTotal: int32(it.IncreaseVideoTotal),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user