Compare commits
10 Commits
feat-hjj-U
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c0bfd322a8 | ||
|
|
e9bef82968 | ||
|
|
aae7aa077b | ||
|
|
61e5a69484 | ||
|
|
0524d503f3 | ||
|
|
36a751b8ac | ||
|
|
7f5384c935 | ||
|
|
137e752c1b | ||
| 8b85aeee28 | |||
| bbe0c0390c |
@ -135,11 +135,11 @@ func GetBundleBalanceList(req *bundle.GetBundleBalanceListReq) (data []model.Bun
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if req.Month == "" {
|
if len(req.Month) == 0 {
|
||||||
newestMonthQuery := app.ModuleClients.BundleDB.Model(&model.BundleBalance{}).Select("max(month) as month,user_id").Group("user_id")
|
newestMonthQuery := app.ModuleClients.BundleDB.Model(&model.BundleBalance{}).Select("max(month) as month,user_id").Group("user_id")
|
||||||
session.Joins("LEFT JOIN (?) as newest_month on newest_month.user_id = bb.user_id", newestMonthQuery).Where("")
|
session.Joins("LEFT JOIN (?) as newest_month on newest_month.user_id = bb.user_id", newestMonthQuery).Where("")
|
||||||
} else {
|
} else {
|
||||||
session = session.Where("bb.month = ?", req.Month)
|
session = session.Where("bb.month in (?)", req.Month)
|
||||||
}
|
}
|
||||||
err = session.Count(&total).Error
|
err = session.Count(&total).Error
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import (
|
|||||||
"micro-bundle/internal/model"
|
"micro-bundle/internal/model"
|
||||||
"micro-bundle/pb/bundle"
|
"micro-bundle/pb/bundle"
|
||||||
"micro-bundle/pkg/app"
|
"micro-bundle/pkg/app"
|
||||||
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/duke-git/lancet/v2/datetime"
|
"github.com/duke-git/lancet/v2/datetime"
|
||||||
@ -1316,22 +1317,38 @@ func MetricsArtistAccountExport(req *bundle.MetricsArtistAccountExportReq) (*bun
|
|||||||
var start time.Time
|
var start time.Time
|
||||||
var end time.Time
|
var end time.Time
|
||||||
var err error
|
var err error
|
||||||
if req.Month != "" {
|
|
||||||
t, err := time.Parse("2006-01", req.Month)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
start = datetime.BeginOfMonth(t)
|
|
||||||
end = datetime.EndOfMonth(t)
|
|
||||||
} else {
|
|
||||||
start = time.Date(1970, 1, 1, 0, 0, 0, 0, time.UTC) // Unix 时间戳起始时间
|
|
||||||
end = time.Date(2099, 12, 31, 23, 59, 59, 0, time.UTC) // 设置一个很远的未来日期
|
|
||||||
}
|
|
||||||
subQuery := app.ModuleClients.BundleDB.Table("cast_media_account").
|
subQuery := app.ModuleClients.BundleDB.Table("cast_media_account").
|
||||||
Select("artist_uuid,any_value(artist_name) as artist_name,any_value(created_at) as created_at").
|
Select("artist_uuid,any_value(artist_name) as artist_name,any_value(created_at) as created_at").
|
||||||
Group("artist_uuid").
|
Group("artist_uuid").
|
||||||
Where("created_at >= ?", start.Unix()).Where("created_at <= ?", end.Unix()).
|
Where("deleted_at = 0 and expired != 2")
|
||||||
Where("deleted_at = 0")
|
//如果选择了月份
|
||||||
|
if len(req.Month) > 0 {
|
||||||
|
// 构建多个月份的时间范围条件(使用 OR 连接)
|
||||||
|
var conditions []string
|
||||||
|
var args []interface{}
|
||||||
|
for _, month := range req.Month {
|
||||||
|
t, err := time.Parse("2006-01", month)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
start = datetime.BeginOfMonth(t)
|
||||||
|
end = datetime.EndOfMonth(t)
|
||||||
|
// 为每个月添加时间范围条件
|
||||||
|
conditions = append(conditions, "(created_at >= ? AND created_at <= ?)")
|
||||||
|
args = append(args, start.Unix(), end.Unix())
|
||||||
|
}
|
||||||
|
// 使用 OR 连接所有月份条件
|
||||||
|
if len(conditions) > 0 {
|
||||||
|
subQuery = subQuery.Where(strings.Join(conditions, " OR "), args...)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
start = time.Date(1970, 1, 1, 0, 0, 0, 0, time.UTC) // Unix 时间戳起始时间
|
||||||
|
end = time.Date(2099, 12, 31, 23, 59, 59, 0, time.UTC) // 设置一个很远的未来日期
|
||||||
|
subQuery = subQuery.Where("created_at >= ?", start.Unix()).
|
||||||
|
Where("created_at <= ?", end.Unix())
|
||||||
|
}
|
||||||
|
|
||||||
query := app.ModuleClients.BundleDB.Table("( ? ) cma", subQuery).
|
query := app.ModuleClients.BundleDB.Table("( ? ) cma", subQuery).
|
||||||
Select(`tiktok.platform_user_id as tiktok_account,
|
Select(`tiktok.platform_user_id as tiktok_account,
|
||||||
tiktok.platform_user_name as tiktok_nickname,
|
tiktok.platform_user_name as tiktok_nickname,
|
||||||
@ -1351,21 +1368,18 @@ func MetricsArtistAccountExport(req *bundle.MetricsArtistAccountExportReq) (*bun
|
|||||||
cma.artist_name,
|
cma.artist_name,
|
||||||
bor.customer_num as user_num
|
bor.customer_num as user_num
|
||||||
`).
|
`).
|
||||||
Joins(`left join (SELECT * FROM cast_media_account where platform_id = 1 and deleted_at = 0) tiktok on tiktok.artist_uuid = cma.artist_uuid`).
|
Joins(`left join (SELECT * FROM cast_media_account where platform_id = 1 and deleted_at = 0 and expired != 2) tiktok on tiktok.artist_uuid = cma.artist_uuid`).
|
||||||
Joins(`left join (Select * from cast_media_auth where platform_id = 1 and deleted_at = 0) tiktok_auth on tiktok_auth.user_id = tiktok.user_id`).
|
Joins(`left join (Select * from cast_media_auth where platform_id = 1 and deleted_at = 0 ) tiktok_auth on tiktok_auth.user_id = tiktok.user_id`).
|
||||||
Joins(`left join (SELECT * FROM cast_media_account where platform_id = 4 and deleted_at = 0) dm on dm.artist_uuid = cma.artist_uuid`).
|
Joins(`left join (SELECT * FROM cast_media_account where platform_id = 4 and deleted_at = 0 and expired != 2) dm on dm.artist_uuid = cma.artist_uuid`).
|
||||||
Joins(`left join (Select * from cast_media_auth where platform_id = 4 and deleted_at = 0) dm_auth on dm_auth.user_id = dm.user_id`).
|
Joins(`left join (Select * from cast_media_auth where platform_id = 4 and deleted_at = 0) dm_auth on dm_auth.user_id = dm.user_id`).
|
||||||
Joins(`left join (SELECT * FROM cast_media_account where platform_id = 3 and deleted_at = 0) ins on ins.artist_uuid = cma.artist_uuid`).
|
Joins(`left join (SELECT * FROM cast_media_account where platform_id = 3 and deleted_at = 0 and expired != 2) ins on ins.artist_uuid = cma.artist_uuid`).
|
||||||
Joins(`left join (Select * from cast_media_auth where platform_id = 3 and deleted_at = 0) ins_auth on ins_auth.user_id = ins.user_id`).
|
Joins(`left join (Select * from cast_media_auth where platform_id = 3 and deleted_at = 0) ins_auth on ins_auth.user_id = ins.user_id`).
|
||||||
Joins(`left join (Select * from cast_media_account where platform_id = 2 and deleted_at = 0) youtube on youtube.artist_uuid = cma.artist_uuid`).
|
Joins(`left join (Select * from cast_media_account where platform_id = 2 and deleted_at = 0 and expired != 2) youtube on youtube.artist_uuid = cma.artist_uuid`).
|
||||||
Joins(`left join (Select * from cast_media_auth where platform_id = 2 and deleted_at = 0) youtube_auth on youtube_auth.user_id = youtube.user_id`).
|
Joins(`left join (Select * from cast_media_auth where platform_id = 2 and deleted_at = 0) youtube_auth on youtube_auth.user_id = youtube.user_id`).
|
||||||
Joins(`left join (Select * from cast_media_account where platform_id = 5 and deleted_at = 0) bluesky on bluesky.artist_uuid = cma.artist_uuid`).
|
Joins(`left join (Select * from cast_media_account where platform_id = 5 and deleted_at = 0 and expired != 2) bluesky on bluesky.artist_uuid = cma.artist_uuid`).
|
||||||
Joins(`left join (Select * from cast_media_auth where platform_id = 5 and deleted_at = 0) bluesky_auth on bluesky_auth.user_id = bluesky.user_id`).
|
Joins(`left join (Select * from cast_media_auth where platform_id = 5 and deleted_at = 0) bluesky_auth on bluesky_auth.user_id = bluesky.user_id`).
|
||||||
Joins(`left join bundle_order_records bor on bor.customer_id COLLATE utf8mb4_general_ci= cma.artist_uuid COLLATE utf8mb4_general_ci`).
|
Joins(`left join bundle_order_records bor on bor.customer_id COLLATE utf8mb4_general_ci= cma.artist_uuid COLLATE utf8mb4_general_ci`).
|
||||||
Where("bor.deleted_at is null")
|
Where("bor.deleted_at is null")
|
||||||
if req.Month != "" {
|
|
||||||
query = query.Where("cma.created_at >= ?", start.Unix()).Where("cma.created_at <= ?", end.Unix())
|
|
||||||
}
|
|
||||||
err = query.Find(&data.Data).Error
|
err = query.Find(&data.Data).Error
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@ -1376,7 +1390,7 @@ func MetricsArtistAccountExport(req *bundle.MetricsArtistAccountExportReq) (*bun
|
|||||||
func MetricsVideoSubmitExport(req *bundle.MetricsVideoSubmitExportReq) (result *bundle.MetricsVideoSubmitExportResp, err error) {
|
func MetricsVideoSubmitExport(req *bundle.MetricsVideoSubmitExportReq) (result *bundle.MetricsVideoSubmitExportResp, err error) {
|
||||||
result = &bundle.MetricsVideoSubmitExportResp{}
|
result = &bundle.MetricsVideoSubmitExportResp{}
|
||||||
var query *gorm.DB
|
var query *gorm.DB
|
||||||
if req.Month == "" {
|
if len(req.Month) == 0 {
|
||||||
query = app.ModuleClients.BundleDB.Table("cast_work AS cw").
|
query = app.ModuleClients.BundleDB.Table("cast_work AS cw").
|
||||||
Select(`cw.artist_name ,
|
Select(`cw.artist_name ,
|
||||||
cw.title as video_title,
|
cw.title as video_title,
|
||||||
@ -1391,22 +1405,61 @@ func MetricsVideoSubmitExport(req *bundle.MetricsVideoSubmitExportReq) (result *
|
|||||||
Where("(tiktok.created_at is not null or dm.created_at is not null or ins.created_at is not null) and cw.deleted_at = 0 and bor.deleted_at is null and cw.origin_uuid = ''").
|
Where("(tiktok.created_at is not null or dm.created_at is not null or ins.created_at is not null) and cw.deleted_at = 0 and bor.deleted_at is null and cw.origin_uuid = ''").
|
||||||
Order("cw.artist_name")
|
Order("cw.artist_name")
|
||||||
} else {
|
} else {
|
||||||
|
// 构建多个月份的时间范围参数
|
||||||
t, err := time.Parse("2006-01", req.Month)
|
var timeRanges []struct {
|
||||||
if err != nil {
|
Start int64
|
||||||
return nil, err
|
End int64
|
||||||
}
|
}
|
||||||
start := datetime.BeginOfMonth(t)
|
|
||||||
end := datetime.EndOfMonth(t)
|
|
||||||
query = app.ModuleClients.BundleDB.Table("cast_work AS cw").
|
|
||||||
Select(`cw.artist_name, cw.title AS video_title, tiktok.created_at AS tiktok_upload_time, dm.created_at AS dm_upload_time, ins.created_at AS instagram_upload_time, bor.customer_num AS user_num`).
|
|
||||||
Joins(`LEFT JOIN cast_work_platform_info tiktok ON tiktok.work_uuid = cw.uuid AND tiktok.platform_id = 1 AND tiktok.created_at >= ? AND tiktok.created_at <= ?`, start.Unix(), end.Unix()).
|
|
||||||
Joins(`LEFT JOIN cast_work_platform_info dm ON dm.work_uuid = cw.uuid AND dm.platform_id = 4 AND dm.created_at >= ? AND dm.created_at <= ?`, start.Unix(), end.Unix()).
|
|
||||||
Joins(`LEFT JOIN cast_work_platform_info ins ON ins.work_uuid = cw.uuid AND ins.platform_id = 3 AND ins.created_at >= ? AND ins.created_at <= ?`, start.Unix(), end.Unix()).
|
|
||||||
Joins(`LEFT JOIN bundle_order_records bor ON bor.customer_id COLLATE utf8mb4_general_ci = cw.artist_uuid COLLATE utf8mb4_general_ci AND bor.deleted_at IS NULL`).
|
|
||||||
Where(`cw.origin_uuid = '' and cw.deleted_at = 0 AND (tiktok.created_at IS NOT NULL OR dm.created_at IS NOT NULL OR ins.created_at IS NOT NULL)`).
|
|
||||||
Order("cw.artist_name")
|
|
||||||
|
|
||||||
|
for _, month := range req.Month {
|
||||||
|
t, err := time.Parse("2006-01", month)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
start := datetime.BeginOfMonth(t)
|
||||||
|
end := datetime.EndOfMonth(t)
|
||||||
|
timeRanges = append(timeRanges, struct {
|
||||||
|
Start int64
|
||||||
|
End int64
|
||||||
|
}{Start: start.Unix(), End: end.Unix()})
|
||||||
|
}
|
||||||
|
// 构建时间筛选 SQL 条件的辅助函数
|
||||||
|
buildTimeFilterSQL := func(tableAlias string) (string, []interface{}) {
|
||||||
|
if len(timeRanges) == 0 {
|
||||||
|
return "", nil
|
||||||
|
}
|
||||||
|
var conditions []string
|
||||||
|
var args []interface{}
|
||||||
|
for _, tr := range timeRanges {
|
||||||
|
// 明确指定表别名,避免字段歧义
|
||||||
|
conditions = append(conditions, fmt.Sprintf("(%s.created_at >= ? AND %s.created_at <= ?)", tableAlias, tableAlias))
|
||||||
|
args = append(args, tr.Start, tr.End)
|
||||||
|
}
|
||||||
|
return "(" + strings.Join(conditions, " OR ") + ")", args
|
||||||
|
}
|
||||||
|
query = app.ModuleClients.BundleDB.Table("cast_work AS cw").
|
||||||
|
Select(`cw.artist_name, cw.title AS video_title, tiktok.created_at AS tiktok_upload_time, dm.created_at AS dm_upload_time, ins.created_at AS instagram_upload_time, bor.customer_num AS user_num`)
|
||||||
|
|
||||||
|
// 为每个平台添加时间筛选条件
|
||||||
|
if len(timeRanges) > 0 {
|
||||||
|
// TikTok JOIN
|
||||||
|
tiktokTimeSQL, tiktokArgs := buildTimeFilterSQL("tiktok")
|
||||||
|
joinSQL := `LEFT JOIN cast_work_platform_info tiktok ON tiktok.work_uuid = cw.uuid AND tiktok.platform_id = 1 AND ` + tiktokTimeSQL
|
||||||
|
query = query.Joins(joinSQL, tiktokArgs...)
|
||||||
|
|
||||||
|
// DM JOIN
|
||||||
|
dmTimeSQL, dmArgs := buildTimeFilterSQL("dm")
|
||||||
|
joinSQL = `LEFT JOIN cast_work_platform_info dm ON dm.work_uuid = cw.uuid AND dm.platform_id = 4 AND ` + dmTimeSQL
|
||||||
|
query = query.Joins(joinSQL, dmArgs...)
|
||||||
|
|
||||||
|
// Instagram JOIN
|
||||||
|
insTimeSQL, insArgs := buildTimeFilterSQL("ins")
|
||||||
|
joinSQL = `LEFT JOIN cast_work_platform_info ins ON ins.work_uuid = cw.uuid AND ins.platform_id = 3 AND ` + insTimeSQL
|
||||||
|
query = query.Joins(joinSQL, insArgs...)
|
||||||
|
}
|
||||||
|
query = query.Joins(`LEFT JOIN bundle_order_records bor ON bor.customer_id COLLATE utf8mb4_general_ci = cw.artist_uuid COLLATE utf8mb4_general_ci AND bor.deleted_at IS NULL`).
|
||||||
|
Where(`cw.deleted_at = 0 AND (tiktok.created_at IS NOT NULL OR dm.created_at IS NOT NULL OR ins.created_at IS NOT NULL)`).
|
||||||
|
Order("cw.artist_name")
|
||||||
}
|
}
|
||||||
err = query.Find(&result.Data).Error
|
err = query.Find(&result.Data).Error
|
||||||
return
|
return
|
||||||
|
|||||||
@ -539,6 +539,7 @@ func OrderRecordsListV2(req *bundle.OrderRecordsRequestV2) (res *bundle.OrderRec
|
|||||||
Amount: record.Amount,
|
Amount: record.Amount,
|
||||||
CustomerId: customerID,
|
CustomerId: customerID,
|
||||||
PayTime: record.PayTime,
|
PayTime: record.PayTime,
|
||||||
|
InviterId: record.InviterID,
|
||||||
}
|
}
|
||||||
|
|
||||||
// 聚合子订单
|
// 聚合子订单
|
||||||
|
|||||||
@ -16,6 +16,7 @@ import (
|
|||||||
"dubbo.apache.org/dubbo-go/v3/common/logger"
|
"dubbo.apache.org/dubbo-go/v3/common/logger"
|
||||||
"github.com/jinzhu/copier"
|
"github.com/jinzhu/copier"
|
||||||
"github.com/samber/lo"
|
"github.com/samber/lo"
|
||||||
|
"github.com/shopspring/decimal"
|
||||||
)
|
)
|
||||||
|
|
||||||
func BundleExtend(req *bundle.BundleExtendRequest) (*bundle.BundleExtendResponse, error) {
|
func BundleExtend(req *bundle.BundleExtendRequest) (*bundle.BundleExtendResponse, error) {
|
||||||
@ -544,6 +545,14 @@ func BundleBalanceExport(req *bundle.BundleBalanceExportReq) (*bundle.BundleBala
|
|||||||
} else {
|
} else {
|
||||||
item.IncreaseVideoUnitPrice = float32(math.Round(float64(item.IncreaseAmount/float32(v.IncreaseVideoNumber))*100) / 100)
|
item.IncreaseVideoUnitPrice = float32(math.Round(float64(item.IncreaseAmount/float32(v.IncreaseVideoNumber))*100) / 100)
|
||||||
}
|
}
|
||||||
|
bundleUnitPrice := decimal.NewFromFloat32(item.BundleVideoUnitPrice)
|
||||||
|
increaseUnitPrice := decimal.NewFromFloat32(item.IncreaseVideoUnitPrice)
|
||||||
|
|
||||||
|
bundlePriceTotal := bundleUnitPrice.Mul(decimal.NewFromInt32(v.MonthBundleVideoConsumptionNumber))
|
||||||
|
increasePriceTotal := increaseUnitPrice.Mul(decimal.NewFromInt32(v.MonthIncreaseVideoConsumptionNumber))
|
||||||
|
|
||||||
|
item.MonthlyBundleVideoConsumptionPrice = bundlePriceTotal.StringFixed(2)
|
||||||
|
item.MonthlyIncreaseVideoConsumptionPrice = increasePriceTotal.StringFixed(2)
|
||||||
items = append(items, item)
|
items = append(items, item)
|
||||||
}
|
}
|
||||||
return &bundle.BundleBalanceExportResp{Total: int64(len(items)), Data: items}, nil
|
return &bundle.BundleBalanceExportResp{Total: int64(len(items)), Data: items}, nil
|
||||||
|
|||||||
@ -69,6 +69,7 @@ func CreateOrderRecord(req *bundle.OrderCreateRecord) (res *bundle.CommonRespons
|
|||||||
Language: req.Language,
|
Language: req.Language,
|
||||||
BundleOrderValueAdd: addRecords,
|
BundleOrderValueAdd: addRecords,
|
||||||
PlatformIds: req.PlatformIds,
|
PlatformIds: req.PlatformIds,
|
||||||
|
InviterID: req.InviterId,
|
||||||
}
|
}
|
||||||
res, err = dao.CreateOrderRecord(orderRecord)
|
res, err = dao.CreateOrderRecord(orderRecord)
|
||||||
return
|
return
|
||||||
|
|||||||
@ -45,6 +45,7 @@ type BundleOrderRecords struct {
|
|||||||
BundleOrderValueAdd []BundleOrderValueAdd `gorm:"foreignKey:OrderUUID;references:UUID" json:"bundleOrderValueAdd"`
|
BundleOrderValueAdd []BundleOrderValueAdd `gorm:"foreignKey:OrderUUID;references:UUID" json:"bundleOrderValueAdd"`
|
||||||
ReSignature int `json:"reSignature" gorm:"column:re_signature;default:2;type:int;comment:是否重新签 1:是 2:否"`
|
ReSignature int `json:"reSignature" gorm:"column:re_signature;default:2;type:int;comment:是否重新签 1:是 2:否"`
|
||||||
PlatformIds PlatformIDs `gorm:"column:platform_ids;type:json;NOT NULL;comment:发布平台ID集合 TIKTOK= 1, YOUTUBE = 2, INS = 3 , DM = 4, BL = 5;" json:"platformIDs"`
|
PlatformIds PlatformIDs `gorm:"column:platform_ids;type:json;NOT NULL;comment:发布平台ID集合 TIKTOK= 1, YOUTUBE = 2, INS = 3 , DM = 4, BL = 5;" json:"platformIDs"`
|
||||||
|
InviterID uint64 `gorm:"column:inviter_id;type:bigint;comment:邀请人ID" json:"inviterID"`
|
||||||
}
|
}
|
||||||
type BundleOrderValueAdd struct {
|
type BundleOrderValueAdd struct {
|
||||||
gorm.Model
|
gorm.Model
|
||||||
|
|||||||
@ -218,6 +218,7 @@ message OrderCreateRecord{
|
|||||||
repeated OrderCreateAddRecord addRecords = 20 [json_name = "addRecords"]; //增值服务
|
repeated OrderCreateAddRecord addRecords = 20 [json_name = "addRecords"]; //增值服务
|
||||||
string orderNo = 21 [json_name = "orderNo"];
|
string orderNo = 21 [json_name = "orderNo"];
|
||||||
repeated uint32 platformIds = 22; // 发布平台ID集合 (json 格式字符串)
|
repeated uint32 platformIds = 22; // 发布平台ID集合 (json 格式字符串)
|
||||||
|
uint64 inviterId = 23; // 邀请人ID
|
||||||
}
|
}
|
||||||
message OrderCreateAddRecord{
|
message OrderCreateAddRecord{
|
||||||
int32 serviceType = 1 [json_name = "serviceType"];
|
int32 serviceType = 1 [json_name = "serviceType"];
|
||||||
@ -270,6 +271,9 @@ message OrderBundleRecordInfo{
|
|||||||
int64 customerId = 9;
|
int64 customerId = 9;
|
||||||
string payTime = 10;
|
string payTime = 10;
|
||||||
string subNum = 11;
|
string subNum = 11;
|
||||||
|
uint64 inviterId = 12;
|
||||||
|
string inviterCode = 13;
|
||||||
|
string inviterName = 14;
|
||||||
}
|
}
|
||||||
message OrderAddBundleRecordInfo{
|
message OrderAddBundleRecordInfo{
|
||||||
string orderAddNo = 1;
|
string orderAddNo = 1;
|
||||||
@ -727,7 +731,7 @@ message GetBundleBalanceListReq{
|
|||||||
int64 expiredTimeEnd = 8;
|
int64 expiredTimeEnd = 8;
|
||||||
int32 page = 9;
|
int32 page = 9;
|
||||||
int32 pageSize = 10;
|
int32 pageSize = 10;
|
||||||
string month = 11;
|
repeated string month = 11;
|
||||||
int32 statusType = 12;
|
int32 statusType = 12;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -911,11 +915,15 @@ message BundleBalanceExportItem {
|
|||||||
int32 monthlyManualVideoConsumptionNumber = 65; // 当月手动扩展视频使用数
|
int32 monthlyManualVideoConsumptionNumber = 65; // 当月手动扩展视频使用数
|
||||||
int32 monthlyManualImageConsumptionNumber = 66; // 当月手动扩展图文使用数
|
int32 monthlyManualImageConsumptionNumber = 66; // 当月手动扩展图文使用数
|
||||||
int32 monthlyManualDataAnalysisConsumptionNumber = 67; // 当月手动扩展数据分析使用数
|
int32 monthlyManualDataAnalysisConsumptionNumber = 67; // 当月手动扩展数据分析使用数
|
||||||
|
|
||||||
|
//视频当月消耗金额
|
||||||
|
string monthlyBundleVideoConsumptionPrice = 68;//当月套餐消耗总金额
|
||||||
|
string monthlyIncreaseVideoConsumptionPrice = 69;//当月增值消耗总金额
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
message BundleBalanceExportReq{
|
message BundleBalanceExportReq{
|
||||||
string month = 1;
|
repeated string month = 1;
|
||||||
string userName = 2;
|
string userName = 2;
|
||||||
uint64 expiredTimeStart = 3;
|
uint64 expiredTimeStart = 3;
|
||||||
uint64 expiredTimeEnd = 4;
|
uint64 expiredTimeEnd = 4;
|
||||||
@ -1762,7 +1770,7 @@ message MetricsBundlePurchaseItem{
|
|||||||
}
|
}
|
||||||
|
|
||||||
message MetricsArtistAccountExportReq{
|
message MetricsArtistAccountExportReq{
|
||||||
string month = 1;
|
repeated string month = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
message MetricsArtistAccountExportResp{
|
message MetricsArtistAccountExportResp{
|
||||||
@ -1792,7 +1800,7 @@ message MetricsArtistAccountExportItem{
|
|||||||
|
|
||||||
|
|
||||||
message MetricsVideoSubmitExportReq{
|
message MetricsVideoSubmitExportReq{
|
||||||
string month = 1;
|
repeated string month = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
message MetricsVideoSubmitExportResp{
|
message MetricsVideoSubmitExportResp{
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -68,6 +68,11 @@ func loadMysqlConn(conn string) *gorm.DB {
|
|||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if db.Migrator().HasColumn(&model.BundleOrderRecords{}, "inviter_id") == false {
|
||||||
|
if err := db.Migrator().AddColumn(&model.BundleOrderRecords{}, "inviter_id"); err != nil {
|
||||||
|
fmt.Println(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// return nil
|
// return nil
|
||||||
panic(err)
|
panic(err)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user