|
@@ -113,7 +113,7 @@ func GetProjectList(req *types.ProjectListReq) (resultList []*ProjectEntry, hasN
|
|
|
hasNextPage = false
|
|
|
}
|
|
|
}
|
|
|
- moreInfo(req, resultList) // 补充信息
|
|
|
+ moreInfo(req, plist, resultList) // 补充信息
|
|
|
|
|
|
return
|
|
|
}
|
|
@@ -320,7 +320,7 @@ func filterData(req *types.ProjectListReq, resultList []*ProjectEntry, preSales,
|
|
|
// @Author jianghan
|
|
|
// @Description 补充人脉 等信息
|
|
|
// @Date 2024/4/17
|
|
|
-func moreInfo(req *types.ProjectListReq, list []*ProjectEntry) (result []*ProjectEntry) {
|
|
|
+func moreInfo(req *types.ProjectListReq, plist []string, list []*ProjectEntry) (result []*ProjectEntry) {
|
|
|
var buyerIds []string
|
|
|
for _, m := range list {
|
|
|
if m.BuyerId != "" {
|
|
@@ -352,17 +352,29 @@ func moreInfo(req *types.ProjectListReq, list []*ProjectEntry) (result []*Projec
|
|
|
}
|
|
|
}
|
|
|
for _, m := range list {
|
|
|
+ // 中间人的项目 默认 我的人脉
|
|
|
+ if len(plist) > 0 {
|
|
|
+ for _, pid := range plist {
|
|
|
+ if m.ProjectId == pid {
|
|
|
+ m.MyConn = true
|
|
|
+ m.ConnType = 1
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
// 补充跳转链接
|
|
|
if m.BusinessType == "采购意向" || m.BusinessType == "招标项目" {
|
|
|
m.Href = fmt.Sprintf("/article/content/%s.html", encrypt.CommonEncodeArticle("content", m.ProjectId))
|
|
|
}
|
|
|
m.ProjectId = util.EncodeId(m.ProjectId)
|
|
|
// 人脉、人脉所在单位项目 conn_type: 1 人脉可转介绍项目; conn_type: 2 人脉所在单位项目
|
|
|
- if connMap[m.BuyerId] == 1 {
|
|
|
- m.MyConn = true // 我的人脉
|
|
|
- m.ConnType = 1
|
|
|
- } else {
|
|
|
- m.MyConn = false
|
|
|
+ if !m.MyConn {
|
|
|
+ if connMap[m.BuyerId] == 1 {
|
|
|
+ m.MyConn = true // 我的人脉
|
|
|
+ m.ConnType = 1
|
|
|
+ } else {
|
|
|
+ m.MyConn = false
|
|
|
+ }
|
|
|
}
|
|
|
if m.ConnType == 0 {
|
|
|
if connMap[m.BuyerId] != 0 {
|