فهرست منبع

拓普详情页修改

Jianghan 1 سال پیش
والد
کامیت
a591410f97

+ 1 - 0
src/jfw/modules/publicapply/src/config.yaml

@@ -5,3 +5,4 @@ userCenterKey: "usercenter.rpc" #用户中台rpc
 powerCheckCenterKey: "powercheck.rpc" #权益校验中台
 entManageApplication: "entmanageapplication.rpc" #企业管理中台
 jyPointKey: "integral.rpc" #积分中台
+resourceCenterKey: "resource.rpc" #资源中台

+ 1 - 0
src/jfw/modules/publicapply/src/config/config.go

@@ -99,5 +99,6 @@ func init() {
 		RegUserCenter(g.Cfg().MustGet(ctx, "userCenterKey").String()).
 		RegPowerCheckCenter(g.Cfg().MustGet(ctx, "powerCheckCenterKey").String()).
 		RegEntManageApplication(g.Cfg().MustGet(ctx, "entManageApplication").String()).
+		RegResourceCenter(g.Cfg().MustGet(ctx, "resourceCenterKey").String()).
 		RegJyPoints(g.Cfg().MustGet(ctx, "jyPointKey").String())
 }

+ 2 - 0
src/jfw/modules/publicapply/src/detail/dao/baseInfo.go

@@ -53,6 +53,7 @@ func (b *BaseInfo) BidBaseInfo() (bi *entity.BidInfo, err error) {
 		Detail:    &entity.DetailInfo{},
 		RightSide: map[string]interface{}{},
 		CanRead:   false,
+		Topnet:    false,
 	}
 	//招标数据基本信息并发过滤
 	if dc.Config.RestrictionSwitch {
@@ -74,6 +75,7 @@ func (b *BaseInfo) BidBaseInfo() (bi *entity.BidInfo, err error) {
 		pageTypeCheck = consts.PageTypeCheck
 		isPay         = isVip || isMember || isEntniche
 	)
+
 	//企业级商机管理权限判断
 	entId := int(b.UserInfo.EntId)
 	if entId > 0 && userPower.EntInfo[entId] != nil {

+ 1 - 0
src/jfw/modules/publicapply/src/detail/entity/entity.go

@@ -7,6 +7,7 @@ type BidInfo struct {
 	Detail    *DetailInfo            `json:"detailInfo,omitempty"` //正文
 	RightSide map[string]interface{} `json:"rightSide,omitempty"`  //右边信息
 	CanRead   bool                   `json:"canRead"`              //是否有权限查看
+	Topnet    bool                   `json:"topnet"`               //拓普身份
 	Token     string                 `json:"token"`                //
 }
 

+ 8 - 0
src/jfw/modules/publicapply/src/detail/service/service.go

@@ -4,8 +4,11 @@ import (
 	. "app.yhyue.com/moapp/jybase/api"
 	"app.yhyue.com/moapp/jybase/common"
 	"app.yhyue.com/moapp/jybase/encrypt"
+	"jy/src/jfw/modules/publicapply/src/config"
 	"jy/src/jfw/modules/publicapply/src/detail/dao"
 	"jy/src/jfw/modules/publicapply/src/detail/util"
+	"log"
+	"strings"
 )
 
 // AdvancedInfo 招标数据进阶信息(招标/采购进度、投标服务、商机推荐、客户推荐)
@@ -66,6 +69,11 @@ func (d *Detail) BaseInfo() {
 			return Result{Data: nil, Error_msg: Error_msg_1001}
 		}
 		data, err1 := baseInfo.BidBaseInfo()
+		resResp := config.Middleground.ResourceCenter.Haspowers(ub.AccountId, ub.EntAccountId, ub.EntId, ub.EntUserId)
+		if resResp != nil && strings.Contains(strings.Join(resResp.Powers, ","), "bi_yx_topnet") {
+			log.Println(":--BaseInfo--:", resResp.Powers)
+			data.Topnet = true
+		}
 		if err1 != nil {
 			return Result{Error_code: -1, Error_msg: err1.Error()}
 		}

+ 5 - 1
src/jfw/modules/publicapply/src/detail/util/util.go

@@ -27,6 +27,8 @@ type SessUserInfo struct {
 	Phone        string
 	MgoUserId    string
 	UserId       string
+	EntAccountId int64
+	EntUserId    int64
 	OpenId       string //wx openid
 	Nickname     string //昵称
 	Avatar       string //头像
@@ -36,14 +38,16 @@ type SessUserInfo struct {
 func GetUserBaseInfo(sess *httpsession.Session) SessUserInfo {
 	getSession := sess.GetMultiple()
 	return SessUserInfo{
-		MgoUserId:    util.ObjToString(getSession["mgoUserId"]),
 		BaseUserId:   util.Int64All(getSession["base_user_id"]),
 		AccountId:    util.Int64All(getSession["accountId"]),
 		EntId:        util.Int64All(getSession["entId"]),
 		PositionType: util.Int64All(getSession["positionType"]),
 		PositionId:   util.Int64All(getSession["positionId"]),
 		Phone:        util.ObjToString(getSession["phone"]),
+		MgoUserId:    util.ObjToString(getSession["mgoUserId"]),
 		UserId:       util.ObjToString(getSession["userId"]),
+		EntAccountId: util.Int64All(getSession["entAccountId"]),
+		EntUserId:    util.Int64All(getSession["entUserId"]),
 		OpenId:       util.ObjToString(getSession["s_m_openid"]),
 		Nickname:     util.ObjToString(getSession["s_nickname"]),
 		Avatar:       util.ObjToString(getSession["s_avatar"]),

+ 3 - 1
src/jfw/modules/subscribepay/src/go.mod

@@ -1,6 +1,8 @@
 module jy/src/jfw/modules/subscribepay/src
 
-go 1.19
+go 1.21
+
+toolchain go1.22.4
 
 require (
 	app.yhyue.com/moapp/jybase v0.0.0-20240226084952-7e7b38ef8a66

+ 3 - 1
src/jfw/modules/weixin/src/go.mod

@@ -1,6 +1,8 @@
 module jy/src/jfw/modules/weixin/src
 
-go 1.18
+go 1.21
+
+toolchain go1.22.4
 
 require (
 	app.yhyue.com/moapp/jybase v0.0.0-20240226084952-7e7b38ef8a66