瀏覽代碼

feat:资源中台rpc升级

wangchuanjin 1 年之前
父節點
當前提交
6a6e590d48
共有 4 個文件被更改,包括 31 次插入34 次删除
  1. 26 26
      entity/ent.go
  2. 1 2
      go.mod
  3. 2 4
      go.sum
  4. 2 2
      service/entService.go

+ 26 - 26
entity/ent.go

@@ -300,14 +300,14 @@ func (this *EntInfo) Update() bool {
 }
 
 type Examine struct {
-	EntId       int64
-	AccountId   int64
-	ExamineId   string
-	AuthType    string
-	Reason      string
-	AuditUser   string
-	Mysql       *mysql.Mysql
-	ResourceLib resource.Resource
+	EntId        int64
+	EntAccountId int64
+	ExamineId    string
+	AuthType     string
+	Reason       string
+	AuditUser    string
+	Mysql        *mysql.Mysql
+	ResourceLib  resource.Resource
 }
 
 //审核
@@ -329,13 +329,13 @@ func (this *Examine) EntExamine() bool {
 
 		//开通权限
 		req := &resourcepb.PowerReq{
-			Appid:       "10000",
-			GoodsCode:   GOODSCODE_XXFB,
-			EntId:       this.EntId,
-			AccountId:   this.AccountId,
-			Type:        1,
-			GoodsSpecId: 4,
-			BuyNum:      1,
+			Appid:        "10000",
+			GoodsCode:    GOODSCODE_XXFB,
+			EntId:        this.EntId,
+			EntAccountId: this.EntAccountId,
+			Type:         1,
+			GoodsSpecId:  4,
+			BuyNum:       1,
 		}
 		resp, err := this.ResourceLib.PowerHandle(context.Background(), req)
 		//0:失败 1:成功 -1:不在有效期内 -2:数量不足 -3:没有授权
@@ -608,23 +608,23 @@ func (this *CheckEnt) Info() *EntInfoData {
 }
 
 type UpdateEnt struct {
-	EntId       int64
-	AccountId   int64
-	UpdateType  int64
-	Mysql       *mysql.Mysql
-	ResourceLib resource.Resource
+	EntId        int64
+	EntAccountId int64
+	UpdateType   int64
+	Mysql        *mysql.Mysql
+	ResourceLib  resource.Resource
 }
 
 //冻结解冻用户 1-冻结  2-解冻
 func (this *UpdateEnt) UpdateEnt() (int64, string) {
 	needUpdate := false
 	req := &resourcepb.PowerReq{
-		Appid:       "10000",
-		GoodsCode:   GOODSCODE_XXFB,
-		EntId:       this.EntId,
-		AccountId:   this.AccountId,
-		Type:        1, //1:开通权益 -1:取消权益
-		GoodsSpecId: 4,
+		Appid:        "10000",
+		GoodsCode:    GOODSCODE_XXFB,
+		EntId:        this.EntId,
+		EntAccountId: this.EntAccountId,
+		Type:         1, //1:开通权益 -1:取消权益
+		GoodsSpecId:  4,
 	}
 	//解冻
 	rdata := this.Mysql.FindOne(Entniche_info, map[string]interface{}{

+ 1 - 2
go.mod

@@ -7,8 +7,7 @@ require (
 	app.yhyue.com/moapp/jybase v0.0.0-20230523020646-528a068dac39
 	bp.jydev.jianyu360.cn/BaseService/gateway v1.3.4
 	bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230225125145-431a4f70093a
-	bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.7
-	bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.13
+	bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.8-0.20230921090713-5f0f2aea39a7
 	github.com/zeromicro/go-zero v1.5.2
 	google.golang.org/grpc v1.55.0
 	google.golang.org/protobuf v1.30.0

+ 2 - 4
go.sum

@@ -18,12 +18,10 @@ bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.0-20220418005748-8ba5d936d
 bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.0-20220419023723-0b32d4a41751/go.mod h1:6KL5LMEku83uRbre0W/bj5kXG2I6pJGBFtktmtp51yM=
 bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.0-20220419063004-233fc7ce006c/go.mod h1:6KL5LMEku83uRbre0W/bj5kXG2I6pJGBFtktmtp51yM=
 bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.0-20220420075831-0b59892e9982/go.mod h1:wsHNO91h37H+xE4ZNny0yd7mtpODeDJxbVYhIRMR+qw=
-bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.7 h1:G6PHMWAHfYEuY6kbl7OM/KnCQf1Xa54mdhuP7JzK8/I=
-bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.7/go.mod h1:rRiGzKG4F/fmkNxXQCxrkxNWc8yf1SmW8qWCKfGIQSM=
+bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.8-0.20230921090713-5f0f2aea39a7 h1:BdkYV/oDng2p6Mmf2yDUgBOPkXsTfdiBNOg00imPRts=
+bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.8-0.20230921090713-5f0f2aea39a7/go.mod h1:rRiGzKG4F/fmkNxXQCxrkxNWc8yf1SmW8qWCKfGIQSM=
 bp.jydev.jianyu360.cn/BaseService/userCenter v0.0.0-20220418072311-2062bed1e700/go.mod h1:KjcrxTzM96tBc6G4B8tlLBn1lrVy5UJYF8+eTdP4xAE=
 bp.jydev.jianyu360.cn/BaseService/userCenter v0.0.0-20220421015128-4a36f3eac5c5/go.mod h1:GT0QC4aaKDuXxAvaU4G02XjCc31TU1ctqBGqxQYOfC4=
-bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.13 h1:aK3ya7aznINdAuEl7sKq9U2MvJidUfk6nxPGjjX+t3Y=
-bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.13/go.mod h1:vDEKni2rnCraKgKnnCEIwsFmO92GxnpfKmNQ+83wKP0=
 cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
 cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
 cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=

+ 2 - 2
service/entService.go

@@ -155,7 +155,7 @@ func (this *EntService) Examinet(data *userCenter.ExamineReq) (int64, string, in
 		ResourceLib: entity.ResourceLib,
 	}
 	if identity := IdentityByEntId(data.EntId); identity != nil {
-		info.AccountId = identity.EntAccountId
+		info.EntAccountId = identity.EntAccountId
 	}
 	if info.EntExamine() {
 		return 1, "", 0
@@ -287,7 +287,7 @@ func (this *EntService) UpdateEnt(data *userCenter.EntUpdateReq) (int64, string,
 		ResourceLib: entity.ResourceLib,
 	}
 	if identity := IdentityByEntId(data.EntId); identity != nil {
-		info.AccountId = identity.EntAccountId
+		info.EntAccountId = identity.EntAccountId
 	}
 	status, msg := info.UpdateEnt()
 	return 0, msg, status