Browse Source

feat:设置按钮

wangshan 2 năm trước cách đây
mục cha
commit
ec428b95e3

+ 1 - 1
jyBXCore/rpc/bxcore.proto

@@ -351,7 +351,7 @@ message  RemindRuleReq{
 }
 //设置信息内容
 message ParticipateSetUpInfo{
-  string  isAllow = 1;//是否允许多人参标  默认0 开启是1
+  int64  isAllow = 1;//是否允许多人参标  默认0 开启是1
   repeated BidTypeReq bidType = 2;
   repeated RemindRuleReq remindRule = 3;
   string necessaryField = 4;//必填字段

+ 8 - 9
jyBXCore/rpc/model/mysql/participateBid.go

@@ -349,9 +349,10 @@ func GetParticipateSetInfo(in *bxcore.ParticipateSetUpInfoReq) (*bxcore.Particip
 	}
 	if setInfo, ok := IC.Mgo.FindOne(PartTable, query); ok {
 		var (
-			isAllow, isRequird string
-			bidType            []*bxcore.BidTypeReq
-			remindRule         []*bxcore.RemindRuleReq
+			isAllow    int64
+			isRequired string
+			bidType    []*bxcore.BidTypeReq
+			remindRule []*bxcore.RemindRuleReq
 		)
 		bidType = append(bidType, &bxcore.BidTypeReq{
 			Name:    "直接投标",
@@ -368,14 +369,12 @@ func GetParticipateSetInfo(in *bxcore.ParticipateSetUpInfoReq) (*bxcore.Particip
 		if setInfo != nil {
 			//必填字段
 			if (*setInfo)["s_requiredField"] != nil {
-				isRequird = MC.ObjToString((*setInfo)["s_requiredField"])
+				isRequired = MC.ObjToString((*setInfo)["s_requiredField"])
 			} else {
-				isRequird = "bidType"
+				isRequired = "bidType"
 			}
 			if (*setInfo)["i_isallow"] != nil {
-				isAllow = strconv.Itoa(MC.IntAll((*setInfo)["i_isallow"]))
-			} else {
-				isAllow = "0"
+				isAllow = MC.Int64All((*setInfo)["i_isallow"])
 			}
 			if (*setInfo)["o_bidtype"] != nil {
 				if sbb, err := json.Marshal((*setInfo)["o_bidtype"]); err == nil {
@@ -401,7 +400,7 @@ func GetParticipateSetInfo(in *bxcore.ParticipateSetUpInfoReq) (*bxcore.Particip
 			}
 		}
 		return &bxcore.ParticipateSetUpInfo{
-			NecessaryField: isRequird,
+			NecessaryField: isRequired,
 			IsAllow:        isAllow,
 			BidType:        bidType,
 			RemindRule:     remindRule,

+ 1 - 1
jyBXCore/rpc/service/participate.go

@@ -153,7 +153,7 @@ func ParticipateDo(in *bxcore.ParticipateActionReq) error {
 func GetParticipateSetInfo(in *bxcore.ParticipateSetUpInfoReq) (*bxcore.ParticipateSetUpInfoRes, error) {
 	defer MC.Catch()
 	res := &bxcore.ParticipateSetUpInfoRes{Data: &bxcore.ParticipateSetUpInfo{
-		IsAllow:    "0",
+		IsAllow:    0,
 		BidType:    nil,
 		RemindRule: nil,
 	}}

+ 4 - 4
jyBXCore/rpc/type/bxcore/bxcore.pb.go

@@ -3214,7 +3214,7 @@ type ParticipateSetUpInfo struct {
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
-	IsAllow        string           `protobuf:"bytes,1,opt,name=isAllow,proto3" json:"isAllow,omitempty"` //是否允许多人参标  默认0 开启是1
+	IsAllow        int64            `protobuf:"varint,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"` //必填字段
@@ -3253,11 +3253,11 @@ func (*ParticipateSetUpInfo) Descriptor() ([]byte, []int) {
 	return file_bxcore_proto_rawDescGZIP(), []int{29}
 }
 
-func (x *ParticipateSetUpInfo) GetIsAllow() string {
+func (x *ParticipateSetUpInfo) GetIsAllow() int64 {
 	if x != nil {
 		return x.IsAllow
 	}
-	return ""
+	return 0
 }
 
 func (x *ParticipateSetUpInfo) GetBidType() []*BidTypeReq {
@@ -4591,7 +4591,7 @@ var file_bxcore_proto_rawDesc = []byte{
 	0x04, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x6f, 0x64,
 	0x65, 0x22, 0xd5, 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,
+	0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 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,