|
|
@@ -16,7 +16,7 @@ func OwnBuyTotal(engine *xorm.Engine, uid interface{}, task map[string]string, t |
|
|
|
stime := time.Date(t.Year(), t.Month(), t.Day()-zhios_condition_statistics_utils.StrToInt(task["within_days"]), t.Hour(), 0, 0, 0, t.Location()).Unix() |
|
|
|
etime := t.Unix() |
|
|
|
//联盟结算后的 |
|
|
|
total, err := db.OrderListCountByUIDByOrderTypeByTime(engine, uid, 0, "2,3,5", stime, etime) |
|
|
|
total, err := db.OrderListCountByUIDByOrderTypeByTime(engine, uid, 0, "1,2,3,5", stime, etime) |
|
|
|
if err != nil { |
|
|
|
zhios_condition_statistics_logx.Warn(err) |
|
|
|
return "" |
|
|
@@ -39,7 +39,7 @@ func SettleOrderSum(engine *xorm.Engine, uid interface{}, task map[string]string |
|
|
|
stime := time.Date(t.Year(), t.Month(), t.Day()-zhios_condition_statistics_utils.StrToInt(task["within_days"]), t.Hour(), 0, 0, 0, t.Location()).Unix() |
|
|
|
etime := t.Unix() |
|
|
|
// 用户分佣的订单 |
|
|
|
idAmountMap, err := db.OrderRelateListByTimeByState(engine, uid, "2,3,5", stime, etime) |
|
|
|
idAmountMap, err := db.OrderRelateListByTimeByState(engine, uid, "1,2,3,5", stime, etime) |
|
|
|
if err != nil { |
|
|
|
zhios_condition_statistics_logx.Warn(err) |
|
|
|
return "" |
|
|
@@ -161,7 +161,7 @@ func OwnbuySum(engine *xorm.Engine, uid interface{}, task map[string]string, t t |
|
|
|
if zhios_condition_statistics_utils.InArr(task["task_type_pvd"], []string{"0", "1"}) { |
|
|
|
stime := time.Date(t.Year(), t.Month(), t.Day()-zhios_condition_statistics_utils.StrToInt(task["within_days"]), t.Hour(), 0, 0, 0, t.Location()).Unix() |
|
|
|
etime := t.Unix() |
|
|
|
total, err = db.OrderListPaidPriceByUIDByOrderTypeByTime(engine, uid, 0, "2,3,5", stime, etime) |
|
|
|
total, err = db.OrderListPaidPriceByUIDByOrderTypeByTime(engine, uid, 0, "1,2,3,5", stime, etime) |
|
|
|
if err != nil { |
|
|
|
zhios_condition_statistics_logx.Warn(err) |
|
|
|
return "" |
|
|
@@ -265,7 +265,7 @@ WHERE olr.uid = ? |
|
|
|
FROM ord_list_relate olr |
|
|
|
JOIN ord_list ol ON olr.oid = ol.ord_id |
|
|
|
WHERE olr.uid = ? |
|
|
|
AND ol.state in(2,3,5) and olr.level>0; |
|
|
|
AND ol.state in(1,2,3,5) and olr.level>0; |
|
|
|
` |
|
|
|
guideResult, err := db.QueryNativeString(engine, guideSqlTpl, uid) |
|
|
|
if err == nil { |
|
|
|