Browse Source

更新

master
huangjiajun 1 year ago
parent
commit
fe7bba4f9f
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      db/db_mall_order.go

+ 2
- 2
db/db_mall_order.go View File

@@ -72,7 +72,7 @@ func MallOrdByTime(Db *xorm.Engine, uid, buyType, state, stime, etime interface{
sess = sess.And(" confirm_time > ? AND confirm_time < ?", stime, etime) sess = sess.And(" confirm_time > ? AND confirm_time < ?", stime, etime)
} }
if zhios_condition_statistics_utils.AnyToInt64(buyType) > 0 { if zhios_condition_statistics_utils.AnyToInt64(buyType) > 0 {
sess.And("order_type", buyType)
sess.And("order_type=?", buyType)
} }
total, err := sess.Sum(&model.MallOrd{}, "cost_price") total, err := sess.Sum(&model.MallOrd{}, "cost_price")
fmt.Println(err) fmt.Println(err)
@@ -142,7 +142,7 @@ func MallOrderRelateListByState(Db *xorm.Engine, uid, state interface{}) (*map[i
func MallOrd(Db *xorm.Engine, uid, buyType, state interface{}) (float64, error) { func MallOrd(Db *xorm.Engine, uid, buyType, state interface{}) (float64, error) {
sess := Db.Where("uid = ? ", uid).In("state", state) sess := Db.Where("uid = ? ", uid).In("state", state)
if zhios_condition_statistics_utils.AnyToInt64(buyType) > 0 { if zhios_condition_statistics_utils.AnyToInt64(buyType) > 0 {
sess.And("order_type", buyType)
sess.And("order_type=?", buyType)
} }
total, err := sess.Sum(&model.MallOrd{}, "cost_price") total, err := sess.Sum(&model.MallOrd{}, "cost_price")
fmt.Println(err) fmt.Println(err)


Loading…
Cancel
Save