|
@@ -5,6 +5,7 @@ import (
|
|
|
"database/sql"
|
|
|
"encoding/json"
|
|
|
"fmt"
|
|
|
+ "log"
|
|
|
"math"
|
|
|
"sort"
|
|
|
"strings"
|
|
@@ -331,7 +332,7 @@ func (n *network) AllProject(in *types.AllprojectReq) (reply *types.Reply) {
|
|
|
reply = &types.Reply{}
|
|
|
key := fmt.Sprintf(NetworkManageAllProjectKey, in.PositionId)
|
|
|
rbt, rerr := redis.GetNewBytes("newother", key)
|
|
|
- if rerr == nil && rbt != nil {
|
|
|
+ if false && rerr == nil && rbt != nil {
|
|
|
json.Unmarshal(*rbt, &reply)
|
|
|
return
|
|
|
}
|
|
@@ -473,7 +474,6 @@ func (n *network) AllProject(in *types.AllprojectReq) (reply *types.Reply) {
|
|
|
sort.Sort(v)
|
|
|
id, pType, pMyType, pMyId := "", "", "", ""
|
|
|
for _, vv := range v.Children {
|
|
|
- childStartCheckCodeLen := len(checkCode)
|
|
|
myId := vv.CompanyId
|
|
|
if vv.Type == "middleman" {
|
|
|
myId = fmt.Sprint(vv.Id)
|
|
@@ -524,7 +524,8 @@ func (n *network) AllProject(in *types.AllprojectReq) (reply *types.Reply) {
|
|
|
}
|
|
|
cccNodes = append(cccNodes, nt)
|
|
|
cccIndexMap[vvv.Name] = len(cccNodes) - 1
|
|
|
- if (!hasDefaultCheck && vv.Count > 0) || compareId == in.ClickId {
|
|
|
+ if !hasDefaultCheck || compareId == in.ClickId {
|
|
|
+ log.Println("-----1", nt.CODE)
|
|
|
checkCode = append(checkCode, nt.CODE)
|
|
|
}
|
|
|
}
|
|
@@ -560,11 +561,12 @@ func (n *network) AllProject(in *types.AllprojectReq) (reply *types.Reply) {
|
|
|
MYTYPE: "firstparty",
|
|
|
DATACOUNT: dataCount,
|
|
|
}
|
|
|
- if (!hasDefaultCheck && vv.Count > 0) || compareId == in.ClickId {
|
|
|
+ if !hasDefaultCheck || compareId == in.ClickId {
|
|
|
+ log.Println("-----2", nt.CODE)
|
|
|
checkCode = append(checkCode, nt.CODE)
|
|
|
}
|
|
|
*convList = append(*convList, nt)
|
|
|
- if !hasDefaultCheck && vv.Count > 0 {
|
|
|
+ if !hasDefaultCheck {
|
|
|
hasDefaultCheck = true
|
|
|
}
|
|
|
}
|
|
@@ -610,7 +612,8 @@ func (n *network) AllProject(in *types.AllprojectReq) (reply *types.Reply) {
|
|
|
MYTYPE: vv.Type,
|
|
|
}
|
|
|
//如果甲方的子节点被选中了,父节点跟着被选中,非甲方的要对比子节点可介绍业主
|
|
|
- if (!hasDefaultCheck && vv.Count > 0) || childStartCheckCodeLen != len(checkCode) || (v.Name != "甲方" && in.ClickId != "" && compareId == fmt.Sprint(vv.Id)) {
|
|
|
+ if !hasDefaultCheck || (v.Name != "甲方" && in.ClickId != "" && compareId == fmt.Sprint(vv.Id)) {
|
|
|
+ log.Println("-----3", cm.CODE)
|
|
|
hasDefaultCheck = true
|
|
|
checkCode = append(checkCode, cm.CODE)
|
|
|
}
|