Merge remote-tracking branch 'origin/dev' into dev

# Conflicts:
#	controller/copydata/campaign_report_controller.go
#	controller/copydata/population_report_controller.go
#	controller/copydata/unit_report_controller.go
#	controller/dict/api_field_mapping_config_controller.go
#	controller/tencent/oauth_controller.go
#	dao/copydata/api_account_report_detail_dao.go
#	dao/copydata/api_account_report_sum_dao.go
#	dao/copydata/campaign_report_detail_dao.go
#	dao/copydata/campaign_report_sum_dao.go
#	dao/copydata/creative_report_detail_dao.go
#	dao/copydata/creative_report_sum_dao.go
#	dao/copydata/material_report_dao.go
#	dao/copydata/population_report_dao.go
#	dao/copydata/storewide_report_detail_dao.go
#	dao/copydata/storewide_report_sum_dao.go
#	dao/copydata/task_report_dao.go
#	dao/copydata/unit_report_detail_dao.go
#	dao/copydata/unit_report_sum_dao.go
#	dao/dict/api_field_mapping_config_dao.go
#	dao/tencent/account_relation_dao.go
#	dao/tencent/audio_dao.go
#	dao/tencent/image_dao.go
#	dao/tencent/video_dao.go
#	deploy-k3s.ps1
#	model/dto/copydata/api_account_report_detail_dto.go
#	model/dto/copydata/api_account_report_sum_dto.go
#	model/dto/copydata/campaign_report_detail_dto.go
#	model/dto/copydata/campaign_report_sum_dto.go
#	model/dto/copydata/creative_report_detail_dto.go
#	model/dto/copydata/creative_report_sum_dto.go
#	model/dto/copydata/material_report_dto.go
#	model/dto/copydata/population_report_dto.go
#	model/dto/copydata/storewide_report_detail_dto.go
#	model/dto/copydata/storewide_report_sum_dto.go
#	model/dto/copydata/task_report_dto.go
#	model/dto/copydata/unit_report_detail_dto.go
#	model/dto/copydata/unit_report_sum_dto.go
#	model/dto/dict/api_field_mapping_config_dto.go
#	model/entity/copydata/api_account_report_detail.go
#	model/entity/copydata/api_account_report_sum.go
#	model/entity/copydata/campaign_report_detail.go
#	model/entity/copydata/campaign_report_sum.go
#	model/entity/copydata/creative_report_detail.go
#	model/entity/copydata/creative_report_sum.go
#	model/entity/copydata/material_report.go
#	model/entity/copydata/population_report.go
#	model/entity/copydata/storewide_report_detail.go
#	model/entity/copydata/storewide_report_sum.go
#	model/entity/copydata/task_report.go
#	model/entity/copydata/unit_report_detail.go
#	model/entity/copydata/unit_report_sum.go
#	model/entity/tencent/image.go
#	model/entity/tencent/video.go
#	scheduler/run_account_report_task.go
#	service/copydata/api_account_report_service.go
#	service/copydata/campaign_report_service.go
#	service/copydata/creative_report_sum_service.go
#	service/copydata/material_report_service.go
#	service/copydata/storewide_report_sum_service.go
#	service/copydata/task_report_service.go
#	service/copydata/unit_report_service.go
#	service/dict/api_field_mapping_config_service.go
#	service/tencent/image_service.go
#	service/tencent/video_service.go
This commit is contained in:
2026-06-11 10:15:44 +08:00
15 changed files with 32 additions and 43 deletions

View File

