|
|
@@ -5,6 +5,7 @@ import ( |
|
|
|
"code.fnuoos.com/EggPlanet/egg_models.git/src/model" |
|
|
|
zhios_order_relate_utils "code.fnuoos.com/EggPlanet/egg_models.git/utils" |
|
|
|
zhios_order_relate_logx "code.fnuoos.com/EggPlanet/egg_models.git/utils/logx" |
|
|
|
"fmt" |
|
|
|
"xorm.io/xorm" |
|
|
|
) |
|
|
|
|
|
|
@@ -45,13 +46,14 @@ func (a AdvertisingCallbackDb) FindAdvertisingCallbackAndTotal(page, limit, amou |
|
|
|
return &m, count, nil |
|
|
|
} |
|
|
|
|
|
|
|
func (a AdvertisingCallbackDb) AdvertisingCallbackCount(uid, startTime, endTime, types string) (int64, error) { |
|
|
|
func (a AdvertisingCallbackDb) AdvertisingCallbackCount(uid, startTime, endTime, typePrefix string) (int64, error) { |
|
|
|
sess := a.Db.Where("1=1") |
|
|
|
if uid != "" { |
|
|
|
sess.And("uid=?", uid) |
|
|
|
} |
|
|
|
if types != "" { |
|
|
|
sess.And("type=?", types) |
|
|
|
if typePrefix != "" { |
|
|
|
types := fmt.Sprintf("type LIKE '%s'", typePrefix+"%") |
|
|
|
sess.And(types) |
|
|
|
} |
|
|
|
if startTime != "" { |
|
|
|
sess.And("create_at>=?", startTime) |
|
|
|