Updata:解决冲突

This commit is contained in:
jiaji.H 2025-12-25 15:40:27 +08:00
commit 28b6e6a514
4 changed files with 543 additions and 502 deletions

View File

@ -1336,16 +1336,22 @@ func MetricsArtistAccountExport(req *bundle.MetricsArtistAccountExportReq) (*bun
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,
tiktok_auth.auth_status as tiktok_auth_status,
dm.platform_user_id as dm_account, dm.platform_user_id as dm_account,
dm.platform_user_name as dm_nickname, dm.platform_user_name as dm_nickname,
dm_auth.auth_status as dm_auth_status,
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,
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) 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_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) 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_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 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 != "" {

View File

@ -1748,12 +1748,15 @@ message MetricsArtistAccountExportItem{
string userNum = 2; string userNum = 2;
string dmAccount = 3; string dmAccount = 3;
string dmNickname = 4; string dmNickname = 4;
string dmAuthStatus = 5;
// string youtubeAccount = 3; YouTube了 // string youtubeAccount = 3; YouTube了
// string youtubeNickname = 4; // string youtubeNickname = 4;
string instagramAccount = 5; string instagramAccount = 6;
string instagramNickname = 6; string instagramNickname = 7;
string tiktokAccount = 7; string insAuthStatus = 8;
string tiktokNickname = 8; string tiktokAccount = 9;
string tiktokNickname = 10;
string tiktokAuthStatus = 11;
} }

File diff suppressed because it is too large Load Diff

View File

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