ソースを参照

Merge branch 'feature/v1.1.12' of http://192.168.3.207:8080/BaseService/jyMicroservices into feature/v1.1.12

wangshan 2 年 前
コミット
ea3f935d47

+ 11 - 4
jyBXSubscribe/rpc/bxsubscribe.proto

@@ -70,11 +70,18 @@ message subscribeInfo {
   string agency =26;//代理机构
   string agencyPerson=27;//代理机构联系人
   string agencyTel=28;//代理机构联系电话
-  string winnerPerson=29;//中标企业联系人
-  string winnerTel=30;//中标企业联系电话
-  string signendTime=31 ;// 报名截止日期
-  string bidendTime=32;// 投标截止日期
+  int64 signendTime=29 ;// 报名截止日期
+  int64 bidendTime=30;// 投标截止日期
+  repeated WinnerInfo winnerInfo = 31;// 中标企业信息
 
+
+}
+//
+message WinnerInfo{
+  string winner = 1;
+  string winnerTel = 2;
+  string winnerPerson = 3;
+  string winnerId = 4;
 }
 //
 message SomeInfoReq{

+ 1 - 0
jyBXSubscribe/rpc/bxsubscribe/bxsubscribe.go

@@ -38,6 +38,7 @@ type (
 	UserResp               = bxsubscribe.UserResp
 	UserStatus             = bxsubscribe.UserStatus
 	ViewStatusResp         = bxsubscribe.ViewStatusResp
+	WinnerInfo             = bxsubscribe.WinnerInfo
 
 	Bxsubscribe interface {
 		// 获取订阅推送列表

+ 24 - 7
jyBXSubscribe/rpc/model/push.go

@@ -28,8 +28,8 @@ import (
 const (
 	pageSize            = 100
 	AllSubPushCacheSize = 200
-	query               = `{"query":{"terms":{"_id":["%s"]}},"_source":["_id","area", "publishtime", "s_subscopeclass", "subtype", "title", "toptype", "type", "buyerclass","bidamount","budget","projectname","buyer","bidopentime","s_winner","filetext","buyertel","buyerperson","agency","agencyperson","agencytel","winnerperson","winnertel","signendtime","bidendtime"],"from":0,"size":%d}`
-	mongodb_fields      = `{"_id":1,"area":1,"publishtime":1,"s_subscopeclass":1,"subtype":1,"title":1,"toptype":1,"type":1, "buyerclass":1,"budget":1,"bidamount":1,"s_winner":1,"bidopentime":1,"buyer":1,"projectname":1,"filetext":1,"buyertel":1,"buyerperson":1,"agency":1,"agencyperson":1,"agencytel":1,"winnerperson":1,"winnertel":1,"signendtime":1,"bidendtime":1}`
+	query               = `{"query":{"terms":{"_id":["%s"]}},"_source":["_id","area", "publishtime", "s_subscopeclass", "subtype", "title", "toptype", "type", "buyerclass","bidamount","budget","projectname","buyer","bidopentime","s_winner","filetext","buyertel","buyerperson","agency","agencyperson","agencytel","winnerperson","winnertel","signendtime","bidendtime","entidlist"],"from":0,"size":%d}`
+	mongodb_fields      = `{"_id":1,"area":1,"publishtime":1,"s_subscopeclass":1,"subtype":1,"title":1,"toptype":1,"type":1, "buyerclass":1,"budget":1,"bidamount":1,"s_winner":1,"bidopentime":1,"buyer":1,"projectname":1,"filetext":1,"buyertel":1,"buyerperson":1,"agency":1,"agencyperson":1,"agencytel":1,"winnerperson":1,"winnertel":1,"signendtime":1,"bidendtime":1,"entidlist":1}`
 
 	SubFreeFlag  = "fType"
 	SubVipFlag   = "vType"
@@ -235,16 +235,33 @@ func (s *subscribePush) InfoFormat(p *PushCa, info *map[string]interface{}, isPa
 	if !isPay {
 		return formatInfo
 	}
+	winnerList := common.InterfaceToStr((*info)["s_winner"]) //中标企业名称集合
+	if winnerList != "" && len(strings.Split(winnerList, ",")) > 0 {
+		for wk, wv := range strings.Split(winnerList, ",") {
+			var (
+				winnerId = ""
+			)
+			if (*info)["entidlist"] != nil {
+				if entIdList := common.ObjArrToStringArr((*info)["entidlist"].([]interface{})); len(entIdList) > wk { //中标企业id集合
+					winnerId = entIdList[wk]
+				}
+			}
+			formatInfo.WinnerInfo = append(formatInfo.WinnerInfo, &bxsubscribe.WinnerInfo{
+				Winner:       wv,                                                                                                              //中标企业 需要单独处理
+				WinnerTel:    common.ObjToString((*info)["winnertel"]),                                                                        //中标企业联系电话
+				WinnerPerson: common.ObjToString((*info)["winnerperson"]),                                                                     //中标企业联系人
+				WinnerId:     common.If(winnerId != "" && len([]rune(winnerId)) > 12, encrypt.EncodeArticleId2ByCheck(winnerId), "").(string), //中标企业加密id  存在winnerId 异常的情况
+			})
+		}
+	}
 	// 付费用户返回详细列表字段
 	formatInfo.BuyerTel = common.ObjToString((*info)["buyertel"])
 	formatInfo.BuyerPerson = common.ObjToString((*info)["buyerperson"])
 	formatInfo.Agency = common.ObjToString((*info)["agency"])
 	formatInfo.AgencyPerson = common.ObjToString((*info)["agencyperson"])
 	formatInfo.AgencyTel = common.ObjToString((*info)["agencytel"])
-	formatInfo.WinnerPerson = common.ObjToString((*info)["winnerperson"])
-	formatInfo.WinnerTel = common.ObjToString((*info)["winnertel"])
-	formatInfo.SignendTime = common.ObjToString((*info)["signendtime"])
-	formatInfo.BidendTime = common.ObjToString((*info)["bidendtime"])
+	formatInfo.SignendTime = common.Int64All((*info)["signendtime"])
+	formatInfo.BidendTime = common.Int64All((*info)["bidendtime"])
 	return formatInfo
 
 }
@@ -1002,7 +1019,7 @@ func GetKeySet(t string, u *map[string]interface{}, data []string) (bool, []stri
 const (
 	INDEX      = "bidding"
 	TYPE       = "bidding"
-	bidField   = `"_id","title","publishtime","toptype","subtype","type","area","city","s_subscopeclass","buyerclass","budget","bidamount","filetext","spidercode","site","buyer","bidopentime","buyertel","buyerperson","agency","agencyperson","agencytel","s_winner",winnerperson","winnertel","signendtime","bidendtime"`
+	bidField   = `"_id","title","publishtime","toptype","subtype","type","area","city","s_subscopeclass","buyerclass","budget","bidamount","filetext","spidercode","site","buyer","bidopentime","buyertel","buyerperson","agency","agencyperson","agencytel","s_winner",winnerperson","winnertel","signendtime","bidendtime","entidlist"`
 	bidTime    = `{"range":{"publishtime":{"gt":%d}}}`
 	bidSort    = `{"publishtime":"desc"}`
 	findfields = `"title"`

ファイルの差分が大きいため隠しています
+ 420 - 348
jyBXSubscribe/rpc/type/bxsubscribe/bxsubscribe.pb.go


この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません