diff --git a/api/gin/controller/app_user_info.go b/api/gin/controller/app_user_info.go index ebafcc7..155ecb2 100644 --- a/api/gin/controller/app_user_info.go +++ b/api/gin/controller/app_user_info.go @@ -1,10 +1,10 @@ package controller import ( + "gitea.youtukeji.com.cn/xiabin/youtu_ecpm/api/gin/service" + "gitea.youtukeji.com.cn/xiabin/youtu_ecpm/dao/query" "github.com/gin-gonic/gin" "go.uber.org/zap" - "youtu_ecpm/api/gin/service" - "youtu_ecpm/dao/query" ) type AppUserInfo struct { diff --git a/api/gin/controller/douyin_open_api.go b/api/gin/controller/douyin_open_api.go index e5d8ff2..e65d56c 100644 --- a/api/gin/controller/douyin_open_api.go +++ b/api/gin/controller/douyin_open_api.go @@ -4,14 +4,14 @@ import ( "context" "errors" "gitea.youtukeji.com.cn/xiabin/douyin-openapi/cache" + "gitea.youtukeji.com.cn/xiabin/youtu_ecpm/api/gin/service" + "gitea.youtukeji.com.cn/xiabin/youtu_ecpm/dao/model" + "gitea.youtukeji.com.cn/xiabin/youtu_ecpm/dao/query" + "gitea.youtukeji.com.cn/xiabin/youtu_ecpm/pkg/douyinapi" "github.com/gin-gonic/gin" "go.uber.org/zap" "net/http" "time" - "youtu_ecpm/api/gin/service" - "youtu_ecpm/dao/model" - "youtu_ecpm/dao/query" - "youtu_ecpm/pkg/douyinapi" ) type DouyinOpenApiController struct { diff --git a/api/gin/controller/ranking_list.go b/api/gin/controller/ranking_list.go index bb1559d..88b60a0 100644 --- a/api/gin/controller/ranking_list.go +++ b/api/gin/controller/ranking_list.go @@ -1,11 +1,11 @@ package controller import ( + "gitea.youtukeji.com.cn/xiabin/youtu_ecpm/api/gin/service" + "gitea.youtukeji.com.cn/xiabin/youtu_ecpm/dao/query" "github.com/gin-gonic/gin" "go.uber.org/zap" "net/http" - "youtu_ecpm/api/gin/service" - "youtu_ecpm/dao/query" ) type RankingList struct { diff --git a/api/gin/controller/wechat_open_api.go b/api/gin/controller/wechat_open_api.go index b178556..e6711b9 100644 --- a/api/gin/controller/wechat_open_api.go +++ b/api/gin/controller/wechat_open_api.go @@ -4,13 +4,13 @@ import ( "context" "errors" "gitea.youtukeji.com.cn/xiabin/douyin-openapi/cache" + "gitea.youtukeji.com.cn/xiabin/youtu_ecpm/api/gin/service" + "gitea.youtukeji.com.cn/xiabin/youtu_ecpm/dao/model" + "gitea.youtukeji.com.cn/xiabin/youtu_ecpm/dao/query" + "gitea.youtukeji.com.cn/xiabin/youtu_ecpm/pkg/wechat_api" "github.com/gin-gonic/gin" "go.uber.org/zap" "net/http" - "youtu_ecpm/api/gin/service" - "youtu_ecpm/dao/model" - "youtu_ecpm/dao/query" - "youtu_ecpm/pkg/wechat_api" ) type WechatOpenApiController struct { diff --git a/api/gin/gin.go b/api/gin/gin.go index 191b1e6..b031706 100644 --- a/api/gin/gin.go +++ b/api/gin/gin.go @@ -3,6 +3,8 @@ package ecpm_httpserver import ( "context" "errors" + "gitea.youtukeji.com.cn/xiabin/youtu_ecpm/api/gin/controller" + "gitea.youtukeji.com.cn/xiabin/youtu_ecpm/dao/query" ginzap "github.com/gin-contrib/zap" "github.com/gin-gonic/gin" "go.uber.org/zap" @@ -10,8 +12,6 @@ import ( "os" "os/signal" "time" - "youtu_ecpm/api/gin/controller" - "youtu_ecpm/dao/query" ) type HttpServer struct { diff --git a/api/gin/service/app_account.go b/api/gin/service/app_account.go index 8b42b5a..f5d40e4 100644 --- a/api/gin/service/app_account.go +++ b/api/gin/service/app_account.go @@ -2,7 +2,7 @@ package service import ( "context" - "youtu_ecpm/dao/query" + "gitea.youtukeji.com.cn/xiabin/youtu_ecpm/dao/query" ) type AppAccount struct { diff --git a/api/gin/service/app_user_info.go b/api/gin/service/app_user_info.go index d012ba7..b624d3c 100644 --- a/api/gin/service/app_user_info.go +++ b/api/gin/service/app_user_info.go @@ -3,10 +3,10 @@ package service import ( "context" "errors" + "gitea.youtukeji.com.cn/xiabin/youtu_ecpm/dao/model" + "gitea.youtukeji.com.cn/xiabin/youtu_ecpm/dao/query" "github.com/gin-gonic/gin" "gorm.io/gorm" - "youtu_ecpm/dao/model" - "youtu_ecpm/dao/query" ) type AppUserInfo struct { diff --git a/api/gin/service/ranking_list.go b/api/gin/service/ranking_list.go index f322489..665adb9 100644 --- a/api/gin/service/ranking_list.go +++ b/api/gin/service/ranking_list.go @@ -3,10 +3,10 @@ package service import ( "context" "gitea.youtukeji.com.cn/xiabin/douyin-openapi/cache" + "gitea.youtukeji.com.cn/xiabin/youtu_ecpm/dao/model" + "gitea.youtukeji.com.cn/xiabin/youtu_ecpm/dao/query" "strconv" "sync" - "youtu_ecpm/dao/model" - "youtu_ecpm/dao/query" ) type RankingList struct { diff --git a/dao/query/app_account.gen.go b/dao/query/app_account.gen.go index 1adcc87..ec280c5 100644 --- a/dao/query/app_account.gen.go +++ b/dao/query/app_account.gen.go @@ -16,7 +16,7 @@ import ( "gorm.io/plugin/dbresolver" - "youtu_ecpm/dao/model" + "gitea.youtukeji.com.cn/xiabin/youtu_ecpm/dao/model" ) func newAppAccount(db *gorm.DB, opts ...gen.DOOption) appAccount { diff --git a/dao/query/app_account.gen_test.go b/dao/query/app_account.gen_test.go index a60c31c..c07e40c 100644 --- a/dao/query/app_account.gen_test.go +++ b/dao/query/app_account.gen_test.go @@ -9,7 +9,7 @@ import ( "fmt" "testing" - "youtu_ecpm/dao/model" + "gitea.youtukeji.com.cn/xiabin/youtu_ecpm/dao/model" "gorm.io/gen" "gorm.io/gen/field" diff --git a/dao/query/app_user_info.gen.go b/dao/query/app_user_info.gen.go index 0431753..4bd1ee4 100644 --- a/dao/query/app_user_info.gen.go +++ b/dao/query/app_user_info.gen.go @@ -16,7 +16,7 @@ import ( "gorm.io/plugin/dbresolver" - "youtu_ecpm/dao/model" + "gitea.youtukeji.com.cn/xiabin/youtu_ecpm/dao/model" ) func newAppUserInfo(db *gorm.DB, opts ...gen.DOOption) appUserInfo { diff --git a/dao/query/app_user_info.gen_test.go b/dao/query/app_user_info.gen_test.go index f3126f2..259dc53 100644 --- a/dao/query/app_user_info.gen_test.go +++ b/dao/query/app_user_info.gen_test.go @@ -9,7 +9,7 @@ import ( "fmt" "testing" - "youtu_ecpm/dao/model" + "gitea.youtukeji.com.cn/xiabin/youtu_ecpm/dao/model" "gorm.io/gen" "gorm.io/gen/field" diff --git a/dao/query/douyin_ecpm_config.gen.go b/dao/query/douyin_ecpm_config.gen.go index 8dcd085..7146eeb 100644 --- a/dao/query/douyin_ecpm_config.gen.go +++ b/dao/query/douyin_ecpm_config.gen.go @@ -16,7 +16,7 @@ import ( "gorm.io/plugin/dbresolver" - "youtu_ecpm/dao/model" + "gitea.youtukeji.com.cn/xiabin/youtu_ecpm/dao/model" ) func newDouyinEcpmConfig(db *gorm.DB, opts ...gen.DOOption) douyinEcpmConfig { diff --git a/dao/query/douyin_ecpm_config.gen_test.go b/dao/query/douyin_ecpm_config.gen_test.go index 7892e68..d113228 100644 --- a/dao/query/douyin_ecpm_config.gen_test.go +++ b/dao/query/douyin_ecpm_config.gen_test.go @@ -9,7 +9,7 @@ import ( "fmt" "testing" - "youtu_ecpm/dao/model" + "gitea.youtukeji.com.cn/xiabin/youtu_ecpm/dao/model" "gorm.io/gen" "gorm.io/gen/field" diff --git a/dao/query/game_score.gen.go b/dao/query/game_score.gen.go index 7bdd97f..530ca7e 100644 --- a/dao/query/game_score.gen.go +++ b/dao/query/game_score.gen.go @@ -16,7 +16,7 @@ import ( "gorm.io/plugin/dbresolver" - "youtu_ecpm/dao/model" + "gitea.youtukeji.com.cn/xiabin/youtu_ecpm/dao/model" ) func newGameScore(db *gorm.DB, opts ...gen.DOOption) gameScore { diff --git a/dao/query/game_score.gen_test.go b/dao/query/game_score.gen_test.go index 17d5952..bc95965 100644 --- a/dao/query/game_score.gen_test.go +++ b/dao/query/game_score.gen_test.go @@ -9,7 +9,7 @@ import ( "fmt" "testing" - "youtu_ecpm/dao/model" + "gitea.youtukeji.com.cn/xiabin/youtu_ecpm/dao/model" "gorm.io/gen" "gorm.io/gen/field" diff --git a/docker-compose.yaml b/docker-compose.yaml index 3fb196e..147e888 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -19,7 +19,7 @@ services: - ./data/mysql/data:/var/lib/mysql - ./data/mysql/logs:/var/log/mysql ##初始化的脚本,初始化我们存放的init.sql文件 - - ./data/mysql/initdb:/docker-entrypoint-initdb.d/ + - ./sql:/docker-entrypoint-initdb.d/ - ./data/mysql/conf:/etc/mysql/conf.d ports: - "3306:3306" @@ -29,3 +29,19 @@ services: timeout: 5s retries: 10 #network_mode: host + redis: + image: redis + restart: always + hostname: redis + container_name: redis + privileged: true + ports: + - "6379:6379" + environment: + TZ: Asia/Shanghai + volumes: + - ./data/redis:/data +# - ./conf/redis.conf:/etc/redis/redis.conf + - ./data/redis/logs:/logs +# command: [ "redis-server","/etc/redis/redis.conf" ] + diff --git a/go.mod b/go.mod index 718625e..8e22295 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module youtu_ecpm +module gitea.youtukeji.com.cn/xiabin/youtu_ecpm go 1.23.4 diff --git a/main.go b/main.go index 67f5f22..a74ebf1 100644 --- a/main.go +++ b/main.go @@ -1,10 +1,10 @@ package main import ( - "youtu_ecpm/dao/query" - "youtu_ecpm/pkg/config" - "youtu_ecpm/pkg/db" - "youtu_ecpm/pkg/log" + "gitea.youtukeji.com.cn/xiabin/youtu_ecpm/dao/query" + "gitea.youtukeji.com.cn/xiabin/youtu_ecpm/pkg/config" + "gitea.youtukeji.com.cn/xiabin/youtu_ecpm/pkg/db" + "gitea.youtukeji.com.cn/xiabin/youtu_ecpm/pkg/log" ) func main() { diff --git a/pkg/db/gorm.go b/pkg/db/gorm.go index 0d4014d..054f0cd 100644 --- a/pkg/db/gorm.go +++ b/pkg/db/gorm.go @@ -2,9 +2,9 @@ package db import ( "fmt" + "gitea.youtukeji.com.cn/xiabin/youtu_ecpm/pkg/config" "gorm.io/driver/mysql" "gorm.io/gorm" - "youtu_ecpm/pkg/config" ) var Db *gorm.DB diff --git a/pkg/douyinapi/client.go b/pkg/douyinapi/client.go index 4d0a1fe..df75fef 100644 --- a/pkg/douyinapi/client.go +++ b/pkg/douyinapi/client.go @@ -5,9 +5,9 @@ import ( douyinopenapi "gitea.youtukeji.com.cn/xiabin/douyin-openapi" access_token "gitea.youtukeji.com.cn/xiabin/douyin-openapi/access-token" "gitea.youtukeji.com.cn/xiabin/douyin-openapi/cache" + errors2 "gitea.youtukeji.com.cn/xiabin/youtu_ecpm/pkg/errors" "gorm.io/gorm" "sync" - errors2 "youtu_ecpm/pkg/errors" ) type DouYinOpenApiClient struct { diff --git a/pkg/wechat_api/client.go b/pkg/wechat_api/client.go index 73931ca..7a41c9c 100644 --- a/pkg/wechat_api/client.go +++ b/pkg/wechat_api/client.go @@ -2,12 +2,12 @@ package wechat_api import ( "gitea.youtukeji.com.cn/xiabin/douyin-openapi/cache" + "gitea.youtukeji.com.cn/xiabin/youtu_ecpm/pkg/errors" "github.com/silenceper/wechat/v2" "github.com/silenceper/wechat/v2/miniprogram" miniConfig "github.com/silenceper/wechat/v2/miniprogram/config" "gorm.io/gorm" "sync" - "youtu_ecpm/pkg/errors" ) type WechatApi struct { diff --git a/server/ecpm.go b/server/ecpm.go index df2caf6..7529d3f 100644 --- a/server/ecpm.go +++ b/server/ecpm.go @@ -1,7 +1,7 @@ package server import ( - ecpmhttpserver "youtu_ecpm/api/gin" + ecpmhttpserver "gitea.youtukeji.com.cn/xiabin/youtu_ecpm/api/gin" ) type EcpmApp struct { diff --git a/wire.go b/wire.go index 29abb88..0e8ea4c 100644 --- a/wire.go +++ b/wire.go @@ -5,11 +5,11 @@ package main import ( + ecpm_httpserver "gitea.youtukeji.com.cn/xiabin/youtu_ecpm/api/gin" + "gitea.youtukeji.com.cn/xiabin/youtu_ecpm/dao/query" + "gitea.youtukeji.com.cn/xiabin/youtu_ecpm/server" "github.com/google/wire" "go.uber.org/zap" - ecpm_httpserver "youtu_ecpm/api/gin" - "youtu_ecpm/dao/query" - "youtu_ecpm/server" ) // wireApp init kratos application. diff --git a/wire_gen.go b/wire_gen.go index ac7347d..991d5e2 100644 --- a/wire_gen.go +++ b/wire_gen.go @@ -7,10 +7,10 @@ package main import ( + "gitea.youtukeji.com.cn/xiabin/youtu_ecpm/api/gin" + "gitea.youtukeji.com.cn/xiabin/youtu_ecpm/dao/query" + "gitea.youtukeji.com.cn/xiabin/youtu_ecpm/server" "go.uber.org/zap" - "youtu_ecpm/api/gin" - "youtu_ecpm/dao/query" - "youtu_ecpm/server" ) // Injectors from wire.go: