|
@@ -203,14 +203,14 @@ func (nIndex *NewIndex) NewIndex() error {
|
|
|
})
|
|
|
}
|
|
|
//采购意向
|
|
|
- procure, procureName := GetIndexProjectList(5, 5)
|
|
|
+ procure, procureName := GetIndexProjectList(5, 10)
|
|
|
bidTrends = append(bidTrends, map[string]interface{}{
|
|
|
"listData": procure,
|
|
|
"types": procureName,
|
|
|
"url": fmt.Sprintf("%s", BiddingTypeUrl[5]),
|
|
|
})
|
|
|
//项目分包
|
|
|
- projectPage, typesName := GetIndexProjectList(6, 5)
|
|
|
+ projectPage, typesName := GetIndexProjectList(6, 10)
|
|
|
bidTrends = append(bidTrends, map[string]interface{}{
|
|
|
"listData": projectPage,
|
|
|
"types": typesName,
|
|
@@ -221,7 +221,7 @@ func (nIndex *NewIndex) NewIndex() error {
|
|
|
projectZoneType := []int{13, 14, 15, 16}
|
|
|
projectZone := []map[string]interface{}{}
|
|
|
for _, val := range projectZoneType {
|
|
|
- listData, types := GetIndexProjectList(val, 5)
|
|
|
+ listData, types := GetIndexProjectList(val, 10)
|
|
|
projectZone = append(projectZone, map[string]interface{}{
|
|
|
"listData": listData,
|
|
|
"types": types,
|
|
@@ -383,17 +383,18 @@ func GetIndexProjectList(typ, pageSize int) (data []map[string]interface{}, type
|
|
|
data = common.ObjArrToMapArr(redisArr)
|
|
|
return
|
|
|
}
|
|
|
- res, err := g.DB().Query(gctx.New(), fmt.Sprintf(`SELECT nbl.bid_id as bid_id,nbl.title as title,nbl.publish_time as publish_time FROM new_bid_sign nbs LEFT JOIN new_bidList nbl ON nbs.bid_id = nbl.bid_id WHERE bitmapContains(sign, %d) ORDER BY publish_time DESC LIMIT %d `, typ, pageSize))
|
|
|
+ res, err := g.DB().Query(gctx.New(), fmt.Sprintf(`SELECT bid_id,publish_time,bitmapToArray(sign) FROM new_bid_sign WHERE bitmapContains(sign, %d) ORDER BY publish_time DESC LIMIT %d`, typ, pageSize))
|
|
|
if err != nil || res.IsEmpty() {
|
|
|
return nil, types
|
|
|
}
|
|
|
- for _, v := range res.List() {
|
|
|
+ /*for _, v := range res.List() {
|
|
|
v["_id"] = encrypt.EncodeArticleId2ByCheck(common.InterfaceToStr(v["bid_id"]))
|
|
|
v["publish_time"] = time.Unix(common.Int64All(v["publish_time"]), 0).Format("2006-01-02")
|
|
|
data = append(data, v)
|
|
|
- }
|
|
|
+ }*/
|
|
|
+ finalArr := FillingBiddingBaseFields(gctx.New(), res.List(), types)
|
|
|
redis.Put(RedisNameNew, redidKey, data, 24*3600)
|
|
|
- return data, types
|
|
|
+ return finalArr, types
|
|
|
}
|
|
|
|
|
|
// 优秀供应商
|