修改包名

This commit is contained in:
2026-04-09 10:48:30 +08:00
parent 556ec5075e
commit 5797fbb43e
11 changed files with 19 additions and 20 deletions

View File

@@ -1,12 +1,11 @@
package main
import (
"cid/syncdata"
"context"
"fmt"
"time"
"cid/sync"
"gitea.com/red-future/common/beans"
_ "github.com/gogf/gf/contrib/drivers/pgsql/v2"
@@ -16,27 +15,27 @@ import (
func main() {
ctx := gctx.New()
syncService := sync.NewSyncService()
syncService := syncdata.NewSyncService()
ctx = context.WithValue(ctx, "user", &beans.User{UserName: "admin"})
now := time.Now()
lastHourEnd := time.Date(now.Year(), now.Month(), now.Day(), now.Hour(), 0, 0, 0, now.Location())
lastHourStart := lastHourEnd.Add(-1 * time.Hour)
req := &sync.AccountReportRequest{
req := &syncdata.AccountReportRequest{
AdvertiserID: 10001,
StartTime: lastHourStart.UnixMilli(),
EndTime: lastHourEnd.UnixMilli(),
SelectColumns: []string{"impression", "click", "cost", "t0GMV"},
GroupType: 1,
QueryVersion: 1,
PageInfo: &sync.PageInfo{
PageInfo: &syncdata.PageInfo{
CurrentPage: 1,
PageSize: 10,
},
}
config := sync.ConcurrentSyncConfig{
config := syncdata.ConcurrentSyncConfig{
MaxConcurrency: 5,
UseMock: true,
MaxRetries: 3,