|
|
@@ -14,9 +14,9 @@ func OrderListCountByUIDByOrderTypeByTime(Db *xorm.Engine, uid, buyType, state, |
|
|
|
zhios_condition_statistics_utils.AnyToString(uid), buyType, state, stime, etime) |
|
|
|
fmt.Println("============test订单数=================") |
|
|
|
fmt.Println(str) |
|
|
|
total, _ := Db.Where("uid = ? AND create_at > ? AND create_at < ? and settle_at=0", uid, stime, etime).In("state", state).Count(&model.OrdList{}) |
|
|
|
total1, _ := Db.Where("uid = ? AND create_at > ? AND create_at < ? and settle_at>0", uid, stime, etime).Count(&model.OrdList{}) |
|
|
|
total2, _ := Db.Where("uid = ? AND created_at > ? AND created_at < ? and state=?", uid, stime, etime, 1).Count(&model.PrivilegeCardOrd{}) |
|
|
|
total, _ := Db.Where("uid = ? AND confirm_at > ? AND confirm_at < ? and settle_at=0", uid, stime, etime).In("state", state).Count(&model.OrdList{}) |
|
|
|
total1, _ := Db.Where("uid = ? AND confirm_at > ? AND confirm_at < ? and settle_at>0", uid, stime, etime).Count(&model.OrdList{}) |
|
|
|
total2, _ := Db.Where("uid = ? AND confirm_at > ? AND confirm_at < ? and state=?", uid, stime, etime, 1).Count(&model.PrivilegeCardOrd{}) |
|
|
|
|
|
|
|
fmt.Println(total) |
|
|
|
|
|
|
@@ -45,7 +45,7 @@ func OrderRelateListByTimeByState(Db *xorm.Engine, uid, state, startTime, endTim |
|
|
|
fmt.Println("============test佣金数=================") |
|
|
|
fmt.Println(str) |
|
|
|
// 已结算的订单数据 |
|
|
|
err = Db.In("ord_id", ids).In("state", state).Where(" create_at > ? AND create_at < ?", startTime, endTime).Find(&o) |
|
|
|
err = Db.In("ord_id", ids).In("state", state).Where(" confirm_at > ? AND confirm_at < ?", startTime, endTime).Find(&o) |
|
|
|
if err != nil { |
|
|
|
zhios_condition_statistics_logx.Error(err) |
|
|
|
return nil, err |
|
|
@@ -73,9 +73,9 @@ func OrderListPaidPriceByUIDByOrderTypeByTime(Db *xorm.Engine, uid, buyType, sta |
|
|
|
zhios_condition_statistics_utils.AnyToString(uid), buyType, state, stime, etime) |
|
|
|
fmt.Println("============test订单数=================") |
|
|
|
fmt.Println(str) |
|
|
|
total, _ := Db.Where("uid = ? AND create_at > ? AND create_at < ? and settle_at=0", uid, stime, etime).In("state", state).Sum(&model.OrdList{}, "paid_price") |
|
|
|
total1, _ := Db.Where("uid = ? AND create_at > ? AND create_at < ? and settle_at>0", uid, stime, etime).Sum(&model.OrdList{}, "paid_price") |
|
|
|
total2, _ := Db.Where("uid = ? AND created_at > ? AND created_at < ? and state=?", uid, stime, etime, 1).Sum(&model.PrivilegeCardOrd{}, "paid_price") |
|
|
|
total, _ := Db.Where("uid = ? AND confirm_at > ? AND confirm_at < ? and settle_at=0", uid, stime, etime).In("state", state).Sum(&model.OrdList{}, "paid_price") |
|
|
|
total1, _ := Db.Where("uid = ? AND confirm_at > ? AND confirm_at < ? and settle_at>0", uid, stime, etime).Sum(&model.OrdList{}, "paid_price") |
|
|
|
total2, _ := Db.Where("uid = ? AND confirm_at > ? AND confirm_at < ? and state=?", uid, stime, etime, 1).Sum(&model.PrivilegeCardOrd{}, "paid_price") |
|
|
|
fmt.Println(total) |
|
|
|
|
|
|
|
return total + total1 + total2, nil |
|
|
|