Browse Source

fix team assistance count

master
shenjiachi 3 days ago
parent
commit
340ce34a0f
2 changed files with 4 additions and 4 deletions
  1. +1
    -1
      src/dao/advertising_callback_dao.go
  2. +3
    -3
      src/implement/advertising_callback_implement.go

+ 1
- 1
src/dao/advertising_callback_dao.go View File

@@ -7,5 +7,5 @@ import (

type AdvertisingCallbackDao interface {
FindAdvertisingCallbackAndTotal(page, limit, amount, uid, startTime, endTime, platform, types string) (*[]model.AdvertisingCallback, int64, error)
AdvertisingCallbackExistBySession(session *xorm.Session, uid, startTime, endTime, types string) (bool, error)
AdvertisingCallbackCountBySession(session *xorm.Session, uid, startTime, endTime, types string) (int64, error)
}

+ 3
- 3
src/implement/advertising_callback_implement.go View File

@@ -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
}

Loading…
Cancel
Save