|
@@ -17,28 +17,45 @@ const (
|
|
)
|
|
)
|
|
|
|
|
|
type SubPushList struct {
|
|
type SubPushList struct {
|
|
- Id string `json:"_id"`
|
|
|
|
- Title string `json:"title"`
|
|
|
|
- Area string `json:"area"`
|
|
|
|
- BuyerClass string `json:"buyerClass"`
|
|
|
|
- Subtype string `json:"subtype"`
|
|
|
|
- Industry string `json:"industry"`
|
|
|
|
- PublishTime int64 `json:"publishTime"`
|
|
|
|
- Ca_index int64 `json:"ca_index"`
|
|
|
|
- Ca_date int64 `json:"ca_date"`
|
|
|
|
- Ca_isvisit int `json:"ca_isvisit"`
|
|
|
|
- Ca_isvip int `json:"ca_isvip"`
|
|
|
|
- Ca_type int `json:"ca_type"`
|
|
|
|
- Ca_fileExists bool `json:"ca_fileExists"`
|
|
|
|
- MatchKeys []string `json:"matchKeys"`
|
|
|
|
- Budget interface{} `json:"budget"`
|
|
|
|
- BidAmount interface{} `json:"bidAmount"`
|
|
|
|
- Collection int `json:"collection"`
|
|
|
|
- Buyer string `json:"buyer"`
|
|
|
|
- ProjectName string `json:"projectName"`
|
|
|
|
- Winner string `json:"winner"`
|
|
|
|
- BidOpenTime int64 `json:"bidOpenTime"`
|
|
|
|
- Source int64 `json:"source"`
|
|
|
|
|
|
+ Id string `json:"_id"`
|
|
|
|
+ Title string `json:"title"`
|
|
|
|
+ Area string `json:"area"`
|
|
|
|
+ BuyerClass string `json:"buyerClass"`
|
|
|
|
+ Subtype string `json:"subtype"`
|
|
|
|
+ Industry string `json:"industry"`
|
|
|
|
+ PublishTime int64 `json:"publishTime"`
|
|
|
|
+ Ca_index int64 `json:"ca_index"`
|
|
|
|
+ Ca_date int64 `json:"ca_date"`
|
|
|
|
+ Ca_isvisit int `json:"ca_isvisit"`
|
|
|
|
+ Ca_isvip int `json:"ca_isvip"`
|
|
|
|
+ Ca_type int `json:"ca_type"`
|
|
|
|
+ Ca_fileExists bool `json:"ca_fileExists"`
|
|
|
|
+ MatchKeys []string `json:"matchKeys"`
|
|
|
|
+ Budget interface{} `json:"budget"`
|
|
|
|
+ BidAmount interface{} `json:"bidAmount"`
|
|
|
|
+ Collection int `json:"collection"`
|
|
|
|
+ Buyer string `json:"buyer"`
|
|
|
|
+ ProjectName string `json:"projectName"`
|
|
|
|
+ Winner string `json:"winner"`
|
|
|
|
+ BidOpenTime int64 `json:"bidOpenTime"`
|
|
|
|
+ Source int64 `json:"source"`
|
|
|
|
+ WinnerInfo []*WinnerInfo `json:"winnerInfo"`
|
|
|
|
+ Site string `json:"site"`
|
|
|
|
+ BuyerTel string `json:"buyerTel"`
|
|
|
|
+ BuyerPerson string `json:"buyerPerson"`
|
|
|
|
+ Agency string `json:"agency"`
|
|
|
|
+ AgencyPerson string `json:"agencyPerson"`
|
|
|
|
+ AgencyTel string `json:"agencyTel"`
|
|
|
|
+ SignendTime int64 `json:"signendTime"`
|
|
|
|
+ BidendTime int64 `json:"bidendTime"`
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+//
|
|
|
|
+type WinnerInfo struct {
|
|
|
|
+ Winner string `json:"winner"`
|
|
|
|
+ WinnerTel string `json:"winnerTel"`
|
|
|
|
+ WinnerPerson string `json:"winnerPerson"`
|
|
|
|
+ WinnerId string `json:"winnerId"`
|
|
}
|
|
}
|
|
|
|
|
|
type SubPush struct {
|
|
type SubPush struct {
|
|
@@ -117,6 +134,23 @@ func NewSubPushList(pushCas []*PushCa) []*SubPushList {
|
|
if _id == "" {
|
|
if _id == "" {
|
|
_id = ObjToString((*info)["_id"])
|
|
_id = ObjToString((*info)["_id"])
|
|
}
|
|
}
|
|
|
|
+ winner := ObjToString((*info)["s_winner"])
|
|
|
|
+ winnerInfo := []*WinnerInfo{}
|
|
|
|
+ if winner != "" && len(strings.Split(winner, ",")) > 0 {
|
|
|
|
+ for wk, wv := range strings.Split(winner, ",") {
|
|
|
|
+ var winnerId = ""
|
|
|
|
+ eil, _ := (*info)["entidlist"].([]interface{})
|
|
|
|
+ if entIdList := ObjArrToStringArr(eil); len(entIdList) > wk { //中标企业id集合
|
|
|
|
+ winnerId = entIdList[wk]
|
|
|
|
+ }
|
|
|
|
+ winnerInfo = append(winnerInfo, &WinnerInfo{
|
|
|
|
+ Winner: wv, //中标企业 需要单独处理
|
|
|
|
+ WinnerTel: ObjToString((*info)["winnertel"]), //中标企业联系电话
|
|
|
|
+ WinnerPerson: ObjToString((*info)["winnerperson"]), //中标企业联系人
|
|
|
|
+ WinnerId: If(winnerId != "" && len([]rune(winnerId)) > 12, EncodeArticleId2ByCheck(winnerId), "").(string), //中标企业加密id 存在winnerId 异常的情况
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }
|
|
subPushList = append(subPushList, &SubPushList{
|
|
subPushList = append(subPushList, &SubPushList{
|
|
Id: EncodeArticleId2ByCheck(_id),
|
|
Id: EncodeArticleId2ByCheck(_id),
|
|
Title: ObjToString((*info)["title"]),
|
|
Title: ObjToString((*info)["title"]),
|
|
@@ -135,9 +169,18 @@ func NewSubPushList(pushCas []*PushCa) []*SubPushList {
|
|
BidAmount: (*info)["bidamount"],
|
|
BidAmount: (*info)["bidamount"],
|
|
Buyer: ObjToString((*info)["buyer"]),
|
|
Buyer: ObjToString((*info)["buyer"]),
|
|
ProjectName: ObjToString((*info)["projectname"]),
|
|
ProjectName: ObjToString((*info)["projectname"]),
|
|
- Winner: ObjToString((*info)["s_winner"]),
|
|
|
|
|
|
+ Winner: winner,
|
|
BidOpenTime: Int64All((*info)["bidopentime"]),
|
|
BidOpenTime: Int64All((*info)["bidopentime"]),
|
|
Source: p.Source,
|
|
Source: p.Source,
|
|
|
|
+ Site: ObjToString((*info)["site"]),
|
|
|
|
+ BuyerTel: ObjToString((*info)["buyerTel"]),
|
|
|
|
+ BuyerPerson: ObjToString((*info)["buyerPerson"]),
|
|
|
|
+ Agency: ObjToString((*info)["agency"]),
|
|
|
|
+ AgencyPerson: ObjToString((*info)["agencyPerson"]),
|
|
|
|
+ AgencyTel: ObjToString((*info)["agencyTel"]),
|
|
|
|
+ SignendTime: Int64All((*info)["signendTime"]),
|
|
|
|
+ BidendTime: Int64All((*info)["bidendTime"]),
|
|
|
|
+ WinnerInfo: winnerInfo,
|
|
})
|
|
})
|
|
}
|
|
}
|
|
return subPushList
|
|
return subPushList
|