WH01243 1 жил өмнө
parent
commit
1f5b145029

+ 2 - 2
core/logs/init.go

@@ -2,8 +2,8 @@ package logs
 
 import (
 	log "app.yhyue.com/moapp/jylog"
-	"bp.jydev.jianyu360.cn/BaseService/gateway/core/logs/internal/notice"
-	"bp.jydev.jianyu360.cn/BaseService/gateway/core/logs/internal/savedb"
+	"bp.jydev.jianyu360.cn/BaseService/tripartite_gateway/core/logs/internal/notice"
+	"bp.jydev.jianyu360.cn/BaseService/tripartite_gateway/core/logs/internal/savedb"
 	"github.com/gogf/gf/v2/os/gctx"
 )
 

+ 3 - 3
core/logs/serverLogs.go

@@ -3,9 +3,9 @@ package logs
 import (
 	log "app.yhyue.com/moapp/jylog"
 	. "bp.jydev.jianyu360.cn/BaseService/gateway/common/gatecode"
-	"bp.jydev.jianyu360.cn/BaseService/gateway/core/logs/internal/notice"
-	"bp.jydev.jianyu360.cn/BaseService/gateway/core/logs/internal/savedb"
-	"bp.jydev.jianyu360.cn/BaseService/gateway/core/router"
+	"bp.jydev.jianyu360.cn/BaseService/tripartite_gateway/core/logs/internal/notice"
+	"bp.jydev.jianyu360.cn/BaseService/tripartite_gateway/core/logs/internal/savedb"
+	"bp.jydev.jianyu360.cn/BaseService/tripartite_gateway/core/router"
 	"encoding/json"
 	"fmt"
 	"github.com/gogf/gf/v2/errors/gerror"

+ 1 - 1
core/node/hellowrold/main.go

@@ -1,7 +1,7 @@
 package main
 
 import (
-	"bp.jydev.jianyu360.cn/BaseService/gateway/core/node"
+	"bp.jydev.jianyu360.cn/BaseService/tripartite_gateway/core/node"
 	"fmt"
 	"github.com/gogf/gf/v2/frame/g"
 	"github.com/gogf/gf/v2/net/ghttp"

+ 1 - 1
core/proxy/broker/broker.go

@@ -2,7 +2,7 @@ package broker
 
 import (
 	. "bp.jydev.jianyu360.cn/BaseService/gateway/common/gatecode"
-	"bp.jydev.jianyu360.cn/BaseService/gateway/core/proxy/loadmodule"
+	"bp.jydev.jianyu360.cn/BaseService/tripartite_gateway/core/proxy/loadmodule"
 	"fmt"
 	"github.com/gogf/gf/v2/net/ghttp"
 	"github.com/gogf/gf/v2/net/gtrace"

+ 1 - 1
core/proxy/broker/outServer/SussBi.go

@@ -13,7 +13,7 @@ import (
 	"time"
 
 	"app.yhyue.com/moapp/jybase/common"
-	"bp.jydev.jianyu360.cn/BaseService/gateway/core/router"
+	"bp.jydev.jianyu360.cn/BaseService/tripartite_gateway/core/router"
 	"github.com/gogf/gf/v2/net/ghttp"
 	"github.com/gogf/gf/v2/util/gconv"
 	"golang.org/x/net/publicsuffix"

+ 1 - 1
core/proxy/middleware/errorHandler.go

@@ -2,7 +2,7 @@ package middleware
 
 import (
 	. "bp.jydev.jianyu360.cn/BaseService/gateway/common/gatecode"
-	"bp.jydev.jianyu360.cn/BaseService/gateway/core/logs"
+	"bp.jydev.jianyu360.cn/BaseService/tripartite_gateway/core/logs"
 	"github.com/gogf/gf/v2/errors/gcode"
 	"github.com/gogf/gf/v2/errors/gerror"
 	"github.com/gogf/gf/v2/net/ghttp"

+ 1 - 1
core/proxy/proxyClient/proxyClient.go

@@ -1,7 +1,7 @@
 package proxyClient
 
 import (
-	"bp.jydev.jianyu360.cn/BaseService/gateway/core/util"
+	"bp.jydev.jianyu360.cn/BaseService/tripartite_gateway/core/util"
 	"github.com/gogf/gf/v2/os/gcfg"
 	"github.com/gogf/gf/v2/os/gctx"
 	"net"

+ 3 - 5
core/proxy/proxyServer.go

@@ -3,9 +3,9 @@ package proxy
 import (
 	log "app.yhyue.com/moapp/jylog"
 	. "bp.jydev.jianyu360.cn/BaseService/gateway/common/gatecode"
-	"bp.jydev.jianyu360.cn/BaseService/gateway/core/proxy/middleware"
-	"bp.jydev.jianyu360.cn/BaseService/gateway/core/proxy/proxyClient"
-	"bp.jydev.jianyu360.cn/BaseService/gateway/core/router"
+	"bp.jydev.jianyu360.cn/BaseService/tripartite_gateway/core/proxy/middleware"
+	"bp.jydev.jianyu360.cn/BaseService/tripartite_gateway/core/proxy/proxyClient"
+	"bp.jydev.jianyu360.cn/BaseService/tripartite_gateway/core/router"
 	"fmt"
 	"github.com/gogf/gf/v2/frame/g"
 	"github.com/gogf/gf/v2/net/ghttp"
@@ -44,8 +44,6 @@ func InitGateWayServer(initCtx gctx.Ctx) *ghttp.Server {
 	})
 	gateWayServer.Use(middleware.FilterHandler) //权限过滤
 
-	//加载代理客户端
-	proxyClient.ReLoadClient()
 	//注册代理
 	gateWayServer.BindHandler("POST:/*", proxyHandler)             //接口代理
 	gateWayServer.BindHandler("GET:/*", proxyHandler)              //页面代理

+ 0 - 8
core/proxy/rpc/init.go

@@ -1,8 +0,0 @@
-package rpc
-
-// InitBaseServerRpc 初始化基础服务rpc
-func InitBaseServerRpc() {
-	initResourceCenterRpc()
-	initUserCenterRpc()
-	initPowerCheckCenterRpcRpc()
-}

+ 0 - 72
core/proxy/rpc/powerCheckCenter.go

@@ -1,72 +0,0 @@
-package rpc
-
-import (
-	"fmt"
-	"github.com/gogf/gf/v2/net/gtrace"
-
-	. "bp.jydev.jianyu360.cn/BaseService/gateway/common/gatecode"
-	"bp.jydev.jianyu360.cn/BaseService/powerCheckCenter/rpc/pb"
-	"bp.jydev.jianyu360.cn/BaseService/powerCheckCenter/rpc/powercheck"
-	"github.com/gogf/gf/v2/os/gcfg"
-	"github.com/gogf/gf/v2/os/gctx"
-	"github.com/zeromicro/go-zero/core/discov"
-	"github.com/zeromicro/go-zero/zrpc"
-)
-
-var PowerCheckCenterRpc powercheck.PowerCheck
-
-func initPowerCheckCenterRpcRpc() {
-	PowerCheckCenterRpc = powercheck.NewPowerCheck(zrpc.MustNewClient(zrpc.RpcClientConf{
-		Etcd: discov.EtcdConf{
-			Key:   gcfg.Instance().MustGet(gctx.New(), "etcd.baseserver.powerCheckCenter.key", nil).String(),
-			Hosts: gcfg.Instance().MustGet(gctx.New(), "etcd.baseserver.powerCheckCenter.address", nil).Strings(),
-		},
-	}))
-}
-
-func CheckUserPower(ctx gctx.Ctx, power_type int, appid, userId string, baseUserId, accountId, entId, positionType, positionId int64) error {
-	ctx, span := gtrace.NewSpan(ctx, "CheckUserPower")
-	defer span.End()
-	res, err := PowerCheckCenterRpc.Check(gctx.New(), &pb.CheckReq{
-		Appid:        appid,
-		Userid:       userId,
-		BaseUserId:   baseUserId,
-		AccountId:    accountId,
-		EntId:        entId,
-		PositionType: positionType,
-		PositionId:   positionId,
-	})
-	if err != nil {
-		return err
-	}
-	/*
-		权益判断方式、0走资源中台
-		1前置代理判断,是否是付费用户
-		2前置代理判断,是否是超级订阅
-		3前置代理判断,是否是大会员
-		4前置代理判断,是否是商机管理
-	*/
-	switch power_type {
-	case 1:
-		if res.Vip.Status <= 0 && res.Member.Status <= 0 && res.Entniche.Status <= 0 {
-			return NewErrorWithCode(GLOBAL_ERR_NOPOWER, fmt.Sprintf("该用户非付费用户"))
-		}
-	case 2:
-		if res.Vip.Status <= 0 {
-			return NewErrorWithCode(GLOBAL_ERR_NOPOWER, fmt.Sprintf("该用户非超级订阅用户"))
-		}
-	case 3:
-		if res.Member.Status <= 0 {
-			return NewErrorWithCode(GLOBAL_ERR_NOPOWER, fmt.Sprintf("该用户非大会员用户"))
-		}
-	case 4:
-		if res.Entniche.Status <= 0 {
-			return NewErrorWithCode(GLOBAL_ERR_NOPOWER, fmt.Sprintf("该用户非商机管理用户"))
-		}
-	case 22: //临时加大会员专家版、商机版判断
-		if !(res.Member.Status == 1 || res.Member.Status == 2 || res.Member.Status == 6 || res.Member.Status == 7) {
-			return NewErrorWithCode(GLOBAL_ERR_NOPOWER, fmt.Sprintf("该用户非大会员专家版、商机版用户"))
-		}
-	}
-	return nil
-}

+ 0 - 158
core/proxy/rpc/resourceCenter.go

@@ -1,158 +0,0 @@
-package rpc
-
-import (
-	"fmt"
-	"github.com/gogf/gf/v2/frame/g"
-	"github.com/gogf/gf/v2/net/gtrace"
-	"strings"
-
-	. "bp.jydev.jianyu360.cn/BaseService/gateway/common/gatecode"
-	"bp.jydev.jianyu360.cn/BaseService/resourceCenter/rpc/pb"
-	"bp.jydev.jianyu360.cn/BaseService/resourceCenter/rpc/resource"
-	"github.com/gogf/gf/v2/os/gcfg"
-	"github.com/gogf/gf/v2/os/gctx"
-	"github.com/zeromicro/go-zero/core/discov"
-	"github.com/zeromicro/go-zero/zrpc"
-)
-
-var ResourceCenterRpc resource.Resource
-
-func initResourceCenterRpc() {
-	ResourceCenterRpc = resource.NewResource(zrpc.MustNewClient(zrpc.RpcClientConf{
-		Etcd: discov.EtcdConf{
-			Key:   gcfg.Instance().MustGet(gctx.New(), "etcd.baseserver.resourceCenter.key", nil).String(),
-			Hosts: gcfg.Instance().MustGet(gctx.New(), "etcd.baseserver.resourceCenter.address", nil).Strings(),
-		},
-	}))
-}
-
-// CheckResourcePower 校验账户是否有对应权益
-// accountId 账户id
-// entAccountId 企业账户id
-// entId 企业id
-// entUserId 企业员工id
-// funcCode 业务代码
-// reqFuncCode 	 通用结构&&需要校验权限则先判断此接口是否有此functionCode的方法
-// appid 平台标识
-func CheckResourcePower(ctx gctx.Ctx, accountId, entAccountId, entId, entUserId int64, funcCodeRule, reqFuncCode, Appid string) (UseCount, SurplusCount int64, err error) {
-	ctx, span := gtrace.NewSpan(ctx, "CheckResourcePower")
-	defer span.End()
-
-	funcCode := funcCodeRule
-	funcCodeArr := strings.Split(funcCodeRule, ",")
-	if reqFuncCode != "" || len(funcCodeArr) > 1 {
-		var checkPass bool
-		for _, tFunc := range funcCodeArr {
-			if reqFuncCode == tFunc {
-				checkPass = true
-				break
-			}
-		}
-		if !checkPass {
-			err = NewErrorWithCode(GLOBAL_ERR_RESOURCE_POWERCODE_ERR, fmt.Sprintf("账户 accountId:%d entAccountId:%d entId:%d entUserId:%d 无效funccode:%s req:%s权限", accountId, entAccountId, entId, entUserId, funcCodeRule, reqFuncCode))
-			return
-		}
-		funcCode = reqFuncCode
-	}
-
-	res, err := ResourceCenterRpc.CheckPower(ctx, &pb.CheckPowerReq{
-		Appid:        Appid,
-		FunctionCode: funcCode,
-		AccountId:    accountId,
-		EntAccountId: entAccountId,
-		EntId:        entId,
-		EntUserId:    entUserId,
-	})
-
-	if err != nil {
-		err = NewErrorWithCode(GATEWAY_RPC_RESOURCECENTER_ERR, err.Error())
-		return
-	}
-	//0:失败 1:成功 -1:不在有效期内 -2:数量不足 -3:没有授权
-	switch res.Status {
-	case 0:
-		err = NewErrorWithCode(GLOBAL_ERR_RESOURCE_PORWE_FAIL, fmt.Sprintf("账户 accountId:%d entAccountId:%d entId:%d entUserId:%d 无业务%s权限", accountId, entAccountId, entId, entUserId, funcCode))
-		return
-	case -1:
-		err = NewErrorWithCode(GLOBAL_ERR_RESOURCE_PORWE_EXPIRED, fmt.Sprintf("账户 accountId:%d entAccountId:%d entId:%d entUserId:%d 业务%s权限已过期", accountId, entAccountId, entId, entUserId, funcCode))
-		return
-	case -2:
-		err = NewErrorWithCode(GLOBAL_ERR_RESOURCE_PORWE_NOTENOUGH, fmt.Sprintf("账户 accountId:%d entAccountId:%d entId:%d entUserId:%d 业务%s权限余额不足", accountId, entAccountId, entId, entUserId, funcCode))
-		return
-	case -3:
-		err = NewErrorWithCode(GLOBAL_ERR_RESOURCE_PORWE_NOTHAS, fmt.Sprintf("账户 accountId:%d entAccountId:%d entId:%d entUserId:%d 业务%s权限无授权", accountId, entAccountId, entId, entUserId, funcCode))
-		return
-	}
-	return res.UseCount, res.SurplusCount, nil
-}
-
-// ResourcePowerDeduct 资源中心消费
-// accountId 账户id
-// entAccountId 企业账户id
-// funcCode 业务代码
-// deductNum 扣除数量
-// ids 扣除详情id;例如数据导出信息id等数据
-func ResourcePowerDeduct(ctx g.Ctx, accountId, entAccountId int64, funcCode, appId string, deductNum int64, ids []string) error {
-	ctx, span := gtrace.NewSpan(ctx, "ResourcePowerDeduct")
-	defer span.End()
-	res, err := ResourceCenterRpc.Deduction(ctx, &pb.DeductionReq{
-		Appid:        appId,
-		AccountId:    accountId,
-		EntAccountId: entAccountId,
-		FunctionCode: funcCode,
-		Count:        deductNum,
-		Ids:          ids,
-	})
-	if err != nil {
-		return NewErrorWithCode(GATEWAY_RPC_RESOURCECENTER_ERR, err.Error())
-	}
-	//0:失败 1:成功 -1:不在有效期内 -2:数量不足 -3:没有授权
-	switch res.Status {
-	case 0:
-		return NewErrorWithCode(GLOBAL_ERR_RESOURCE_PORWE_FAIL, fmt.Sprintf("账户 accountId:%d entAccountId:%d 扣除业务%s权限失败", accountId, entAccountId, funcCode))
-	case -1:
-		return NewErrorWithCode(GLOBAL_ERR_RESOURCE_PORWE_EXPIRED, fmt.Sprintf("账户 accountId:%d entAccountId:%d 扣除业务%s权限失败,权限已过期", accountId, entAccountId, funcCode))
-	case -2:
-		return NewErrorWithCode(GLOBAL_ERR_RESOURCE_PORWE_NOTENOUGH, fmt.Sprintf("账户 accountId:%d entAccountId:%d 扣除业务%s权限失败,余额不足", accountId, entAccountId, funcCode))
-	case -3:
-		return NewErrorWithCode(GLOBAL_ERR_RESOURCE_PORWE_NOTHAS, fmt.Sprintf("账户 accountId:%d entAccountId:%d 扣除业务%s权限失败", accountId, entAccountId, funcCode))
-	}
-	return nil
-}
-
-// ResourcePowerRecharge 资源中心充值
-// accountId 账户id
-// entAccountId 企业账户id
-// funcCode 业务代码
-// deductNum 扣除数量
-// ids 扣除详情id;例如数据导出信息id等数据
-func ResourcePowerRecharge(ctx g.Ctx, accountId, entAccountId int64, funcCode, appId string, deductNum int64, ids []string) error {
-	ctx, span := gtrace.NewSpan(ctx, "ResourcePowerRecharge")
-	defer span.End()
-
-	res, err := ResourceCenterRpc.Recharge(ctx, &pb.RechargeReq{
-		Appid:        appId,
-		AccountId:    accountId,
-		EntAccountId: entAccountId,
-		FunctionCode: funcCode,
-		Count:        deductNum,
-		Ids:          ids,
-	})
-	if err != nil {
-		return NewErrorWithCode(GATEWAY_RPC_RESOURCECENTER_ERR, err.Error())
-	}
-	switch res.Status {
-	case 0:
-		return NewErrorWithCode(GLOBAL_ERR_RESOURCE_PORWE_FAIL, fmt.Sprintf("账户 accountId:%d entAccountId:%d 充值业务%s权限失败", accountId, entAccountId, funcCode))
-	case -1:
-		return NewErrorWithCode(GLOBAL_ERR_RESOURCE_PORWE_EXPIRED, fmt.Sprintf("账户 accountId:%d entAccountId:%d 充值业务%s权限失败,权限已过期", accountId, entAccountId, funcCode))
-	case -2:
-		return NewErrorWithCode(GLOBAL_ERR_RESOURCE_PORWE_NOTENOUGH, fmt.Sprintf("账户 accountId:%d entAccountId:%d 充值业务%s权限失败,余额不足", accountId, entAccountId, funcCode))
-	case -3:
-		return NewErrorWithCode(GLOBAL_ERR_RESOURCE_PORWE_NOTHAS, fmt.Sprintf("账户 accountId:%d entAccountId:%d 充值业务%s权限失败", accountId, entAccountId, funcCode))
-	case -4: //超出可拥有最大限额
-		return NewErrorWithCode(GLOBAL_ERR_RESOURCE_PORWE_RECHARGE_FULL, fmt.Sprintf("账户 accountId:%d entAccountId:%d 充值业务%s权限失败", accountId, entAccountId, funcCode))
-	}
-
-	return nil
-}

+ 0 - 59
core/proxy/rpc/userCenter.go

@@ -1,59 +0,0 @@
-package rpc
-
-import (
-	. "bp.jydev.jianyu360.cn/BaseService/gateway/common/gatecode"
-	"bp.jydev.jianyu360.cn/BaseService/userCenter/rpc/pb"
-	"bp.jydev.jianyu360.cn/BaseService/userCenter/rpc/usercenter"
-	"fmt"
-	"github.com/gogf/gf/v2/os/gcfg"
-	"github.com/gogf/gf/v2/os/gctx"
-	"github.com/zeromicro/go-zero/core/discov"
-	"github.com/zeromicro/go-zero/zrpc"
-)
-
-var UserCenterRpc usercenter.UserCenter
-
-func initUserCenterRpc() {
-	UserCenterRpc = usercenter.NewUserCenter(zrpc.MustNewClient(zrpc.RpcClientConf{
-		Etcd: discov.EtcdConf{
-			Key:   gcfg.Instance().MustGet(gctx.New(), "etcd.baseserver.userCenter.key", nil).String(),
-			Hosts: gcfg.Instance().MustGet(gctx.New(), "etcd.baseserver.userCenter.address", nil).Strings(),
-		},
-	}))
-}
-
-// checkEntStatus 校验企业状态
-func checkEntStatus(entId int64, authCheck, accountCheck bool) error {
-	res, err := UserCenterRpc.CheckEnt(gctx.New(), &pb.CheckEntReq{
-		EntId: entId,
-	})
-	if err != nil {
-		return NewErrorWithCode(GATEWAY_RPC_USERCENTER_ERR, err.Error())
-	}
-
-	//校验是否冻结
-	if accountCheck && res.Data.FrozenStatus == 1 {
-		return NewErrorWithCode(GLOBAL_ERR_ENTACCOUNT_STATUS, fmt.Sprintf("企业账户 %d 已被冻结", entId))
-	}
-
-	//校验是否认证
-	if authCheck {
-		//-1 未通过,0 未认证,1 已认证. -2 已到期 3 待审核
-		switch res.Data.AuthStatus {
-		case 0:
-			return NewErrorWithCode(GLOBAL_ERR_ENTACCOUNT_AUTH_NOT, fmt.Sprintf("企业账户 %d 未认证", entId))
-		case 3:
-			return NewErrorWithCode(GLOBAL_ERR_ENTACCOUNT_AUTH_AWAIT, fmt.Sprintf("企业账户 %d 待审核", entId))
-		case -1:
-			return NewErrorWithCode(GLOBAL_ERR_ENTACCOUNT_AUTH_NOTPASS, fmt.Sprintf("企业账户 %d 未通过", entId))
-		case -2:
-			return NewErrorWithCode(GLOBAL_ERR_ENTACCOUNT_AUTH_EXPIRED, fmt.Sprintf("企业账户 %d 已到期", entId))
-		}
-	}
-	return nil
-}
-
-// checkPersonalStatus 校验个人状态账户状态
-func checkPersonalStatus(userId string, authCheck, accountCheck bool) error {
-	return NewErrorWithCode(GLOBAL_ERR_UNFINISH, "checkPersonalStatus")
-}

+ 1 - 1
core/proxy/vars/vars.go

@@ -1,5 +1,5 @@
 package vars
 
-import "bp.jydev.jianyu360.cn/BaseService/gateway/core/proxy/broker"
+import "bp.jydev.jianyu360.cn/BaseService/tripartite_gateway/core/proxy/broker"
 
 var BManager = broker.InitBroker()

+ 0 - 30
etc/config.yaml

@@ -1,26 +1,9 @@
 server:
   # 基本配置
   address: :8077                          # 本地监听地址。默认":80"
-  readTimeout: 60s                        # 请求读取超时时间,一般不需要配置。默认为60秒
-  maxHeaderBytes: 10240                   # 请求Header大小限制(Byte)。默认为10KB
-  serverAgent: jianyu Gateway             # 服务端Agent信息。默认为"GF HTTP Server"
-
-  # 其他配置
-  sessionCookieOutput: false        # 关闭session及返回cookie,是否将SessionId返回到Cookie中。默认true
-  clientMaxBodySize: 810241024      # 客户端最大Body上传限制大小,影响文件上传大小(Byte)。默认为8*1024*1024=8MB
-  formParsingMemory: 1048576        # 解析表单时的缓冲区大小(Byte),一般不需要配置。默认为1024*1024=1MB
-  dumpRouterMap: false              # 是否在Server启动时打印所有的路由列表。默认为true
-  graceful: true                    # 是否开启平滑重启特性,开启时将会在本地增加10000的本地TCP端口用于进程间通信。默认false
-  gracefulTimeout: 10               # 平滑重启父进程最大存活时间。默认2秒
 
 #数据库配置
 databases:
-  # redis配置
-  redis: session=192.168.3.149:1713,other=192.168.3.149:1712 # session用户获取剑鱼程序用户session  other用户获取剑鱼权益redis
-  polyredis:
-    address: 192.168.3.11:1713
-    poolsize: 30
-
   # mysql配置
   mysql:
     dbName: thirdparty
@@ -30,19 +13,6 @@ databases:
     maxOpenConns: 5
     maxIdleConns: 5
 
-# 系统配置
-proxy:
-  timeout: 30                 # 连接超时。默认30秒
-  keepAlive: 60               # 长链接超时。默认60秒
-  maxIdleConns: 120           # 最大空闲连接 0没有限制。默认120
-  idleConnTimeout: 90         # 空闲超时时间。默认90秒
-  tLSHandshakeTimeout: 1      # tls握手超时时间。默认1秒
-  expectContinueTimeout: 1    # 100-continue 超时时间。默认1秒
-  maxIdleConnsPerHost: 5      # 客户端可以持有的最大空闲连接。默认5
-
-jaeger:
-  name: "tripartite_gateway"
-  address: "192.168.3.71:6831"
 
 
 

+ 3 - 65
go.mod

@@ -1,17 +1,12 @@
-module bp.jydev.jianyu360.cn/BaseService/gateway
+module bp.jydev.jianyu360.cn/BaseService/tripartite_gateway
 
 go 1.18
 
 require (
 	app.yhyue.com/moapp/jybase v0.0.0-20230718012114-37013054344b
 	app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545
-	app.yhyue.com/moapp/jypkg v0.0.0-20230825092743-3bfc415bb5bb
 	bp.jydev.jianyu360.cn/BP/jynsq v0.0.0-20220424062752-50170a93c431
-	bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230222052351-9d6fad062447
-	bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.7
-	bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.13
-	github.com/go-redis/redis v6.15.9+incompatible
-	github.com/gogf/gf/contrib/trace/jaeger/v2 v2.3.3
+	bp.jydev.jianyu360.cn/BaseService/gateway v1.3.4
 	github.com/gogf/gf/v2 v2.3.1
 	github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0
 	github.com/zeromicro/go-zero v1.5.3
@@ -20,69 +15,37 @@ require (
 )
 
 require (
-	app.yhyue.com/moapp/esv1 v0.0.0-20220414031211-3da4123e648d // indirect
-	app.yhyue.com/moapp/jyMarketing v0.0.2-0.20230304035551-21bb1eedf547 // indirect
-	app.yhyue.com/moapp/message v0.0.0-20221223100203-6402e389d9ae // indirect
-	bp.jydev.jianyu360.cn/BaseService/entManageApplication v0.0.0-20230214091519-89a98c01ab0e // indirect
 	github.com/BurntSushi/toml v1.1.0 // indirect
-	github.com/beorn7/perks v1.0.1 // indirect
-	github.com/cenkalti/backoff/v4 v4.2.1 // indirect
-	github.com/cespare/xxhash/v2 v2.2.0 // indirect
 	github.com/clbanning/mxj/v2 v2.5.5 // indirect
 	github.com/coreos/go-semver v0.3.1 // indirect
 	github.com/coreos/go-systemd/v22 v22.5.0 // indirect
-	github.com/davecgh/go-spew v1.1.1 // indirect
-	github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
-	github.com/emicklei/go-restful/v3 v3.9.0 // indirect
 	github.com/fatih/color v1.15.0 // indirect
 	github.com/fsnotify/fsnotify v1.6.0 // indirect
 	github.com/garyburd/redigo v1.6.2 // indirect
 	github.com/go-logr/logr v1.2.4 // indirect
 	github.com/go-logr/stdr v1.2.2 // indirect
-	github.com/go-openapi/jsonpointer v0.19.6 // indirect
-	github.com/go-openapi/jsonreference v0.20.1 // indirect
-	github.com/go-openapi/swag v0.22.3 // indirect
-	github.com/go-redis/redis/v8 v8.11.5 // indirect
 	github.com/go-sql-driver/mysql v1.7.1 // indirect
 	github.com/gogo/protobuf v1.3.2 // indirect
-	github.com/golang/mock v1.6.0 // indirect
 	github.com/golang/protobuf v1.5.3 // indirect
 	github.com/golang/snappy v0.0.4 // indirect
 	github.com/gomodule/redigo v2.0.0+incompatible // indirect
-	github.com/google/gnostic v0.5.7-v3refs // indirect
-	github.com/google/go-cmp v0.5.9 // indirect
-	github.com/google/gofuzz v1.2.0 // indirect
 	github.com/gorilla/websocket v1.5.0 // indirect
 	github.com/grokify/html-strip-tags-go v0.0.1 // indirect
-	github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.0 // indirect
 	github.com/hashicorp/hcl v1.0.0 // indirect
 	github.com/jinzhu/inflection v1.0.0 // indirect
 	github.com/jinzhu/now v1.1.1 // indirect
-	github.com/josharian/intern v1.0.0 // indirect
-	github.com/json-iterator/go v1.1.12 // indirect
 	github.com/klauspost/compress v1.15.15 // indirect
+	github.com/kr/pretty v0.3.1 // indirect
 	github.com/magiconair/properties v1.8.7 // indirect
-	github.com/mailru/easyjson v0.7.7 // indirect
 	github.com/mattn/go-colorable v0.1.13 // indirect
 	github.com/mattn/go-isatty v0.0.17 // indirect
 	github.com/mattn/go-runewidth v0.0.13 // indirect
-	github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
 	github.com/mitchellh/mapstructure v1.5.0 // indirect
-	github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
-	github.com/modern-go/reflect2 v1.0.2 // indirect
 	github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe // indirect
-	github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
 	github.com/nsqio/go-nsq v1.1.0 // indirect
 	github.com/olekukonko/tablewriter v0.0.5 // indirect
-	github.com/olivere/elastic v6.2.37+incompatible // indirect
-	github.com/olivere/elastic/v7 v7.0.22 // indirect
-	github.com/openzipkin/zipkin-go v0.4.1 // indirect
 	github.com/pelletier/go-toml/v2 v2.0.8 // indirect
 	github.com/pkg/errors v0.9.1 // indirect
-	github.com/prometheus/client_golang v1.15.1 // indirect
-	github.com/prometheus/client_model v0.3.0 // indirect
-	github.com/prometheus/common v0.42.0 // indirect
-	github.com/prometheus/procfs v0.9.0 // indirect
 	github.com/rivo/uniseg v0.2.0 // indirect
 	github.com/sirupsen/logrus v1.8.3 // indirect
 	github.com/spaolacci/murmur3 v1.1.0 // indirect
@@ -100,48 +63,23 @@ require (
 	go.etcd.io/etcd/client/pkg/v3 v3.5.9 // indirect
 	go.mongodb.org/mongo-driver v1.11.6 // indirect
 	go.opentelemetry.io/otel v1.15.1 // indirect
-	go.opentelemetry.io/otel/exporters/jaeger v1.15.1 // indirect
-	go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.15.1 // indirect
-	go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.15.1 // indirect
-	go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.15.1 // indirect
-	go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.15.1 // indirect
-	go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.14.0 // indirect
-	go.opentelemetry.io/otel/exporters/zipkin v1.15.1 // indirect
 	go.opentelemetry.io/otel/sdk v1.15.1 // indirect
 	go.opentelemetry.io/otel/trace v1.15.1 // indirect
-	go.opentelemetry.io/proto/otlp v0.19.0 // indirect
 	go.uber.org/atomic v1.10.0 // indirect
 	go.uber.org/automaxprocs v1.5.2 // indirect
 	go.uber.org/multierr v1.9.0 // indirect
 	go.uber.org/zap v1.24.0 // indirect
 	golang.org/x/crypto v0.6.0 // indirect
 	golang.org/x/image v0.0.0-20190802002840-cff245a6509b // indirect
-	golang.org/x/oauth2 v0.7.0 // indirect
 	golang.org/x/sync v0.1.0 // indirect
 	golang.org/x/sys v0.8.0 // indirect
-	golang.org/x/term v0.8.0 // indirect
 	golang.org/x/text v0.9.0 // indirect
-	golang.org/x/time v0.3.0 // indirect
-	google.golang.org/appengine v1.6.7 // indirect
 	google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
 	google.golang.org/grpc v1.56.1 // indirect
 	google.golang.org/protobuf v1.31.0 // indirect
-	gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
-	gopkg.in/inf.v0 v0.9.1 // indirect
 	gopkg.in/ini.v1 v1.67.0 // indirect
 	gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
-	gopkg.in/yaml.v2 v2.4.0 // indirect
 	gopkg.in/yaml.v3 v3.0.1 // indirect
 	gorm.io/driver/mysql v1.0.5 // indirect
 	gorm.io/gorm v1.21.3 // indirect
-	jygit.jydev.jianyu360.cn/ApplicationCenter/publicService v0.0.0-20230710093759-d9d6c68de8b1 // indirect
-	k8s.io/api v0.26.3 // indirect
-	k8s.io/apimachinery v0.27.0-alpha.3 // indirect
-	k8s.io/client-go v0.26.3 // indirect
-	k8s.io/klog/v2 v2.90.1 // indirect
-	k8s.io/kube-openapi v0.0.0-20230307230338-69ee2d25a840 // indirect
-	k8s.io/utils v0.0.0-20230209194617-a36077c30491 // indirect
-	sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
-	sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
-	sigs.k8s.io/yaml v1.3.0 // indirect
 )

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 56 - 334
go.sum


+ 2 - 11
main.go

@@ -1,11 +1,9 @@
 package main
 
 import (
-	log "app.yhyue.com/moapp/jylog"
 	"bp.jydev.jianyu360.cn/BaseService/gateway/common/db"
-	"bp.jydev.jianyu360.cn/BaseService/gateway/core/logs"
-	"bp.jydev.jianyu360.cn/BaseService/gateway/core/proxy"
-	"github.com/gogf/gf/contrib/trace/jaeger/v2"
+	"bp.jydev.jianyu360.cn/BaseService/tripartite_gateway/core/logs"
+	"bp.jydev.jianyu360.cn/BaseService/tripartite_gateway/core/proxy"
 	"github.com/gogf/gf/v2/frame/g"
 	"github.com/gogf/gf/v2/os/gcfg"
 	"github.com/gogf/gf/v2/os/gctx"
@@ -22,13 +20,6 @@ func init() {
 func main() {
 	mainCtx := gctx.New()
 	//初始化链路跟踪
-	if jaegerAddress := g.Cfg().MustGet(mainCtx, "jaeger.address", "").String(); jaegerAddress != "" {
-		tp, err := jaeger.Init(g.Cfg().MustGet(mainCtx, "jaeger.name", "tripartite_gateway").String(), jaegerAddress)
-		if err != nil {
-			log.WithContext(mainCtx).Fatal(err)
-		}
-		defer tp.Shutdown(mainCtx)
-	}
 	//初始化网关服务并启动服务
 	proxy.InitGateWayServer(mainCtx).Run()
 }

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно