Просмотр исходного кода

fix team assistance count

master
shenjiachi 3 дней назад
Родитель
Сommit
340ce34a0f
2 измененных файлов: 4 добавлений и 4 удалений
  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 Просмотреть файл

@@ -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 Просмотреть файл

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

Загрузка…
Отмена
Сохранить