修改项目module

This commit is contained in:
wolter 2024-07-31 17:21:03 +08:00
parent c57b4eaa54
commit 89f1c7895a
31 changed files with 70 additions and 70 deletions

View File

@ -3,7 +3,7 @@ package bannerlistcache
import (
"sync"
"qteam/app/caches"
"PaymentCenter/app/caches"
"github.com/qit-team/snow-core/cache"
)
@ -21,7 +21,7 @@ type bannerListCache struct {
cache.BaseCache
}
//单例模式
// 单例模式
func GetInstance() *bannerListCache {
once.Do(func() {
instance = new(bannerListCache)

View File

@ -5,7 +5,7 @@ import (
"fmt"
"testing"
"qteam/config"
"PaymentCenter/config"
"github.com/qit-team/snow-core/cache"
_ "github.com/qit-team/snow-core/cache/rediscache"

View File

@ -1,6 +1,8 @@
package controllers
import (
"PaymentCenter/app/utils"
"PaymentCenter/config"
"bytes"
"context"
"encoding/base64"
@ -13,10 +15,8 @@ import (
zh_translations "gopkg.in/go-playground/validator.v9/translations/zh"
"io/ioutil"
"net/http"
"qteam/app/utils"
"qteam/config"
"qteam/app/constants/errorcode"
"PaymentCenter/app/constants/errorcode"
"github.com/gin-gonic/gin"
)

View File

@ -3,7 +3,7 @@ package metric
import (
"net/http"
"qteam/app/utils/metric"
"PaymentCenter/app/utils/metric"
"github.com/prometheus/client_golang/prometheus"
)

View File

@ -1,15 +1,15 @@
package middlewares
import (
"PaymentCenter/app/constants/common"
"PaymentCenter/app/constants/errorcode"
"PaymentCenter/app/http/controllers"
"PaymentCenter/app/http/requestmapping"
"PaymentCenter/app/utils"
"context"
"errors"
"github.com/gin-gonic/gin"
"github.com/qit-team/snow-core/redis"
"qteam/app/constants/common"
"qteam/app/constants/errorcode"
"qteam/app/http/controllers"
"qteam/app/http/requestmapping"
"qteam/app/utils"
"strings"
)

View File

@ -3,7 +3,7 @@ package middlewares
import (
"time"
"qteam/app/http/metric"
"PaymentCenter/app/http/metric"
"github.com/gin-gonic/gin"
)

View File

@ -6,8 +6,8 @@ import (
"net/http/httputil"
"runtime/debug"
"qteam/app/constants/logtype"
"qteam/config"
"PaymentCenter/app/constants/logtype"
"PaymentCenter/config"
"github.com/gin-gonic/gin"
"github.com/qit-team/snow-core/log/logger"

View File

@ -1,9 +1,9 @@
package middlewares
import (
"PaymentCenter/app/http/trace"
"PaymentCenter/app/utils"
"github.com/gin-gonic/gin"
"qteam/app/http/trace"
"qteam/app/utils"
"strconv"
)

View File

@ -1,13 +1,13 @@
package routes
import (
"PaymentCenter/app/http/controllers"
"PaymentCenter/app/http/middlewares"
"PaymentCenter/app/http/trace"
"PaymentCenter/app/utils"
"PaymentCenter/config"
"github.com/gin-gonic/gin"
"github.com/qit-team/snow-core/http/middleware"
"qteam/app/http/controllers"
"qteam/app/http/middlewares"
"qteam/app/http/trace"
"qteam/app/utils"
"qteam/config"
)
func RegisterAdminRoute(router *gin.Engine) {

View File

@ -4,11 +4,11 @@ package routes
* 配置路由
*/
import (
"qteam/app/http/controllers"
"qteam/app/http/middlewares"
"qteam/app/http/trace"
"qteam/app/utils/metric"
"qteam/config"
"PaymentCenter/app/http/controllers"
"PaymentCenter/app/http/middlewares"
"PaymentCenter/app/http/trace"
"PaymentCenter/app/utils/metric"
"PaymentCenter/config"
"github.com/gin-gonic/gin"
"github.com/qit-team/snow-core/http/middleware"

View File

@ -1,10 +1,10 @@
package trace
import (
"PaymentCenter/config"
"github.com/openzipkin/zipkin-go"
zkHttp "github.com/openzipkin/zipkin-go/reporter/http"
"log"
"qteam/config"
"sync"
)

View File

@ -3,8 +3,8 @@ package jobs
import (
"strings"
"qteam/app/jobs/basejob"
"qteam/config"
"PaymentCenter/app/jobs/basejob"
"PaymentCenter/config"
"github.com/qit-team/snow-core/log/logger"
"github.com/qit-team/snow-core/queue"

View File

@ -1,7 +1,7 @@
package mq
import (
"qteam/app/utils/mq"
"PaymentCenter/app/utils/mq"
)
func startQunue(name string, method interface{}, mqTp string, tp int, exhange string) {

View File

@ -1,12 +1,12 @@
package market
import (
"PaymentCenter/config"
"bytes"
"encoding/json"
"github.com/pkg/errors"
"io/ioutil"
"net/http"
"qteam/config"
)
type MarketClient struct {

View File

@ -1,9 +1,9 @@
package market
import (
"PaymentCenter/app/utils/encrypt"
"PaymentCenter/config"
"encoding/json"
"qteam/app/utils/encrypt"
"qteam/config"
"time"
)

View File

@ -1,11 +1,11 @@
package market
import (
"PaymentCenter/app/utils"
"PaymentCenter/config"
"fmt"
"github.com/qit-team/snow-core/kernel/server"
"os"
"qteam/app/utils"
"qteam/config"
"testing"
)

View File

@ -1,17 +1,17 @@
package openapiService
import (
"PaymentCenter/app/models/orderdetailsmodel"
"PaymentCenter/app/models/ordersmodel"
"PaymentCenter/app/models/usercouponmodel"
"PaymentCenter/app/utils"
"PaymentCenter/config"
"context"
"crypto/aes"
"encoding/base64"
"gitee.com/chengdu_blue_brothers/openapi-go-sdk/api"
"gitee.com/chengdu_blue_brothers/openapi-go-sdk/notify"
"net/http"
"qteam/app/models/orderdetailsmodel"
"qteam/app/models/ordersmodel"
"qteam/app/models/usercouponmodel"
"qteam/app/utils"
"qteam/config"
"time"
)

View File

@ -1,8 +1,8 @@
package httpclient
import (
"PaymentCenter/app/utils"
"fmt"
"qteam/app/utils"
"github.com/valyala/fasthttp"
"time"

View File

@ -1,8 +1,8 @@
package mq
import (
common3 "qteam/app/constants/common"
mq "qteam/app/utils/mq/mqs"
common3 "PaymentCenter/app/constants/common"
mq "PaymentCenter/app/utils/mq/mqs"
"sync"
)

View File

@ -1,13 +1,13 @@
package mq
import (
"PaymentCenter/app/utils"
"PaymentCenter/config"
"context"
"encoding/json"
"fmt"
"github.com/Shopify/sarama"
"github.com/qit-team/snow-core/redis"
"qteam/app/utils"
"qteam/config"
"strconv"
"sync"

View File

@ -1,13 +1,13 @@
package mq
import (
"PaymentCenter/app/utils"
"PaymentCenter/config"
"encoding/json"
"fmt"
"github.com/nats-io/nats.go"
_ "github.com/nats-io/nats.go"
"github.com/streadway/amqp"
"qteam/app/utils"
"qteam/config"
)
type NatsMq struct {

View File

@ -1,12 +1,12 @@
package utils
import (
"PaymentCenter/config"
"fmt"
"github.com/nacos-group/nacos-sdk-go/v2/clients"
"github.com/nacos-group/nacos-sdk-go/v2/clients/naming_client"
"github.com/nacos-group/nacos-sdk-go/v2/common/constant"
"github.com/nacos-group/nacos-sdk-go/v2/vo"
"qteam/config"
"sync"
)

View File

@ -1,13 +1,13 @@
package sm2
import (
"PaymentCenter/config"
"crypto/rand"
"encoding/base64"
"encoding/hex"
"fmt"
"github.com/tjfoc/gmsm/sm2"
"math/big"
"qteam/config"
"strings"
)

View File

@ -1,6 +1,8 @@
package utils
import (
"PaymentCenter/app/constants/common"
"PaymentCenter/config"
"context"
"crypto/md5"
"crypto/rand"
@ -19,8 +21,6 @@ import (
"net"
"os"
"path/filepath"
"qteam/app/constants/common"
"qteam/config"
"reflect"
"regexp"
"runtime"

View File

@ -1,10 +1,10 @@
package bootstrap
import (
"PaymentCenter/app/jobs"
"PaymentCenter/app/jobs/basejob"
"PaymentCenter/config"
"github.com/qit-team/snow-core/log/accesslogger"
"qteam/app/jobs"
"qteam/app/jobs/basejob"
"qteam/config"
"github.com/qit-team/snow-core/db"
"github.com/qit-team/snow-core/kernel/close"

View File

@ -1,6 +1,6 @@
package event
import "qteam/app/utils"
import "PaymentCenter/app/utils"
type EventHandler interface {
Handle(param interface{})

View File

@ -1,8 +1,8 @@
package event
import (
"qteam/app/constants/common"
"qteam/event/observers"
"PaymentCenter/app/constants/common"
"PaymentCenter/event/observers"
)
/**

2
go.mod
View File

@ -1,4 +1,4 @@
module qteam
module PaymentCenter
go 1.21

14
main.go
View File

@ -1,16 +1,16 @@
package main
import (
"PaymentCenter/app/console"
"PaymentCenter/app/http/routes"
"PaymentCenter/app/jobs"
"PaymentCenter/bootstrap"
"PaymentCenter/config"
_ "PaymentCenter/docs"
"PaymentCenter/rpc"
"errors"
"fmt"
"os"
"qteam/app/console"
"qteam/app/http/routes"
"qteam/app/jobs"
"qteam/bootstrap"
"qteam/config"
_ "qteam/docs"
"qteam/rpc"
_ "github.com/go-sql-driver/mysql"
_ "github.com/qit-team/snow-core/cache/rediscache"

View File

@ -1,8 +1,8 @@
package rpc
import (
__ "PaymentCenter/rpc/user"
"github.com/qit-team/snow-core/kernel/server"
__ "qteam/rpc/user"
)
func StartRpc() error {
@ -10,7 +10,7 @@ func StartRpc() error {
//等待停止信号
server.WaitStop()
return nil
}

View File

@ -1,12 +1,12 @@
package __
import (
"PaymentCenter/app/utils"
"PaymentCenter/config"
"context"
"google.golang.org/grpc"
"log"
"net"
"qteam/app/utils"
"qteam/config"
)
// 服务定义