فهرست منبع

删除其他配置

WH01243 9 ماه پیش
والد
کامیت
f8d39c0ec3

+ 0 - 5
api/common/initconfig.go

@@ -1,7 +1,6 @@
 package common
 
 import (
-	"app.yhyue.com/moapp/jypkg/middleground"
 	"context"
 	"flag"
 	"fmt"
@@ -36,7 +35,6 @@ var (
 	JianyuMysql    *mysql.Mysql
 	Mgo            mongodb.MongodbSim
 	ClickhouseConn driver.Conn
-	Middleground   *middleground.Middleground
 )
 
 func InitConf() {
@@ -120,10 +118,7 @@ func InitConf() {
 		NewEs(DB.Es.Version, DB.Es.Addr, DB.Es.Size, DB.Es.UserName, DB.Es.Password)
 	}
 	redis.InitRedis(DB.Redis)
-
 	ConnectClickhouse(DB.Clickhouse)
-	Middleground = middleground.NewMiddleground(C.Hosts).
-		RegPowerCheckCenter(C.PowerCheckCenterKey)
 }
 func ConnectClickhouse(cHouseConfig *config.CHouseConfig) error {
 	var (

+ 0 - 2
api/internal/config/config.go

@@ -11,8 +11,6 @@ type Config struct {
 		ServerCode string
 		Etcd       []string
 	}
-	PowerCheckCenterKey string
-	Hosts               []string
 }
 
 type Db struct {

+ 0 - 2
api/internal/logic/findinitinfologic.go

@@ -31,8 +31,6 @@ func (l *FindInitInfoLogic) FindInitInfo(req *types.FindInitInfoReq) (resp *type
 		PositionType: req.PositionType,
 		MgoUserId:    req.MgoUserId,
 		EntId:        req.EntId,
-		NewUserId:    req.NewUserId,
-		AccountId:    req.AccountId,
 		PositionId:   req.PositionId,
 		EntUserId:    req.EntUserId,
 	}

+ 0 - 2
api/internal/logic/updateinitinfologic.go

@@ -33,8 +33,6 @@ func (l *UpdateInitInfoLogic) UpdateInitInfo(req *types.UpdateInitInfoReq) (resp
 		PositionType: req.PositionType,
 		MgoUserId:    req.MgoUserId,
 		EntId:        req.EntId,
-		NewUserId:    req.NewUserId,
-		AccountId:    req.AccountId,
 		PositionId:   req.PositionId,
 		EntUserId:    req.EntUserId,
 	}

+ 5 - 8
api/internal/service/initInfo.go

@@ -11,17 +11,15 @@ type InitInfoService struct {
 	PositionType int64
 	MgoUserId    string
 	EntId        int64
-	NewUserId    int64
-	AccountId    int64
-	PositionId   int64
 	EntUserId    int64
+	EntRole      int64
+	PositionId   int64
 }
 
 func (t *InitInfoService) UpdateInitInfo(company, business string) bool {
 	fool := false
 	if t.PositionType == 1 {
 		//企业
-		userInfo := Middleground.PowerCheckCenter.Check("10000", t.MgoUserId, t.NewUserId, gconv.Int64(t.AccountId), t.EntId, t.PositionType, gconv.Int64(t.PositionId))
 		fool = Mgo.Update("ent_user", map[string]interface{}{
 			"i_entid":  t.EntId,
 			"i_userid": t.EntUserId,
@@ -30,7 +28,7 @@ func (t *InitInfoService) UpdateInitInfo(company, business string) bool {
 				"is_init": true,
 			},
 		}, false, false)
-		if userInfo.Ent.EntRoleId == 1 {
+		if t.EntRole == 1 {
 			//企业管理员
 			info, _ := json.Marshal(map[string]interface{}{
 				"company":  company,
@@ -63,9 +61,8 @@ func (t *InitInfoService) FindInitInfo() map[string]interface{} {
 	}
 	if t.PositionType == 1 {
 		isInit := false
-		userInfo := Middleground.PowerCheckCenter.Check("10000", t.MgoUserId, t.NewUserId, gconv.Int64(t.AccountId), t.EntId, t.PositionType, gconv.Int64(t.PositionId))
 		entUserInfo, _ := Mgo.FindOne("ent_user", map[string]interface{}{"i_entid": t.EntId, "i_userid": t.EntUserId})
-		if userInfo != nil && len(*entUserInfo) > 0 {
+		if len(*entUserInfo) > 0 {
 			isInit = gconv.Bool((*entUserInfo)["is_init"])
 			returnJson["isInit"] = isInit
 		}
@@ -79,7 +76,7 @@ func (t *InitInfoService) FindInitInfo() map[string]interface{} {
 				returnJson["business"] = entMap["business"]
 			}
 		}
-		if userInfo.Ent.EntRoleId == 1 {
+		if t.EntRole == 1 {
 			//企业管理员
 			returnJson["isUpdate"] = true
 			if !isInit {

+ 0 - 4
api/internal/types/types.go

@@ -149,8 +149,6 @@ type UpdateInitInfoReq struct {
 	Company      string `json:"company,optional"`
 	EntId        int64  `header:"entId,optional"`
 	MgoUserId    string `header:"mgoUserId,optional"` //原userId
-	NewUserId    int64  `header:"newUserId"`
-	AccountId    int64  `header:"accountId,optional"`
 	PositionId   int64  `header:"positionId,optional"`
 	PositionType int64  `header:"positionType,optional"`
 	EntUserId    int64  `header:"entUserId,optional"`
@@ -160,8 +158,6 @@ type FindInitInfoReq struct {
 	EntId        int64  `header:"entId,optional"`
 	MgoUserId    string `header:"mgoUserId,optional"` //原userId
 	PositionType int64  `header:"positionType,optional"`
-	NewUserId    int64  `header:"newUserId"`
-	AccountId    int64  `header:"accountId,optional"`
 	PositionId   int64  `header:"positionId,optional"`
 	EntUserId    int64  `header:"entUserId,optional"`
 }