Update reconciliation.go
This commit is contained in:
parent
e2962353b9
commit
d54a3df245
@ -29,6 +29,29 @@ func GetReconciliationList(c *gin.Context) {
|
||||
service.Error(c, detailErr)
|
||||
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)
|
||||
return
|
||||
|
||||
@ -45,6 +68,29 @@ func GetReconciliationListDownload(c *gin.Context) {
|
||||
service.Error(c, detailErr)
|
||||
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{
|
||||
"关联套餐订单号", "关联增值服务订单号", "对账单创建时间", "用户编号", "艺人", "艺人手机号", "套餐", "支付金额", "手续费", "币种", "支付渠道", "支付时间", "支付状态", "流水号",
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user