...
|
...
|
@@ -248,23 +248,6 @@ func (svr *PgLoginService) GetJoinWays(partnerCategory []*domain.PartnerCategory |
|
|
}
|
|
|
return nil
|
|
|
}
|
|
|
//var (
|
|
|
// totalBonus float64
|
|
|
// businessBonus float64
|
|
|
// BusinessBonusRepository, _ = repository.NewBusinessBonusRepository(svr.transactionContext)
|
|
|
//)
|
|
|
//for i := range partnerInfo.PartnerCategoryInfos {
|
|
|
// c := partnerInfo.PartnerCategoryInfos[i]
|
|
|
// switch c.Id {
|
|
|
// case 1:
|
|
|
// totalBonus += bonus
|
|
|
// case 2:
|
|
|
// if one, e := BusinessBonusRepository.FindOne(map[string]interface{}{"partner_id": partnerInfo.Id}); e == nil {
|
|
|
// businessBonus = one.Bonus
|
|
|
// totalBonus += businessBonus
|
|
|
// }
|
|
|
// }
|
|
|
//}
|
|
|
var joinWays []joinWay
|
|
|
for i := range partnerCategory {
|
|
|
c := partnerCategory[i]
|
...
|
...
|
@@ -274,11 +257,6 @@ func (svr *PgLoginService) GetJoinWays(partnerCategory []*domain.PartnerCategory |
|
|
Type: int(c.Id),
|
|
|
Name: c.Name,
|
|
|
}
|
|
|
//if c.Id == 1 {
|
|
|
// item.Percent = computeBonusPercent(totalBonus, bonus) * 100
|
|
|
//} else if c.Id == 2 {
|
|
|
// item.Percent = computeBonusPercent(totalBonus, businessBonus) * 100
|
|
|
//}
|
|
|
joinWays = append(joinWays, item)
|
|
|
}
|
|
|
}
|
...
|
...
|
|