Compare commits

...

2 Commits

Author SHA1 Message Date
14956c06de Merge branch 'jng' into dev 2025-08-27 11:29:07 +08:00
d54a3df245 Update reconciliation.go 2025-08-27 11:29:01 +08:00

View File

@ -29,6 +29,29 @@ func GetReconciliationList(c *gin.Context) {
service.Error(c, detailErr) service.Error(c, detailErr)
return return
} }
var userIds []int64
for _, u := range detail.List {
userIds = append(userIds, int64(u.UserID))
}
userListResp, err := service.AccountFieeProvider.UserList(context.Background(), &accountFiee.UserListRequest{
Ids: userIds,
Domain: "app",
})
if err != nil {
service.Error(c, err)
return
}
userMap := make(map[int64]*accountFiee.UserListInfo, len(userListResp.UserList))
if len(userListResp.UserList) > 0 {
for _, u := range userListResp.UserList {
userMap[int64(u.Id)] = u
}
for _, u := range detail.List {
if user, ok := userMap[int64(u.UserID)]; ok {
u.SubNum = user.SubNum
}
}
}
service.Success(c, detail) service.Success(c, detail)
return return
@ -45,6 +68,29 @@ func GetReconciliationListDownload(c *gin.Context) {
service.Error(c, detailErr) service.Error(c, detailErr)
return return
} }
var userIds []int64
for _, u := range detail.List {
userIds = append(userIds, int64(u.UserID))
}
userListResp, err := service.AccountFieeProvider.UserList(context.Background(), &accountFiee.UserListRequest{
Ids: userIds,
Domain: "app",
})
if err != nil {
service.Error(c, err)
return
}
userMap := make(map[int64]*accountFiee.UserListInfo, len(userListResp.UserList))
if len(userListResp.UserList) > 0 {
for _, u := range userListResp.UserList {
userMap[int64(u.Id)] = u
}
for _, u := range detail.List {
if user, ok := userMap[int64(u.UserID)]; ok {
u.SubNum = user.SubNum
}
}
}
titleList := []string{ titleList := []string{
"关联套餐订单号", "关联增值服务订单号", "对账单创建时间", "用户编号", "艺人", "艺人手机号", "套餐", "支付金额", "手续费", "币种", "支付渠道", "支付时间", "支付状态", "流水号", "关联套餐订单号", "关联增值服务订单号", "对账单创建时间", "用户编号", "艺人", "艺人手机号", "套餐", "支付金额", "手续费", "币种", "支付渠道", "支付时间", "支付状态", "流水号",
} }