@@ -1,37 +1,24 @@
FROM golang:1.26.0 AS builder # 阶段1: 构建
FROM golang:alpine AS builder
RUN go env -w GO111MODULE=on RUN apk add --no-cache git ca-certificates tzdata
RUN go env -w GOPROXY=https://goproxy.cn,direct
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
ENV GO111MODULE=on
ENV GOPROXY=https://goproxy.cn,direct
ENV CGO_ENABLED=0
ENV GOTOOLCHAIN=auto
WORKDIR /build WORKDIR /build
COPY go.mod go.sum ./
COPY common ./common
RUN sed -i 's|replace gitea.com/red-future/common => ../common|replace gitea.com/red-future/common => ./common|' go.mod
RUN go mod download && go mod verify
COPY . . COPY . .
RUN go mod tidy RUN go mod download && go mod tidy
RUN CGO_ENABLED=0 GOOS=linux go build -v -o report-engine . RUN go build -ldflags="-s -w" -o main ./main.go
FROM alpine:latest
ENV TIME_ZONE=Asia/Seoul EXPOSE 3013
RUN apk add --no-cache tzdata ca-certificates && \
ln -sf /usr/share/zoneinfo/$TIME_ZONE /etc/localtime
WORKDIR /app CMD ["./main"]
COPY --from=builder /build/report-engine .
COPY config.yml .
RUN mkdir -p resource/log/server
EXPOSE 3001
CMD ["./report-engine"]

View File

@@ -1,5 +1,5 @@
server: server:
address : ":3002" address : ":3013"
name: "data-engine" name: "data-engine"
workerId: 1 workerId: 1
logPath: "resource/log/server" logPath: "resource/log/server"

View File

@@ -5,7 +5,7 @@ import (
dto "dataengine/model/dto/dict" dto "dataengine/model/dto/dict"
service "dataengine/service/dict" service "dataengine/service/dict"
"gitea.com/red-future/common/beans" "gitea.redpowerfuture.com/red-future/common/beans"
) )
type datasourcePlatformController struct{} type datasourcePlatformController struct{}

View File

@@ -5,7 +5,7 @@ import (
dto "dataengine/model/dto/dict" dto "dataengine/model/dto/dict"
service "dataengine/service/dict" service "dataengine/service/dict"
"gitea.com/red-future/common/beans" "gitea.redpowerfuture.com/red-future/common/beans"
) )
type apiInterfaceController struct{} type apiInterfaceController struct{}

View File

