瀏覽代碼

fix team assistance count

master
shenjiachi 3 天之前
父節點
當前提交
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
}

Loading…
取消
儲存