update
This commit is contained in:
parent
eac96374bd
commit
f22d048ccc
@ -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 {
|
||||
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
@ -2,7 +2,7 @@ package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
"youtu_ecpm/dao/query"
|
||||
"gitea.youtukeji.com.cn/xiabin/youtu_ecpm/dao/query"
|
||||
)
|
||||
|
||||
type AppAccount struct {
|
||||
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
@ -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"
|
||||
|
@ -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 {
|
||||
|
@ -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"
|
||||
|
@ -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 {
|
||||
|
@ -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"
|
||||
|
@ -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 {
|
||||
|
@ -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"
|
||||
|
@ -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" ]
|
||||
|
||||
|
2
go.mod
2
go.mod
@ -1,4 +1,4 @@
|
||||
module youtu_ecpm
|
||||
module gitea.youtukeji.com.cn/xiabin/youtu_ecpm
|
||||
|
||||
go 1.23.4
|
||||
|
||||
|
8
main.go
8
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() {
|
||||
|
@ -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
|
||||
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
6
wire.go
6
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.
|
||||
|
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user