|
|
|
@ -128,17 +128,17 @@ func MyInfo(c *gin.Context) {
|
|
|
|
|
|
|
|
|
|
// ------- 自购收益
|
|
|
|
|
var msData = myShoppingData(p.UserID)
|
|
|
|
|
cache.SetTmpData(p.UserID, cache.TMP_SELF_TYPE, msData)
|
|
|
|
|
cache.SetTmpData(p.UserID, cache.TmpSelfType, msData)
|
|
|
|
|
|
|
|
|
|
juniors := tree.GetTheJuniorUsers(p.UserID)
|
|
|
|
|
|
|
|
|
|
// ---- ShareIncome 分享收益
|
|
|
|
|
var siData = shareIncomeData(p.UserID)
|
|
|
|
|
cache.SetTmpData(p.UserID, cache.TMP_SHARE_TYPE, siData)
|
|
|
|
|
cache.SetTmpData(p.UserID, cache.TmpShareType, siData)
|
|
|
|
|
|
|
|
|
|
// ---- TeamIncome 团队收益
|
|
|
|
|
var tiData = teamIncomeData(p.UserID, juniors)
|
|
|
|
|
cache.SetTmpData(p.UserID, cache.TMP_TEAM_TYPE, siData)
|
|
|
|
|
cache.SetTmpData(p.UserID, cache.TmpTeamType, siData)
|
|
|
|
|
|
|
|
|
|
//dbc.DB.Model(&order.Information{}).Select("sum(goods_total_amount) as amount").Where("user_id in (?) and status = 4", juniors).Scan(&tiData)
|
|
|
|
|
//
|
|
|
|
@ -569,7 +569,7 @@ func IncomeFromTeam(c *gin.Context) {
|
|
|
|
|
|
|
|
|
|
var tiData TeamIncomeSub
|
|
|
|
|
var tiDataTmp TeamIncome
|
|
|
|
|
if res, ok := cache.GetTmpData(p.UserID, cache.TMP_TEAM_TYPE); !ok {
|
|
|
|
|
if res, ok := cache.GetTmpData(p.UserID, cache.TmpTeamType); !ok {
|
|
|
|
|
tiDataTmp = teamIncomeData(p.UserID, juniors)
|
|
|
|
|
tiData.HistoryIncome = tiDataTmp.OrderNum //这个是销售额
|
|
|
|
|
tiData.TeamAmount = tiDataTmp.Amount //这个是累计收益
|
|
|
|
|