Updata:解决冲突
This commit is contained in:
commit
7ac61c197c
@ -38,7 +38,7 @@ func MetricsBusiness(req *bundle.MetricsBusinessReq) (result *bundle.MetricsBusi
|
|||||||
// }
|
// }
|
||||||
err = query.First(result).Error
|
err = query.First(result).Error
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return nil, fmt.Errorf("总金额统计失败")
|
||||||
}
|
}
|
||||||
|
|
||||||
// 将字符串转换为数值进行计算
|
// 将字符串转换为数值进行计算
|
||||||
@ -72,7 +72,7 @@ func MetricsBusiness(req *bundle.MetricsBusinessReq) (result *bundle.MetricsBusi
|
|||||||
|
|
||||||
subQuery = app.ModuleClients.BundleDB.Model(&model.Reconciliation{}).
|
subQuery = app.ModuleClients.BundleDB.Model(&model.Reconciliation{}).
|
||||||
Select("SUM(handling_fee) as new_fee_payment_amount, SUM(pay_amount) as new_payment_amount").
|
Select("SUM(handling_fee) as new_fee_payment_amount, SUM(pay_amount) as new_payment_amount").
|
||||||
Joins("LEFT JOIN bundle_order_records bor ON bor.order_no = bundle_order_on").
|
Joins("LEFT JOIN bundle_order_records bor ON bor.order_no COLLATE utf8mb4_general_ci = reconciliation.bundle_order_on COLLATE utf8mb4_general_ci").
|
||||||
Where("`reconciliation`.pay_time >= ?", req.Start+" 00:00:00").
|
Where("`reconciliation`.pay_time >= ?", req.Start+" 00:00:00").
|
||||||
Where("`reconciliation`.pay_time <= ?", req.End+" 23:59:59").
|
Where("`reconciliation`.pay_time <= ?", req.End+" 23:59:59").
|
||||||
Where("`reconciliation`.deleted_at is null and reconciliation.pay_status = 2 and bor.status=2 and bor.deleted_at is null")
|
Where("`reconciliation`.deleted_at is null and reconciliation.pay_status = 2 and bor.status=2 and bor.deleted_at is null")
|
||||||
@ -1342,6 +1342,12 @@ func MetricsArtistAccountExport(req *bundle.MetricsArtistAccountExportReq) (*bun
|
|||||||
ins.platform_user_id as instagram_account,
|
ins.platform_user_id as instagram_account,
|
||||||
ins.platform_user_name as instagram_nickname,
|
ins.platform_user_name as instagram_nickname,
|
||||||
ins_auth.auth_status as ins_auth_status,
|
ins_auth.auth_status as ins_auth_status,
|
||||||
|
youtube.platform_user_id as youtube_account,
|
||||||
|
youtube.platform_user_name as youtube_nickname,
|
||||||
|
youtube_auth.auth_status as youtube_auth_status,
|
||||||
|
bluesky.platform_user_id as bluesky_account,
|
||||||
|
bluesky.platform_user_name as bluesky_nickname,
|
||||||
|
bluesky_auth.auth_status as bluesky_auth_status,
|
||||||
cma.artist_name,
|
cma.artist_name,
|
||||||
bor.customer_num as user_num
|
bor.customer_num as user_num
|
||||||
`).
|
`).
|
||||||
@ -1351,6 +1357,10 @@ func MetricsArtistAccountExport(req *bundle.MetricsArtistAccountExportReq) (*bun
|
|||||||
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) 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_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_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 != "" {
|
if req.Month != "" {
|
||||||
|
|||||||
@ -282,7 +282,7 @@ func CreateBundleBalance(req *bundle.CreateBundleBalanceReq) (*bundle.CreateBund
|
|||||||
data.ExpiredAt = time.Now()
|
data.ExpiredAt = time.Now()
|
||||||
userId, err := strconv.Atoi(addValues[0].CustomerID)
|
userId, err := strconv.Atoi(addValues[0].CustomerID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, errors.New("获取用户ID失败")
|
||||||
}
|
}
|
||||||
data.Month = time.Now().Format("2006-01")
|
data.Month = time.Now().Format("2006-01")
|
||||||
data.UserId = userId
|
data.UserId = userId
|
||||||
@ -501,11 +501,11 @@ func BundleBalanceExport(req *bundle.BundleBalanceExportReq) (*bundle.BundleBala
|
|||||||
PageSize: 99999,
|
PageSize: 99999,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, errors.New("余量列表数据失败")
|
||||||
}
|
}
|
||||||
prefixData, err := dao.BalanceExportPrefix()
|
prefixData, err := dao.BalanceExportPrefix()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, errors.New("获取前缀数据失败")
|
||||||
}
|
}
|
||||||
|
|
||||||
var prefixMap = map[int32]model.BundleExportDto{}
|
var prefixMap = map[int32]model.BundleExportDto{}
|
||||||
|
|||||||
@ -1775,14 +1775,18 @@ message MetricsArtistAccountExportItem{
|
|||||||
string dmAccount = 3;
|
string dmAccount = 3;
|
||||||
string dmNickname = 4;
|
string dmNickname = 4;
|
||||||
int32 dmAuthStatus = 5;
|
int32 dmAuthStatus = 5;
|
||||||
// string youtubeAccount = 3; 现在没有YouTube了
|
|
||||||
// string youtubeNickname = 4;
|
|
||||||
string instagramAccount = 6;
|
string instagramAccount = 6;
|
||||||
string instagramNickname = 7;
|
string instagramNickname = 7;
|
||||||
int32 insAuthStatus = 8;
|
int32 insAuthStatus = 8;
|
||||||
string tiktokAccount = 9;
|
string tiktokAccount = 9;
|
||||||
string tiktokNickname = 10;
|
string tiktokNickname = 10;
|
||||||
int32 tiktokAuthStatus = 11;
|
int32 tiktokAuthStatus = 11;
|
||||||
|
string youtubeAccount = 12;
|
||||||
|
string youtubeNickname = 13;
|
||||||
|
int32 youtubeAuthStatus = 14;
|
||||||
|
string blueskyAccount = 15;
|
||||||
|
string blueskyNickname = 16;
|
||||||
|
int32 blueskyAuthStatus = 17;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
11243
pb/bundle/bundle.pb.go
11243
pb/bundle/bundle.pb.go
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
|||||||
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
|
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// - protoc-gen-go-triple v1.0.5
|
// - protoc-gen-go-triple v1.0.5
|
||||||
// - protoc v6.32.0
|
// - protoc v5.26.0
|
||||||
// source: pb/bundle.proto
|
// source: pb/bundle.proto
|
||||||
|
|
||||||
package bundle
|
package bundle
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user