@@ -7,7 +7,7 @@ import (
entity "dataengine/model/entity/copydata" entity "dataengine/model/entity/copydata"
"time" "time"
"gitea.com/red-future/common/db/gfdb" "gitea.redpowerfuture.com/red-future/common/db/gfdb"
"github.com/gogf/gf/v2/database/gdb" "github.com/gogf/gf/v2/database/gdb"
"github.com/gogf/gf/v2/util/gconv" "github.com/gogf/gf/v2/util/gconv"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"

View File

@@ -9,7 +9,7 @@ import (
"strconv" "strconv"
"time" "time"
"gitea.com/red-future/common/db/gfdb" "gitea.redpowerfuture.com/red-future/common/db/gfdb"
"github.com/gogf/gf/v2/database/gdb" "github.com/gogf/gf/v2/database/gdb"
"github.com/gogf/gf/v2/frame/g" "github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/util/gconv" "github.com/gogf/gf/v2/util/gconv"

View File

@@ -6,7 +6,7 @@ import (
dto "dataengine/model/dto/dict" dto "dataengine/model/dto/dict"
entity "dataengine/model/entity/dict" entity "dataengine/model/entity/dict"
"gitea.com/red-future/common/db/gfdb" "gitea.redpowerfuture.com/red-future/common/db/gfdb"
"github.com/gogf/gf/v2/database/gdb" "github.com/gogf/gf/v2/database/gdb"
"github.com/gogf/gf/v2/frame/g" "github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/util/gconv" "github.com/gogf/gf/v2/util/gconv"

4
go.mod
View File

@@ -3,7 +3,7 @@ module dataengine
go 1.26.0 go 1.26.0
require ( require (
gitea.com/red-future/common v0.0.4 gitea.redpowerfuture.com/red-future/common v0.0.23
github.com/gogf/gf/contrib/drivers/pgsql/v2 v2.10.0 github.com/gogf/gf/contrib/drivers/pgsql/v2 v2.10.0
github.com/gogf/gf/contrib/nosql/redis/v2 v2.9.5 github.com/gogf/gf/contrib/nosql/redis/v2 v2.9.5
github.com/gogf/gf/v2 v2.10.0 github.com/gogf/gf/v2 v2.10.0
@@ -13,7 +13,7 @@ require (
golang.org/x/sync v0.18.0 golang.org/x/sync v0.18.0
) )
replace gitea.com/red-future/common => ../common replace gitea.redpowerfuture.com/red-future/common => ../common
require ( require (
github.com/BurntSushi/toml v1.5.0 // indirect github.com/BurntSushi/toml v1.5.0 // indirect

2
go.sum
View File

@@ -1,4 +1,6 @@
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
gitea.redpowerfuture.com/red-future/common v0.0.23 h1:xieoA00iKOCDm5SO9iXn+cSyMKBAlZwI0fuEVPWrHLg=
gitea.redpowerfuture.com/red-future/common v0.0.23/go.mod h1:50U1Xi+Ie56z09S5LQbZvaken0Mxv3OeS9LgR7U/ZRY=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/toml v1.5.0 h1:W5quZX/G/csjUnuI8SUYlsHs9M38FC7znL0lIO+DvMg= github.com/BurntSushi/toml v1.5.0 h1:W5quZX/G/csjUnuI8SUYlsHs9M38FC7znL0lIO+DvMg=
github.com/BurntSushi/toml v1.5.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= github.com/BurntSushi/toml v1.5.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=

View File

@@ -6,9 +6,9 @@ import (
syncCtrl "dataengine/controller/sync" syncCtrl "dataengine/controller/sync"
syncSvc "dataengine/service/sync" syncSvc "dataengine/service/sync"
"gitea.com/red-future/common/http" "gitea.redpowerfuture.com/red-future/common/http"
"gitea.com/red-future/common/jaeger" "gitea.redpowerfuture.com/red-future/common/jaeger"
_ "gitea.com/red-future/common/k3sconfig" _ "gitea.redpowerfuture.com/red-future/common/k3sconfig"
_ "github.com/gogf/gf/contrib/drivers/pgsql/v2" _ "github.com/gogf/gf/contrib/drivers/pgsql/v2"
_ "github.com/gogf/gf/contrib/nosql/redis/v2" _ "github.com/gogf/gf/contrib/nosql/redis/v2"
"github.com/gogf/gf/v2/frame/g" "github.com/gogf/gf/v2/frame/g"

View File

@@ -4,7 +4,7 @@ import (
"dataengine/consts/api-feature" "dataengine/consts/api-feature"
entity "dataengine/model/entity/dict" entity "dataengine/model/entity/dict"
"gitea.com/red-future/common/beans" "gitea.redpowerfuture.com/red-future/common/beans"
"github.com/gogf/gf/v2/frame/g" "github.com/gogf/gf/v2/frame/g"
) )

View File

@@ -4,7 +4,7 @@ import (
"dataengine/consts/api-feature" "dataengine/consts/api-feature"
entity "dataengine/model/entity/dict" entity "dataengine/model/entity/dict"
"gitea.com/red-future/common/beans" "gitea.redpowerfuture.com/red-future/common/beans"
"github.com/gogf/gf/v2/frame/g" "github.com/gogf/gf/v2/frame/g"
) )

View File

@@ -1,6 +1,6 @@
package copydata package copydata
import "gitea.com/red-future/common/beans" import "gitea.redpowerfuture.com/red-future/common/beans"
// SyncTaskLog 同步任务日志实体 // SyncTaskLog 同步任务日志实体
type SyncTaskLog struct { type SyncTaskLog struct {

View File

@@ -3,7 +3,7 @@ package dict
import ( import (
consts "dataengine/consts/api-feature" consts "dataengine/consts/api-feature"
"gitea.com/red-future/common/beans" "gitea.redpowerfuture.com/red-future/common/beans"
) )
// ApiInterface 接口管理实体 // ApiInterface 接口管理实体

View File

@@ -9,7 +9,7 @@ import (
taskDto "dataengine/model/dto/copydata" taskDto "dataengine/model/dto/copydata"
syncSvc "dataengine/service/sync" syncSvc "dataengine/service/sync"
"gitea.com/red-future/common/beans" "gitea.redpowerfuture.com/red-future/common/beans"
_ "github.com/gogf/gf/contrib/drivers/pgsql/v2" _ "github.com/gogf/gf/contrib/drivers/pgsql/v2"
"github.com/gogf/gf/v2/frame/g" "github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gctx" "github.com/gogf/gf/v2/os/gctx"