浏览代码

Merge branch 'dev/v1.1.20_fuwencai' of BaseService/jyMicroservices into feature/v1.1.20

fuwencai 2 年之前
父节点
当前提交
f1678a57fa

+ 2 - 0
jyBXCore/rpc/bxcore.proto

@@ -320,6 +320,7 @@ message ParticipateSetUpInfoReq{
   string  isAllow = 11;//是否允许多人参标
   repeated BidTypeReq bidType = 12;
   repeated RemindRuleReq remindRule = 13;
+  string  necessaryField = 14;//必填字段
 }
 
 message  BidTypeReq{
@@ -337,6 +338,7 @@ message ParticipateSetUpInfo{
   string  isAllow = 1;//是否允许多人参标  默认0 开启是1
   repeated BidTypeReq bidType = 2;
   repeated RemindRuleReq remindRule = 3;
+  string necessaryField = 4;//必填字段
 }
 //设置信息范围内容
 message ParticipateSetUpInfoRes{

+ 10 - 4
jyBXCore/rpc/internal/logic/participatecontentlogic.go

@@ -61,10 +61,16 @@ func (l *ParticipateContentLogic) ParticipateContent(in *bxcore.ParticipateConte
 		return result, nil
 	}
 	//  查询
-	data := participateService.GetLastBidStatus(projectId)
-	formatData := participateService.ParticipateContentFormat(data)
+	data, err := participateService.GetLastBidStatus(projectId)
+	if err == nil {
+		formatData := participateService.ParticipateContentFormat(data)
+		return &bxcore.ParticipateContentRes{
+			ErrCode: 0,
+			Data:    &formatData,
+		}, nil
+	}
 	return &bxcore.ParticipateContentRes{
-		ErrCode: 0,
-		Data:    &formatData,
+		ErrCode: -1,
+		ErrMsg:  err.Error(),
 	}, nil
 }

+ 5 - 3
jyBXCore/rpc/internal/logic/participateinfologic.go

@@ -5,8 +5,8 @@ import (
 	"context"
 	IC "jyBXCore/rpc/init"
 	"jyBXCore/rpc/model/es"
+	"jyBXCore/rpc/model/mysql"
 	"jyBXCore/rpc/service"
-	"jyBXCore/rpc/util"
 	"time"
 
 	"jyBXCore/rpc/internal/svc"
@@ -55,7 +55,8 @@ func (l *ParticipateInfoLogic) ParticipateInfo(in *bxcore.ParticipateInfoReq) (*
 	// 2. 根据标讯id 查询项目信息
 	projectInfos := es.GetProjectByInfoId(infoList)
 	if projectInfos == nil || len(*projectInfos) == 0 {
-		result.ErrCode = 0
+		//result.ErrCode = 0
+		result.ErrMsg = "未查到此项目信息"
 		return &result, nil
 	}
 	// 判断是否已经过了开标时间
@@ -74,10 +75,11 @@ func (l *ParticipateInfoLogic) ParticipateInfo(in *bxcore.ParticipateInfoReq) (*
 		existList := participateService.PersonalExistProject(projectIds)
 		formatData = participateService.DetailPersonalFormat(existList, isValid, bidendtime)
 	case service.PositionTypeEnt:
-		isAllow := util.IsALLow(in.EntId)
+		isAllow := mysql.IsALLow(in.EntId)
 		existList := participateService.EntExistProject(projectIds)                              // 查询出已经存在的
 		formatData = participateService.DetailEntFormat(existList, isValid, isAllow, bidendtime) // 格式化数据
 	}
+	formatData.ProjectId = projectIds[0]
 	result.ErrCode = 0
 	result.Data = formatData
 	return &result, nil

+ 4 - 5
jyBXCore/rpc/internal/logic/participateshowlogic.go

@@ -2,14 +2,13 @@ package logic
 
 import (
 	"context"
+	"github.com/zeromicro/go-zero/core/logx"
 	IC "jyBXCore/rpc/init"
 	"jyBXCore/rpc/internal/svc"
 	"jyBXCore/rpc/model/es"
+	"jyBXCore/rpc/model/mysql"
 	"jyBXCore/rpc/service"
 	"jyBXCore/rpc/type/bxcore"
-	"jyBXCore/rpc/util"
-
-	"github.com/zeromicro/go-zero/core/logx"
 )
 
 type ParticipateShowLogic struct {
@@ -36,7 +35,7 @@ func (l *ParticipateShowLogic) ParticipateShow(in *bxcore.ParticipateShowReq) (*
 	// 1. 判断身份是否有权限 不是超级订阅也不是大会员  则直接返回不展示
 	userInfo := IC.Middleground.PowerCheckCenter.Check(in.AppId, in.UserId, in.NewUserId, in.AccountId, in.EntId, in.PositionType, in.PositionId)
 	//不是超级订阅 也不是大会员
-	if userInfo.Vip.Status < 0 && userInfo.Member.Status < 0 {
+	if userInfo.Vip.Status <= 0 && userInfo.Member.Status <= 0 {
 		result.ErrMsg = "没有权限"
 		return &result, nil
 	}
@@ -64,7 +63,7 @@ func (l *ParticipateShowLogic) ParticipateShow(in *bxcore.ParticipateShowReq) (*
 		existList := participateService.PersonalExistProject(projectIds)
 		formatList = participateService.ListPersonalFormat(existList, infoM)
 	case service.PositionTypeEnt:
-		isAllow := util.IsALLow(in.EntId)
+		isAllow := mysql.IsALLow(in.EntId)
 		existList := participateService.EntExistProject(projectIds)              // 查询出已经存在的
 		formatList = participateService.ListEntFormat(existList, infoM, isAllow) // 格式化数据
 	}

+ 31 - 12
jyBXCore/rpc/model/mysql/participateBid.go

@@ -324,6 +324,9 @@ func UpdateParticipateSetInfo(in *bxcore.ParticipateSetUpInfoReq) error {
 	if len(in.RemindRule) > 0 {
 		upsert["o_remindrule"] = in.RemindRule
 	}
+	if in.NecessaryField != "" {
+		upsert["s_requiredField"] = in.NecessaryField
+	}
 	if ok := IC.Mgo.Update(PartTable, query, map[string]interface{}{
 		"$set": upsert,
 	}, true, false); ok {
@@ -343,9 +346,9 @@ func GetParticipateSetInfo(in *bxcore.ParticipateSetUpInfoReq) (*bxcore.Particip
 	}
 	if setInfo, ok := IC.Mgo.FindOne(PartTable, query); ok {
 		var (
-			isAllow    = ""
-			bidType    []*bxcore.BidTypeReq
-			remindRule []*bxcore.RemindRuleReq
+			isAllow, isRequird string
+			bidType            []*bxcore.BidTypeReq
+			remindRule         []*bxcore.RemindRuleReq
 		)
 		bidType = append(bidType, &bxcore.BidTypeReq{
 			Name:    "直接投标",
@@ -360,10 +363,16 @@ func GetParticipateSetInfo(in *bxcore.ParticipateSetUpInfoReq) (*bxcore.Particip
 			Node:      "编制投标文件",
 		})
 		if setInfo != nil {
+			//必填字段
+			if (*setInfo)["s_requiredField"] != nil {
+				isRequird = MC.ObjToString((*setInfo)["s_requiredField"])
+			} else {
+				isRequird = "bidType"
+			}
 			if (*setInfo)["i_isallow"] != nil {
 				isAllow = strconv.Itoa(MC.IntAll((*setInfo)["i_isallow"]))
 			}
-			if (*setInfo)["bidType"] != nil {
+			if (*setInfo)["o_bidtype"] != nil {
 				if sbb, err := json.Marshal((*setInfo)["o_bidtype"]); err == nil {
 					if err := json.Unmarshal(sbb, &bidType); err != nil {
 						logx.Info("bidType json un err:", err.Error())
@@ -387,9 +396,10 @@ func GetParticipateSetInfo(in *bxcore.ParticipateSetUpInfoReq) (*bxcore.Particip
 			}
 		}
 		return &bxcore.ParticipateSetUpInfo{
-			IsAllow:    isAllow,
-			BidType:    bidType,
-			RemindRule: remindRule,
+			NecessaryField: isRequird,
+			IsAllow:        isAllow,
+			BidType:        bidType,
+			RemindRule:     remindRule,
 		}, nil
 	}
 	return nil, nil
@@ -591,13 +601,14 @@ func ParticipateListSql(in *bxcore.ParticipateListReq) string {
 		conditionSql += `)`
 	}
 	//默认按照投标截止日期正序排列、1:开标时间正序、2:更新状态时间倒序
+	//投标结束时间和开标时间 很多项目数据没有这两个字段值
 	switch in.OrderNum {
 	case 1:
-		conditionSql += ` ORDER BY pt.bid_open_time ASC`
+		conditionSql += ` ORDER BY pt.bid_open_time ASC,pt.bid_end_time ASC,pug.update_date DESC`
 	case 2:
 		conditionSql += ` ORDER BY pug.update_date DESC`
 	default:
-		conditionSql += ` ORDER BY pt.bid_end_time ASC`
+		conditionSql += ` ORDER BY pt.bid_end_time ASC,pt.bid_open_time ASC,pug.update_date DESC`
 	}
 	logx.Info(conditionSql)
 	return conditionSql
@@ -670,6 +681,7 @@ func SingleParticipateList(in *bxcore.ParticipateListReq, conditionSql string) (
 func AdminParticipateList(in *bxcore.ParticipateListReq, conditionSql string) (data *bxcore.ParticipateData, err error) {
 	defer MC.Catch()
 	data = &bxcore.ParticipateData{
+		IsAllow: IsALLow(in.EntId),
 		NowTime: time.Now().Unix(),
 		Count:   0,
 		List:    []*bxcore.ParticipateList{},
@@ -917,9 +929,9 @@ func GetPersonInfo(entId, entUserId int64, participateMap map[int64]bool) []*bxc
 		prevId int64 = 0
 	)
 	for _, v := range *r {
-		if entUserId == MC.Int64All(v["user_id"]) {
-			continue
-		}
+		//if entUserId == MC.Int64All(v["user_id"]) {
+		//	continue
+		//}
 		id := MC.Int64All(v["id"])
 		userId := strconv.FormatInt(MC.Int64All(v["user_id"]), 10)
 		user := &bxcore.ParticipatePerson{
@@ -951,3 +963,10 @@ func GetPersonInfo(entId, entUserId int64, participateMap map[int64]bool) []*bxc
 	}
 	return list
 }
+
+//是否允许多人参标
+func IsALLow(entId int64) bool {
+	return GetParticipateIsAllow(map[string]interface{}{
+		"i_entid": entId,
+	})
+}

+ 49 - 28
jyBXCore/rpc/service/participate.go

@@ -9,7 +9,6 @@ import (
 	"jyBXCore/rpc/model/es"
 	"jyBXCore/rpc/model/mysql"
 	"jyBXCore/rpc/type/bxcore"
-	"jyBXCore/rpc/util"
 	"strconv"
 	"strings"
 )
@@ -18,8 +17,14 @@ import (
 func ParticipateList(in *bxcore.ParticipateListReq) (*bxcore.ParticipateListRes, error) {
 	defer MC.Catch()
 	res := &bxcore.ParticipateListRes{Data: &bxcore.ParticipateData{}}
+	userInfo := IC.Middleground.PowerCheckCenter.Check(in.AppId, in.UserId, in.NewUserId, in.AccountId, in.EntId, in.PositionType, in.PositionId)
+	//不是超级订阅 也不是大会员
+	if userInfo.Vip.Status <= 0 && userInfo.Member.Status <= 0 {
+		res.ErrCode = -1
+		res.ErrMsg = "没有权限"
+		return res, nil
+	}
 	if in.PositionType > 0 {
-		userInfo := IC.Middleground.PowerCheckCenter.Check(in.AppId, in.UserId, in.NewUserId, in.AccountId, in.EntId, in.PositionType, in.PositionId)
 		if userInfo.Ent.EntRoleId == 0 {
 			in.EntUserIds = ""
 		}
@@ -63,9 +68,14 @@ func ParticipateList(in *bxcore.ParticipateListReq) (*bxcore.ParticipateListRes,
 //参标动作:参标、终止参标、划转:in:参标;out:终止参标;transfer:划转
 func ParticipateDo(in *bxcore.ParticipateActionReq) error {
 	defer MC.Catch()
+	// 1. 判断身份是否有权限 不是超级订阅也不是大会员  则直接返回不展示
+	userInfo := IC.Middleground.PowerCheckCenter.Check(in.AppId, in.UserId, in.NewUserId, in.AccountId, in.EntId, in.PositionType, in.PositionId)
+	//不是超级订阅 也不是大会员
+	if userInfo.Vip.Status <= 0 && userInfo.Member.Status <= 0 {
+		return fmt.Errorf("暂无权限")
+	}
 	//企业版 判断是否是管理员
 	//判断用户身份
-	userInfo := IC.Middleground.PowerCheckCenter.Check(in.AppId, in.UserId, in.NewUserId, in.AccountId, in.EntId, in.PositionType, in.PositionId)
 	switch in.ActionType {
 	case "in": //参标针对单个招标信息 或者 项目
 		if in.BidIds == "" && in.ProjectIds == "" {
@@ -75,7 +85,7 @@ func ParticipateDo(in *bxcore.ParticipateActionReq) error {
 			return err
 		}
 		//是否允许多人参标
-		if isAllow := util.IsALLow(in.EntId); !isAllow {
+		if isAllow := mysql.IsALLow(in.EntId); !isAllow {
 			if ok := mysql.IsParticipatedByBidId(in); ok {
 				return fmt.Errorf("当前项目不允许多人参标")
 			}
@@ -113,7 +123,7 @@ func ParticipateDo(in *bxcore.ParticipateActionReq) error {
 			return fmt.Errorf("划转对象不能为空")
 		}
 		//是否保留原跟踪人?
-		isAllow := util.IsALLow(in.EntId)
+		isAllow := mysql.IsALLow(in.EntId)
 		if (in.IsRetain || len(strings.Split(in.ToEntUserId, ",")) > 1) && !isAllow {
 			//不允许多人参标,但是前端参数又是保留原参标人 互相矛盾
 			return fmt.Errorf("当前项目只允许一人参标")
@@ -147,21 +157,29 @@ func GetParticipateSetInfo(in *bxcore.ParticipateSetUpInfoReq) (*bxcore.Particip
 		BidType:    nil,
 		RemindRule: nil,
 	}}
-	switch in.SetAction {
-	case "U": //update 更新设置信息
-		res.Data = nil
-		if err := mysql.UpdateParticipateSetInfo(in); err != nil {
-			res.ErrCode = -1
-			res.ErrMsg = err.Error()
-		}
-	default: //默认查询对应设置信息
-		//查询对应用户设置信息
-		//未设置过 返回默认配置
-		if info, err := mysql.GetParticipateSetInfo(in); err == nil {
-			res.Data = info
-		} else {
-			res.ErrCode = -1
-			res.ErrMsg = err.Error()
+	// 1. 判断身份是否有权限 不是超级订阅也不是大会员  则直接返回
+	userInfo := IC.Middleground.PowerCheckCenter.Check(in.AppId, in.UserId, in.NewUserId, in.AccountId, in.EntId, in.PositionType, in.PositionId)
+	// 不是超级订阅 也不是大会员
+	if userInfo.Vip.Status <= 0 && userInfo.Member.Status <= 0 {
+		res.ErrCode = -1
+		res.ErrMsg = "暂无权限"
+	} else {
+		switch in.SetAction {
+		case "U": //update 更新设置信息
+			res.Data = nil
+			if err := mysql.UpdateParticipateSetInfo(in); err != nil {
+				res.ErrCode = -1
+				res.ErrMsg = err.Error()
+			}
+		default: //默认查询对应设置信息
+			//查询对应用户设置信息
+			//未设置过 返回默认配置
+			if info, err := mysql.GetParticipateSetInfo(in); err == nil {
+				res.Data = info
+			} else {
+				res.ErrCode = -1
+				res.ErrMsg = err.Error()
+			}
 		}
 	}
 	return res, nil
@@ -173,14 +191,17 @@ func GetParticipatePersonInfo(in *bxcore.ParticipatePersonsReq) *bxcore.Particip
 		participateMap = map[int64]bool{}
 	)
 	if in.ProjectId != "" {
-		participateInfos := mysql.ParticipateProjectEnt(in.EntId, strings.Split(in.ProjectId, ","))
-		if participateInfos != nil && len(*participateInfos) > 0 {
-			participateInfo := (*participateInfos)[0]
-			personIds := MC.ObjToString(participateInfo["personIds"])
-			if personIds != "" {
-				for _, p := range strings.Split(personIds, ",") {
-					personId, _ := strconv.ParseInt(p, 10, 64)
-					participateMap[personId] = true
+		in.ProjectId = encrypt.DecodeArticleId2ByCheck(in.ProjectId)[0]
+		if in.ProjectId != "" {
+			participateInfos := mysql.ParticipateProjectEnt(in.EntId, strings.Split(in.ProjectId, ","))
+			if participateInfos != nil && len(*participateInfos) > 0 {
+				participateInfo := (*participateInfos)[0]
+				personIds := MC.ObjToString(participateInfo["personIds"])
+				if personIds != "" {
+					for _, p := range strings.Split(personIds, ",") {
+						personId, _ := strconv.ParseInt(p, 10, 64)
+						participateMap[personId] = true
+					}
 				}
 			}
 		}

+ 10 - 6
jyBXCore/rpc/service/participateBid.go

@@ -263,7 +263,7 @@ func (p *ParticipateBid) UpdateBidStatus(in *bxcore.UpdateBidStatusReq, projectI
 		defer pLock.Unlock()
 	}
 	// 如果查出来旧的 那么就需要做新旧对比
-	oldMap := p.GetLastBidStatus(projectId) // 查询出最新的招标状态信息
+	oldMap, _ := p.GetLastBidStatus(projectId) // 查询出最新的招标状态信息
 	// 新的
 	if in.BidStage == nil {
 		in.BidStage = []string{}
@@ -300,10 +300,12 @@ func (p *ParticipateBid) UpdateBidStatus(in *bxcore.UpdateBidStatusReq, projectI
 }
 
 // GetLastBidStatus 获取投标状态信息
-func (p *ParticipateBid) GetLastBidStatus(projectId string) map[string]interface{} {
-	rs := map[string]interface{}{}
-	// 查询项目投标信息 区分企业和个人
-	var result *[]map[string]interface{}
+func (p *ParticipateBid) GetLastBidStatus(projectId string) (map[string]interface{}, error) {
+	var (
+		rs = map[string]interface{}{}
+		// 查询项目投标信息 区分企业和个人
+		result *[]map[string]interface{}
+	)
 	switch p.PositionType {
 	case PositionTypeEnt:
 		result = mysql.GetBidContentEnt(projectId, p.EntId)
@@ -318,8 +320,10 @@ func (p *ParticipateBid) GetLastBidStatus(projectId string) map[string]interface
 				rs = *bidStatus
 			}
 		}
+	} else {
+		return rs, fmt.Errorf("暂无参标状态更新记录")
 	}
-	return rs
+	return rs, nil
 
 }
 func (p ParticipateBid) ParticipateContentFormat(data map[string]interface{}) (rs bxcore.ParticipateContentData) {

+ 58 - 37
jyBXCore/rpc/type/bxcore/bxcore.pb.go

@@ -2823,19 +2823,20 @@ type ParticipateSetUpInfoReq struct {
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
-	EntId        int64            `protobuf:"varint,1,opt,name=entId,proto3" json:"entId,omitempty"`               //企业id
-	EntUserId    int64            `protobuf:"varint,2,opt,name=entUserId,proto3" json:"entUserId,omitempty"`       // 企业下用户id
-	PositionId   int64            `protobuf:"varint,3,opt,name=positionId,proto3" json:"positionId,omitempty"`     // 职位id
-	PositionType int64            `protobuf:"varint,4,opt,name=positionType,proto3" json:"positionType,omitempty"` // 职位类型 0个人 1企业
-	MgoUserId    string           `protobuf:"bytes,5,opt,name=mgoUserId,proto3" json:"mgoUserId,omitempty"`        //原userId
-	AppId        string           `protobuf:"bytes,6,opt,name=appId,proto3" json:"appId,omitempty"`                //剑鱼默认10000
-	UserId       string           `protobuf:"bytes,7,opt,name=userId,proto3" json:"userId,omitempty"`              //用户id
-	NewUserId    int64            `protobuf:"varint,8,opt,name=newUserId,proto3" json:"newUserId,omitempty"`       //base_user_id 新用户id
-	AccountId    int64            `protobuf:"varint,9,opt,name=accountId,proto3" json:"accountId,omitempty"`       //账户id
-	SetAction    string           `protobuf:"bytes,10,opt,name=setAction,proto3" json:"setAction,omitempty"`       //请求动作:U:更新,默认空
-	IsAllow      string           `protobuf:"bytes,11,opt,name=isAllow,proto3" json:"isAllow,omitempty"`           //是否允许多人参标
-	BidType      []*BidTypeReq    `protobuf:"bytes,12,rep,name=bidType,proto3" json:"bidType,omitempty"`
-	RemindRule   []*RemindRuleReq `protobuf:"bytes,13,rep,name=remindRule,proto3" json:"remindRule,omitempty"`
+	EntId          int64            `protobuf:"varint,1,opt,name=entId,proto3" json:"entId,omitempty"`               //企业id
+	EntUserId      int64            `protobuf:"varint,2,opt,name=entUserId,proto3" json:"entUserId,omitempty"`       // 企业下用户id
+	PositionId     int64            `protobuf:"varint,3,opt,name=positionId,proto3" json:"positionId,omitempty"`     // 职位id
+	PositionType   int64            `protobuf:"varint,4,opt,name=positionType,proto3" json:"positionType,omitempty"` // 职位类型 0个人 1企业
+	MgoUserId      string           `protobuf:"bytes,5,opt,name=mgoUserId,proto3" json:"mgoUserId,omitempty"`        //原userId
+	AppId          string           `protobuf:"bytes,6,opt,name=appId,proto3" json:"appId,omitempty"`                //剑鱼默认10000
+	UserId         string           `protobuf:"bytes,7,opt,name=userId,proto3" json:"userId,omitempty"`              //用户id
+	NewUserId      int64            `protobuf:"varint,8,opt,name=newUserId,proto3" json:"newUserId,omitempty"`       //base_user_id 新用户id
+	AccountId      int64            `protobuf:"varint,9,opt,name=accountId,proto3" json:"accountId,omitempty"`       //账户id
+	SetAction      string           `protobuf:"bytes,10,opt,name=setAction,proto3" json:"setAction,omitempty"`       //请求动作:U:更新,默认空
+	IsAllow        string           `protobuf:"bytes,11,opt,name=isAllow,proto3" json:"isAllow,omitempty"`           //是否允许多人参标
+	BidType        []*BidTypeReq    `protobuf:"bytes,12,rep,name=bidType,proto3" json:"bidType,omitempty"`
+	RemindRule     []*RemindRuleReq `protobuf:"bytes,13,rep,name=remindRule,proto3" json:"remindRule,omitempty"`
+	NecessaryField string           `protobuf:"bytes,14,opt,name=necessaryField,proto3" json:"necessaryField,omitempty"` //必填字段
 }
 
 func (x *ParticipateSetUpInfoReq) Reset() {
@@ -2961,6 +2962,13 @@ func (x *ParticipateSetUpInfoReq) GetRemindRule() []*RemindRuleReq {
 	return nil
 }
 
+func (x *ParticipateSetUpInfoReq) GetNecessaryField() string {
+	if x != nil {
+		return x.NecessaryField
+	}
+	return ""
+}
+
 type BidTypeReq struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
@@ -3086,9 +3094,10 @@ type ParticipateSetUpInfo struct {
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
-	IsAllow    string           `protobuf:"bytes,1,opt,name=isAllow,proto3" json:"isAllow,omitempty"` //是否允许多人参标  默认0 开启是1
-	BidType    []*BidTypeReq    `protobuf:"bytes,2,rep,name=bidType,proto3" json:"bidType,omitempty"`
-	RemindRule []*RemindRuleReq `protobuf:"bytes,3,rep,name=remindRule,proto3" json:"remindRule,omitempty"`
+	IsAllow        string           `protobuf:"bytes,1,opt,name=isAllow,proto3" json:"isAllow,omitempty"` //是否允许多人参标  默认0 开启是1
+	BidType        []*BidTypeReq    `protobuf:"bytes,2,rep,name=bidType,proto3" json:"bidType,omitempty"`
+	RemindRule     []*RemindRuleReq `protobuf:"bytes,3,rep,name=remindRule,proto3" json:"remindRule,omitempty"`
+	NecessaryField string           `protobuf:"bytes,4,opt,name=necessaryField,proto3" json:"necessaryField,omitempty"` //必填字段
 }
 
 func (x *ParticipateSetUpInfo) Reset() {
@@ -3144,6 +3153,13 @@ func (x *ParticipateSetUpInfo) GetRemindRule() []*RemindRuleReq {
 	return nil
 }
 
+func (x *ParticipateSetUpInfo) GetNecessaryField() string {
+	if x != nil {
+		return x.NecessaryField
+	}
+	return ""
+}
+
 //设置信息范围内容
 type ParticipateSetUpInfoRes struct {
 	state         protoimpl.MessageState
@@ -4338,7 +4354,7 @@ var file_bxcore_proto_rawDesc = []byte{
 	0x12, 0x2d, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19,
 	0x2e, 0x62, 0x78, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70,
 	0x61, 0x74, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22,
-	0xb6, 0x03, 0x0a, 0x17, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x65, 0x53,
+	0xde, 0x03, 0x0a, 0x17, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x65, 0x53,
 	0x65, 0x74, 0x55, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x65,
 	0x6e, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x49,
 	0x64, 0x12, 0x1c, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x02,
@@ -4365,26 +4381,31 @@ var file_bxcore_proto_rawDesc = []byte{
 	0x65, 0x12, 0x35, 0x0a, 0x0a, 0x72, 0x65, 0x6d, 0x69, 0x6e, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x18,
 	0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52,
 	0x65, 0x6d, 0x69, 0x6e, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x52, 0x0a, 0x72, 0x65,
-	0x6d, 0x69, 0x6e, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x22, 0x3a, 0x0a, 0x0a, 0x42, 0x69, 0x64, 0x54,
-	0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
-	0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f,
-	0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e,
-	0x74, 0x65, 0x6e, 0x74, 0x22, 0x5d, 0x0a, 0x0d, 0x52, 0x65, 0x6d, 0x69, 0x6e, 0x64, 0x52, 0x75,
-	0x6c, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x69, 0x64, 0x53, 0x74, 0x61, 0x74,
-	0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x69, 0x64, 0x53, 0x74, 0x61, 0x74,
-	0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x02,
-	0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x64, 0x65, 0x72, 0x12,
-	0x12, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
-	0x6f, 0x64, 0x65, 0x22, 0x95, 0x01, 0x0a, 0x14, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70,
-	0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x55, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07,
-	0x69, 0x73, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x69,
-	0x73, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x12, 0x2c, 0x0a, 0x07, 0x62, 0x69, 0x64, 0x54, 0x79, 0x70,
-	0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x72, 0x65,
-	0x2e, 0x42, 0x69, 0x64, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x52, 0x07, 0x62, 0x69, 0x64,
-	0x54, 0x79, 0x70, 0x65, 0x12, 0x35, 0x0a, 0x0a, 0x72, 0x65, 0x6d, 0x69, 0x6e, 0x64, 0x52, 0x75,
-	0x6c, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x72,
-	0x65, 0x2e, 0x52, 0x65, 0x6d, 0x69, 0x6e, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x52,
-	0x0a, 0x72, 0x65, 0x6d, 0x69, 0x6e, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x22, 0x7f, 0x0a, 0x17, 0x50,
+	0x6d, 0x69, 0x6e, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x6e, 0x65, 0x63, 0x65,
+	0x73, 0x73, 0x61, 0x72, 0x79, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x0e, 0x6e, 0x65, 0x63, 0x65, 0x73, 0x73, 0x61, 0x72, 0x79, 0x46, 0x69, 0x65, 0x6c, 0x64,
+	0x22, 0x3a, 0x0a, 0x0a, 0x42, 0x69, 0x64, 0x54, 0x79, 0x70, 0x65, 0x52, 0x65, 0x71, 0x12, 0x12,
+	0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
+	0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20,
+	0x03, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x5d, 0x0a, 0x0d,
+	0x52, 0x65, 0x6d, 0x69, 0x6e, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x12, 0x1a, 0x0a,
+	0x08, 0x62, 0x69, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x08, 0x62, 0x69, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x6d,
+	0x61, 0x69, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x72, 0x65,
+	0x6d, 0x61, 0x69, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18,
+	0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x6f, 0x64, 0x65, 0x22, 0xbd, 0x01, 0x0a, 0x14,
+	0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x55, 0x70,
+	0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x69, 0x73, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x18,
+	0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, 0x73, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x12, 0x2c,
+	0x0a, 0x07, 0x62, 0x69, 0x64, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32,
+	0x12, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x42, 0x69, 0x64, 0x54, 0x79, 0x70, 0x65,
+	0x52, 0x65, 0x71, 0x52, 0x07, 0x62, 0x69, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x35, 0x0a, 0x0a,
+	0x72, 0x65, 0x6d, 0x69, 0x6e, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b,
+	0x32, 0x15, 0x2e, 0x62, 0x78, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x6d, 0x69, 0x6e, 0x64,
+	0x52, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x52, 0x0a, 0x72, 0x65, 0x6d, 0x69, 0x6e, 0x64, 0x52,
+	0x75, 0x6c, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x6e, 0x65, 0x63, 0x65, 0x73, 0x73, 0x61, 0x72, 0x79,
+	0x46, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6e, 0x65, 0x63,
+	0x65, 0x73, 0x73, 0x61, 0x72, 0x79, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x22, 0x7f, 0x0a, 0x17, 0x50,
 	0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x55, 0x70, 0x49,
 	0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x65, 0x72, 0x72, 0x5f, 0x63, 0x6f,
 	0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x65, 0x72, 0x72, 0x43, 0x6f, 0x64,

+ 0 - 8
jyBXCore/rpc/util/participate.go

@@ -1,7 +1,6 @@
 package util
 
 import (
-	"jyBXCore/rpc/model/mysql"
 	"sync"
 )
 
@@ -9,13 +8,6 @@ var (
 	PLock *ParticipateLock
 )
 
-//是否允许多人参标
-func IsALLow(entId int64) bool {
-	return mysql.GetParticipateIsAllow(map[string]interface{}{
-		"i_entid": entId,
-	})
-}
-
 type ParticipateLock struct {
 	sync.Mutex
 	UserLock map[string]*sync.Mutex