|
|
@@ -45,7 +45,7 @@ func (a AdvertisingCallbackDb) FindAdvertisingCallbackAndTotal(page, limit, amou |
|
|
|
return &m, count, nil |
|
|
|
} |
|
|
|
|
|
|
|
func (a AdvertisingCallbackDb) AdvertisingCallbackExistBySession(session *xorm.Session, uid, startTime, endTime, types string) (bool, error) { |
|
|
|
func (a AdvertisingCallbackDb) AdvertisingCallbackCountBySession(session *xorm.Session, uid, startTime, endTime, types string) (int64, error) { |
|
|
|
var m []model.AdvertisingCallback |
|
|
|
sess := session.Where("1=1") |
|
|
|
if uid != "" { |
|
|
@@ -60,9 +60,9 @@ func (a AdvertisingCallbackDb) AdvertisingCallbackExistBySession(session *xorm.S |
|
|
|
if endTime != "" { |
|
|
|
sess.And("create_at<=?", endTime) |
|
|
|
} |
|
|
|
exist, err := sess.Exist(&m) |
|
|
|
count, err := sess.Count(&m) |
|
|
|
if err != nil { |
|
|
|
return false, err |
|
|
|
} |
|
|
|
return exist, nil |
|
|
|
return count, nil |
|
|
|
} |