浏览代码

add delete AdvertisingCallback

master
shenjiachi 2 周前
父节点
当前提交
2e3b69fe02
共有 2 个文件被更改,包括 9 次插入0 次删除
  1. +1
    -0
      src/dao/advertising_callback_dao.go
  2. +8
    -0
      src/implement/advertising_callback_implement.go

+ 1
- 0
src/dao/advertising_callback_dao.go 查看文件

@@ -7,4 +7,5 @@ import (
type AdvertisingCallbackDao interface {
FindAdvertisingCallbackAndTotal(page, limit, amount, uid, startTime, endTime, platform, types string) (*[]model.AdvertisingCallback, int64, error)
AdvertisingCallbackCount(uid, startTime, endTime, types string) (int64, error)
AdvertisingCallbackDeleteByDateByPage(date string, limit int) (int64, error)
}

+ 8
- 0
src/implement/advertising_callback_implement.go 查看文件

@@ -65,3 +65,11 @@ func (a AdvertisingCallbackDb) AdvertisingCallbackCount(uid, startTime, endTime,
}
return count, nil
}

func (a AdvertisingCallbackDb) AdvertisingCallbackDeleteByDateByPage(date string, limit int) (int64, error) {
affected, err := a.Db.Where("create_at < ?", date).Limit(limit).Delete(&model.EggAccessRecords{})
if err != nil {
return 0, zhios_order_relate_logx.Error(err.Error())
}
return affected, nil
}

正在加载...
取消
保存