|
@@ -2,6 +2,7 @@ package service
|
|
|
|
|
|
import (
|
|
|
"app.yhyue.com/moapp/jybase/common"
|
|
|
+ "app.yhyue.com/moapp/jybase/encrypt"
|
|
|
elastic "app.yhyue.com/moapp/jybase/es"
|
|
|
"app.yhyue.com/moapp/jybase/mongodb"
|
|
|
T "bp.jydev.jianyu360.cn/CRM/networkManage/api/common"
|
|
@@ -40,6 +41,9 @@ func GetMonitorList(req *types.PrMonitorListReq) (resultList *[]map[string]inter
|
|
|
esQuery1 = fmt.Sprintf(esQ2, strings.ReplaceAll(strings.Join(bName, ","), ",", `","`), strings.ReplaceAll(strings.Join(fields, ","), ",", `","`), pageStart, req.PageSize)
|
|
|
}
|
|
|
total, resultList = elastic.GetWithCount("bidding", "bidding", "", esQuery1)
|
|
|
+ for _, m := range *resultList {
|
|
|
+ m["_id"] = encrypt.CommonEncodeArticle("content", common.ObjToString(m["_id"]))
|
|
|
+ }
|
|
|
return
|
|
|
} else {
|
|
|
return nil, 0
|
|
@@ -50,14 +54,14 @@ func GetCollectList(req *types.PrCollectListReq) (resultList []map[string]interf
|
|
|
scopeClass := FindBusiness(req.EntId, req.MgoUserId)
|
|
|
info := T.JianyuMysql.Find("bdcollection", map[string]interface{}{"userid": req.UserId}, "", `{id: 1}`, -1, -1)
|
|
|
var ids []interface{}
|
|
|
+ if info == nil || len(*info) == 0 {
|
|
|
+ return make([]map[string]interface{}, 0), 0
|
|
|
+ }
|
|
|
for _, m := range *info {
|
|
|
if bid := common.ObjToString(m["bid"]); bid != "" {
|
|
|
ids = append(ids, mongodb.StringTOBsonId(bid))
|
|
|
}
|
|
|
}
|
|
|
- if len(ids) == 0 {
|
|
|
- return make([]map[string]interface{}, 0), 0
|
|
|
- }
|
|
|
if len(ids) > 100 {
|
|
|
ids = ids[:100]
|
|
|
}
|
|
@@ -71,6 +75,7 @@ func GetCollectList(req *types.PrCollectListReq) (resultList []map[string]interf
|
|
|
if tp := common.ObjToString(m["toptype"]); tp == "采购意向" || tp == "预告" || tp == "招标" {
|
|
|
for _, s := range strings.Split(scopeClass, ",") {
|
|
|
if top := common.ObjToString("s_topscopeclass"); strings.Contains(top, s) {
|
|
|
+ m["_id"] = encrypt.CommonEncodeArticle("content", common.ObjToString(m["_id"]))
|
|
|
resultList = append(resultList, m)
|
|
|
break
|
|
|
}
|