Przeglądaj źródła

fix team assistance count

master
shenjiachi 3 dni temu
rodzic
commit
340ce34a0f
2 zmienionych plików z 4 dodań i 4 usunięć
  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 Wyświetl plik

@@ -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 Wyświetl plik

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

Ładowanie…
Anuluj
Zapisz