Merge branch 'feat-IRONFANS-70' into test

This commit is contained in:
lwl0608 2024-04-24 19:37:34 +08:00
commit 3ae3423683
1 changed files with 7 additions and 1 deletions

View File

@ -499,6 +499,7 @@ func (v *Vas) calcAndUpdateIncome(ctx *gin.Context, tx *sqlx.Tx, streamerMid, ui
logger.Error("zone.GetByMid fail, mid: %v, err: %v", streamerMid, err)
return make([]IncomeInfo, 0), err
}
logger.Info("_IL orderId: %v, zone: %v", orderId, util.ToJson(zone))
// 获取代运营
zid := zone.GetId()
@ -507,6 +508,7 @@ func (v *Vas) calcAndUpdateIncome(ctx *gin.Context, tx *sqlx.Tx, streamerMid, ui
logger.Error("zonetp.GetZoneThirdPartnerByZid fail, zid: %v, err: %v", zid, err)
return make([]IncomeInfo, 0), err
}
logger.Info("_IL orderId: %v, zid: %v, tp: %v", orderId, zid, util.ToJson(tp))
// 获取协作者
zclrList, err := v.zoneclr.OpList(ctx, &zone_collaborator_proto.OpListReq{
@ -518,20 +520,24 @@ func (v *Vas) calcAndUpdateIncome(ctx *gin.Context, tx *sqlx.Tx, streamerMid, ui
logger.Error("zoneclr.OpList fail, zid: %v, err: %v", zid, err)
return make([]IncomeInfo, 0), err
}
logger.Info("_IL orderId: %v, zid: %v, zclrList: %v", orderId, zid, util.ToJson(zclrList))
var list = make([]IncomeInfo, 0)
switch {
case zone == nil:
// 没有空间
logger.Info("_IL (1) orderId: %v, zid: %v", orderId, zid)
list = v._calcWithoutZone(streamerMid, totalDias, defaultIncomeSType)
case zone != nil && tp == nil:
// 有空间,没代运营
logger.Info("_IL (2) orderId: %v, zid: %v", orderId, zid)
list = v._calcWithZoneWithoutTp(streamerMid, totalDias, defaultIncomeSType)
case zone != nil && tp != nil:
// 有空间,有代运营
logger.Info("_IL (3) orderId: %v, zid: %v", orderId, zid)
list = v._calcWithZoneWithTp(streamerMid, totalDias, defaultIncomeSType, tp, zclrList)
}
logger.Info("incomeList: %v", util.ToJson(list))
logger.Info("_IL incomeList: %v", util.ToJson(list))
// 写记录
for _, ii := range list {