Przeglądaj źródła

Merge remote-tracking branch 'origin/master'

WH01243 9 miesięcy temu
rodzic
commit
015e5c5183

+ 4 - 3
api/internal/logic/prcollectlistlogic.go

@@ -29,10 +29,11 @@ func NewPrCollectListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *PrC
 func (l *PrCollectListLogic) PrCollectList(req *types.PrCollectListReq) (resp *types.Reply, err error) {
 	logx.Info(fmt.Sprintf("%+v", req))
 	resp = &types.Reply{}
-	list, count := service.GetCollectList(req)
+	list, count, has := service.GetCollectList(req)
 	resp.Data = map[string]interface{}{
-		"list":  list,
-		"total": count,
+		"list":       list,
+		"total":      count,
+		"hasCollect": has,
 	}
 	return
 }

+ 4 - 3
api/internal/logic/prmonitorlistlogic.go

@@ -29,10 +29,11 @@ func NewPrMonitorListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *PrM
 func (l *PrMonitorListLogic) PrMonitorList(req *types.PrMonitorListReq) (resp *types.Reply, err error) {
 	logx.Info(fmt.Sprintf("%+v", req))
 	resp = &types.Reply{}
-	list, count := service.GetMonitorList(req)
+	list, count, has := service.GetMonitorList(req)
 	resp.Data = map[string]interface{}{
-		"list":  list,
-		"total": count,
+		"list":       list,
+		"total":      count,
+		"hasMonitor": has,
 	}
 	return
 }

+ 5 - 1
api/internal/service/initNetwork.go

@@ -71,7 +71,7 @@ func (i *InitNetwork) Init() {
 		args := []interface{}{i.EntName}
 		wh, newArgs := util.WhArgs(strings.Split(i.BusinessType, ","))
 		args = append(args, newArgs...)
-		rows, err := ClickhouseConn.Query(context.Background(), `select DISTINCT winner_id,winner from information.transaction_info WHERE buyer_id IN (SELECT buyer_id from information.transaction_info WHERE has(winner,?) and buyer_id<>'') AND hasAny(property_form,[`+wh+`])`, args...)
+		rows, err := ClickhouseConn.Query(context.Background(), `select DISTINCT winner_id,winner from information.transaction_info WHERE buyer_id IN (SELECT buyer_id from information.transaction_info WHERE has(winner,?) and buyer_id<>'') AND hasAny(topscopeclass,[`+wh+`])`, args...)
 		if err != nil {
 			logx.Error(err)
 			return
@@ -143,11 +143,15 @@ func (i *InitNetwork) Init() {
 	values := []interface{}{}
 	fields := []string{"position_id", "ent_id", "ent_dept_id", "ent_user_id", "itype", "company_name", "company_id", "qyxy_id", "contact_person", "contact_phone", "status", "create_time", "update_time"}
 	index := 0
+	typeLimit := map[int]int{}
 	for _, v := range array {
 		if v.ContactInfo == nil || v.ContactInfo.Phone == "" || v.ContactInfo.Name == "" {
 			continue
+		} else if typeLimit[v.Itype] >= 100 {
+			continue
 		}
 		if CrmMysql.CountBySql(`select count(1) from crm.connection where position_id=? and company_id=? and itype=?`, i.PositionId, v.Company_id, v.Itype) == 0 {
+			typeLimit[v.Itype] = typeLimit[v.Itype] + 1
 			logx.Info("保存人脉", fmt.Sprintf("%+v", v))
 			values = append(values, i.PositionId, i.EntId, i.DeptId, i.UserId, v.Itype, v.Company_name, v.Company_id, v.QyxyId, v.ContactInfo.Name, v.ContactInfo.Phone, 1, nowFormat, nowFormat)
 		} else {

+ 35 - 35
api/internal/service/network.go

@@ -239,12 +239,12 @@ func (n *network) Associate(in *types.AssociateReq) (reply *types.Reply) {
 	}
 	pageSize := 10
 	if in.Type == "adiffb" {
-		probusfors := NetworkCom.GetMyProbusfor(in.EntAccountId)
-		if len(probusfors) > 0 {
+		businessType := strings.Split(FindBusiness(in.EntId, in.MgoUserId), ",")
+		if len(businessType) > 0 {
 			args := []interface{}{in.EntName}
-			wh, newArgs := NetworkCom.WhArgs(probusfors)
+			wh, newArgs := NetworkCom.WhArgs(businessType)
 			args = append(args, newArgs...)
-			q := `select DISTINCT winner_id,winner from information.transaction_info where buyer_id in (select buyer_id from information.transaction_info where has(winner, ?) and buyer_id<>'') and hasAny(property_form,[` + wh + `])=0 ORDER BY project_id`
+			q := `select DISTINCT winner_id,winner from information.transaction_info where buyer_id in (select buyer_id from information.transaction_info where has(winner, ?) and buyer_id<>'') and hasAny(topscopeclass,[` + wh + `])=0 ORDER BY project_id`
 			rows, err := ClickhouseConn.Query(context.Background(), q, args...)
 			if err != nil {
 				logx.Error(err)
@@ -322,7 +322,7 @@ func (n *network) Associate(in *types.AssociateReq) (reply *types.Reply) {
 //人脉库-全部人脉项目
 func (n *network) AllProject(in *types.AllprojectReq) (reply *types.Reply) {
 	reply = &types.Reply{}
-	probusfors := NetworkCom.GetMyProbusfor(in.EntAccountId)
+	businessType := strings.Split(FindBusiness(in.EntId, in.MgoUserId), ",")
 	var count int64
 	var list []*networkTree
 	firstpartyChild := map[string][]*firstpartyNetwork{}
@@ -330,7 +330,7 @@ func (n *network) AllProject(in *types.AllprojectReq) (reply *types.Reply) {
 		if in.Type == "firstparty" {
 			fpn := n.FirstpartyNetwork(in.Name, []string{in.Id})
 			if fpn[in.Id] != nil {
-				firstparty := n.Introduce_Firstparty(fpn, map[string]bool{}, probusfors)
+				firstparty := n.Introduce_Firstparty(fpn, map[string]bool{}, businessType)
 				nameIndex := map[string]int{}
 				for _, v := range fpn[in.Id] {
 					if _, ok := nameIndex[v.Name]; !ok {
@@ -360,7 +360,7 @@ func (n *network) AllProject(in *types.AllprojectReq) (reply *types.Reply) {
 			sqlAppend1 += ` and a.company_name like ?`
 			args = append(args, "%"+in.Name+"%")
 		}
-		aio := n.AllIntroduceOwner(sqlAppend1, "", args, true, probusfors, map[string]bool{})
+		aio := n.AllIntroduceOwner(sqlAppend1, "", args, true, businessType, map[string]bool{})
 		firstpartyChild = aio.FirstpartyNetwork
 		list = []*networkTree{
 			&networkTree{
@@ -636,16 +636,16 @@ func (n *network) List(in *types.NetWorkListReq) *types.Reply {
 	//
 	list := []*map[string]interface{}{}
 	isTjProject := true
-	probusfors := []string{}
+	businessType := []string{}
 	if in.Project_matchme == 1 {
-		probusfors = NetworkCom.GetMyProbusfor(in.EntAccountId)
-		if len(probusfors) == 0 {
+		businessType = strings.Split(FindBusiness(in.EntId, in.MgoUserId), ",")
+		if len(businessType) == 0 {
 			isTjProject = false
 		}
 	}
 	if isTjProject {
 		entMonitor := NetworkCom.EntMonitor(in.UserId)
-		aio := n.AllIntroduceOwner(sqlAppend1, sqlAppend2, args, isTjProject, probusfors, entMonitor)
+		aio := n.AllIntroduceOwner(sqlAppend1, sqlAppend2, args, isTjProject, businessType, entMonitor)
 		for _, v := range aio.Networks {
 			itype := ""
 			buyer_count, project_count, expect_amount, monitor_count := int64(0), int64(0), float64(0), int64(0)
@@ -888,7 +888,7 @@ func (n *network) FirstpartyNetwork(name string, values []string) map[string][]*
 }
 
 //
-func (n *network) Introduce_Firstparty(fpn map[string][]*firstpartyNetwork, entMonitor map[string]bool, probusfors []string) map[string]*projectInfo {
+func (n *network) Introduce_Firstparty(fpn map[string][]*firstpartyNetwork, entMonitor map[string]bool, businessType []string) map[string]*projectInfo {
 	values := []string{}
 	vm := map[string]*projectInfo{}
 	for _, v := range fpn {
@@ -903,9 +903,9 @@ func (n *network) Introduce_Firstparty(fpn map[string][]*firstpartyNetwork, entM
 	}
 	wh, args := NetworkCom.WhArgs(values)
 	q := `select buyer_id,count(project_id) AS project_count,sum(project_money) AS project_amount,groupUniqArray(project_id) from information.transaction_info where buyer_id in (` + wh + `)`
-	if len(probusfors) > 0 {
-		newWh, newArgs := NetworkCom.WhArgs(probusfors)
-		q += ` and hasAny(property_form,[` + newWh + `])`
+	if len(businessType) > 0 {
+		newWh, newArgs := NetworkCom.WhArgs(businessType)
+		q += ` and hasAny(topscopeclass,[` + newWh + `])`
 		args = append(args, newArgs...)
 	}
 	q += ` and project_bidstatus>1 group by buyer_id`
@@ -958,7 +958,7 @@ func (n *network) Introduce_Firstparty(fpn map[string][]*firstpartyNetwork, entM
 }
 
 //
-func (n *network) Introduce_Supplier(values []string, entMonitor map[string]bool, probusfors []string) map[string]*projectInfo {
+func (n *network) Introduce_Supplier(values []string, entMonitor map[string]bool, businessType []string) map[string]*projectInfo {
 	if len(values) == 0 {
 		return map[string]*projectInfo{}
 	}
@@ -1008,11 +1008,11 @@ func (n *network) Introduce_Supplier(values []string, entMonitor map[string]bool
 			logx.Error(err)
 		}
 	}
-	return n.MakeProjectInfo(buyers, vbs, probusfors, entMonitor)
+	return n.MakeProjectInfo(buyers, vbs, businessType, entMonitor)
 }
 
 //
-func (n *network) Introduce_Agency(values []string, entMonitor map[string]bool, probusfors []string) map[string]*projectInfo {
+func (n *network) Introduce_Agency(values []string, entMonitor map[string]bool, businessType []string) map[string]*projectInfo {
 	if len(values) == 0 {
 		return map[string]*projectInfo{}
 	}
@@ -1052,20 +1052,20 @@ func (n *network) Introduce_Agency(values []string, entMonitor map[string]bool,
 	if err := rows.Err(); err != nil {
 		logx.Error(err)
 	}
-	return n.MakeProjectInfo(buyers, vbs, probusfors, entMonitor)
+	return n.MakeProjectInfo(buyers, vbs, businessType, entMonitor)
 }
 
 //
-func (n *network) Introduce_Middleman(values []string, entMonitor map[string]bool, probusfors []string) map[string]*projectInfo {
+func (n *network) Introduce_Middleman(values []string, entMonitor map[string]bool, businessType []string) map[string]*projectInfo {
 	result := map[string]*projectInfo{}
 	if len(values) == 0 {
 		return result
 	}
 	wh, args := NetworkCom.WhArgs(values)
 	q := `select DISTINCT project_id,project_money from information.transaction_info where project_id in (` + wh + `) and project_bidstatus>1`
-	if len(probusfors) > 0 {
-		newWh, newArgs := NetworkCom.WhArgs(probusfors)
-		q += ` and hasAny(property_form,[` + newWh + `])`
+	if len(businessType) > 0 {
+		newWh, newArgs := NetworkCom.WhArgs(businessType)
+		q += ` and hasAny(topscopeclass,[` + newWh + `])`
 		args = append(args, newArgs...)
 	}
 	rows, err := ClickhouseConn.Query(context.Background(), q, args...)
@@ -1162,16 +1162,16 @@ func (n *network) GetQyxyId(ids []string) map[string]string {
 }
 
 //
-func (n *network) BuyerProjectInfo(ids []string, probusfors []string) map[string]*projectInfo {
+func (n *network) BuyerProjectInfo(ids []string, businessType []string) map[string]*projectInfo {
 	vm := map[string]*projectInfo{}
 	if len(ids) == 0 {
 		return vm
 	}
 	wh, args := NetworkCom.WhArgs(ids)
 	q := `select buyer_id,count(DISTINCT project_id) AS project_count,sum(project_money) AS project_amount,groupUniqArray(project_id) from information.transaction_info where buyer_id in (` + wh + `) and project_bidstatus>1`
-	if len(probusfors) > 0 {
-		newWh, newArgs := NetworkCom.WhArgs(probusfors)
-		q += ` and hasAny(property_form,[` + newWh + `])`
+	if len(businessType) > 0 {
+		newWh, newArgs := NetworkCom.WhArgs(businessType)
+		q += ` and hasAny(topscopeclass,[` + newWh + `])`
 		args = append(args, newArgs...)
 	}
 	q += ` group by buyer_id`
@@ -1206,8 +1206,8 @@ func (n *network) BuyerProjectInfo(ids []string, probusfors []string) map[string
 }
 
 //
-func (n *network) MakeProjectInfo(buyers []string, vbs map[string][]*idName, probusfors []string, entMonitor map[string]bool) map[string]*projectInfo {
-	pis := n.BuyerProjectInfo(buyers, probusfors)
+func (n *network) MakeProjectInfo(buyers []string, vbs map[string][]*idName, businessType []string, entMonitor map[string]bool) map[string]*projectInfo {
+	pis := n.BuyerProjectInfo(buyers, businessType)
 	vm := map[string]*projectInfo{}
 	for k, v := range vbs {
 		pi := &projectInfo{
@@ -1236,7 +1236,7 @@ func (n *network) MakeProjectInfo(buyers []string, vbs map[string][]*idName, pro
 }
 
 //
-func (n *network) AllIntroduceOwner(sqlAppend1, sqlAppend2 string, args []interface{}, isTjProject bool, probusfors []string, entMonitor map[string]bool) *introduceOwnerProject {
+func (n *network) AllIntroduceOwner(sqlAppend1, sqlAppend2 string, args []interface{}, isTjProject bool, businessType []string, entMonitor map[string]bool) *introduceOwnerProject {
 	q := `select a.id,a.company_id,a.company_name,a.qyxy_id,a.itype,a.contact_person as person,a.contact_phone as phone,count(DISTINCT if(b.itype=1,b.relate_id,null)) as buyer_count,count(DISTINCT if(b.itype=2,b.relate_id,null)) as project_count,GROUP_CONCAT(IF(b.itype=1,b.relate_id,NULL)) AS relate_buyer_id,GROUP_CONCAT(IF(b.itype=1,b.relate_name,NULL)) AS relate_buyer_name,GROUP_CONCAT(IF(b.itype=2,b.relate_id,NULL)) AS relate_project_id,a.create_time from crm.connection a 
 		left join crm.connection_introduce b on (a.position_id=? and b.position_id=? and a.id=b.connection_id) where a.position_id=?` + sqlAppend1 + ` GROUP BY a.id order by a.create_time desc` + sqlAppend2
 	listTemp := CrmMysql.SelectBySql(q, args...)
@@ -1285,11 +1285,11 @@ func (n *network) AllIntroduceOwner(sqlAppend1, sqlAppend2 string, args []interf
 	}
 	if isTjProject {
 		iop.FirstpartyNetwork = n.FirstpartyNetwork("", firstparty_array)
-		iop.Firstparty = n.Introduce_Firstparty(iop.FirstpartyNetwork, entMonitor, probusfors)
-		iop.Supplier = n.Introduce_Supplier(supplier_array, entMonitor, probusfors)
-		iop.Adiffb = n.Introduce_Supplier(adiffb_array, entMonitor, probusfors)
-		iop.Agency = n.Introduce_Agency(agency_array, entMonitor, probusfors)
-		iop.Middleman = n.Introduce_Middleman(middleman_project_array, entMonitor, probusfors)
+		iop.Firstparty = n.Introduce_Firstparty(iop.FirstpartyNetwork, entMonitor, businessType)
+		iop.Supplier = n.Introduce_Supplier(supplier_array, entMonitor, businessType)
+		iop.Adiffb = n.Introduce_Supplier(adiffb_array, entMonitor, businessType)
+		iop.Agency = n.Introduce_Agency(agency_array, entMonitor, businessType)
+		iop.Middleman = n.Introduce_Middleman(middleman_project_array, entMonitor, businessType)
 	}
 	return iop
 }

+ 82 - 22
api/internal/service/prListService.go

@@ -16,13 +16,14 @@ var (
 	esQ1      = `{"query": {"bool": {"must": [{"terms": {"buyer": ["%s"]}},{"terms": {"toptype": ["采购意向","预告","招标"]}}], "should": [%s], "minimum_should_match": 1}}, "_source": ["%s"], "sort": {"comeintime": {"order": "desc"}}, "from": %d, "size": %d}`
 	esQ2      = `{"query": {"bool": {"must": [{"terms": {"buyer": ["%s"]}},{"terms": {"toptype": ["采购意向","预告","招标"]}}]}}, "_source": ["%s"], "sort": {"comeintime": {"order": "desc"}}, "from": %d, "size": %d}`
 	shouldMul = `{"multi_match": {"query": "%s","type": "phrase", "fields": ["s_topscopeclass"]}}`
-	fields    = []string{"_id", "title", "publishtime", "dataweight", "detail", "site", "spidercode", "toptype", "subtype", "type", "area", "city", "s_topscopeclass", "s_subscopeclass", "bidamount", "budget", "buyerclass", "buyer", "winner", "bidopentime", "buyertel", "buyerperson", "agency", "agencytel", "agencyperson", "s_winner", "winnertel", "winnerperson", "signendtime", "bidendtime", "projectinfo", "entidlist"}
+	fields    = []string{"_id", "title", "publishtime", "dataweight", "detail", "site", "spidercode", "toptype", "subtype", "type", "area", "city", "district", "s_topscopeclass", "s_subscopeclass", "bidamount", "budget", "buyerclass", "buyer", "winner", "bidopentime", "buyertel", "buyerperson", "agency", "agencytel", "agencyperson", "s_winner", "winnertel", "winnerperson", "signendtime", "bidendtime", "projectinfo", "entidlist"}
 )
 
-func GetMonitorList(req *types.PrMonitorListReq) (resultList *[]map[string]interface{}, total int64) {
+func GetMonitorList(req *types.PrMonitorListReq) (resultList []map[string]interface{}, total int64, hasMonitor bool) {
 
-	bList, b := T.Mgo.Find("follow_customer", map[string]string{"userId": req.MgoUserId}, `{_id: 1}`, nil, false, -1, -1)
+	bList, b := T.Mgo.Find("follow_customer", map[string]interface{}{"userId": req.MgoUserId}, `{_id: 1}`, nil, false, -1, -1)
 	if b && len(*bList) > 0 {
+		hasMonitor = true
 		var bName []string
 		for _, v := range *bList {
 			if name := common.ObjToString(v["name"]); name != "" {
@@ -37,34 +38,36 @@ func GetMonitorList(req *types.PrMonitorListReq) (resultList *[]map[string]inter
 			for _, v := range strings.Split(scopeClass, ",") {
 				should = append(should, fmt.Sprintf(shouldMul, v))
 			}
-			esQuery1 = fmt.Sprintf(esQ1, strings.ReplaceAll(strings.Join(bName, ","), ",", `","`), should, strings.ReplaceAll(strings.Join(fields, ","), ",", `","`), pageStart, req.PageSize)
-		} else {
-			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"]))
+			esQuery1 = fmt.Sprintf(esQ1, strings.ReplaceAll(strings.Join(bName, ","), ",", `","`), strings.Join(should, ","), strings.ReplaceAll(strings.Join(fields, ","), ",", `","`), pageStart, req.PageSize)
+			logx.Info("esQuery1---", esQuery1)
+			total, result := elastic.GetWithCount("bidding", "bidding", "", esQuery1)
+			if total == 0 {
+				return nil, 0, hasMonitor
+			}
+			for _, m := range *result {
+				resultList = append(resultList, GetInfoData(m))
+			}
+			return resultList, total, hasMonitor
 		}
-		return
+		return nil, 0, hasMonitor
 	} else {
-		return nil, 0
+		return nil, 0, false
 	}
 }
 
-func GetCollectList(req *types.PrCollectListReq) (resultList []map[string]interface{}, total int64) {
+func GetCollectList(req *types.PrCollectListReq) (resultList []map[string]interface{}, total int64, has bool) {
 	scopeClass := FindBusiness(req.EntId, req.MgoUserId)
 	info := T.JianyuMysql.Find("bdcollection", map[string]interface{}{"userid": req.UserId}, "", "id desc", -1, -1)
 	var ids []interface{}
 	if info == nil || len(*info) == 0 {
-		return make([]map[string]interface{}, 0), 0
+		return make([]map[string]interface{}, 0), 0, false
 	}
+	has = true
 	for _, m := range *info {
 		if bid := common.ObjToString(m["bid"]); bid != "" {
 			ids = append(ids, mongodb.StringTOBsonId(bid))
 		}
 	}
-	logx.Info("scopeClass---", scopeClass)
-	logx.Info("ids---", ids)
 	if len(ids) > 200 {
 		ids = ids[:200]
 	}
@@ -72,14 +75,14 @@ func GetCollectList(req *types.PrCollectListReq) (resultList []map[string]interf
 	for _, f := range fields {
 		fs[f] = 1
 	}
-	binfo, b := T.MgoBidding.Find("bidding", map[string]interface{}{"$in": ids}, `{_id: 1}`, fs, false, -1, -1)
+	binfo, b := T.MgoBidding.Find("bidding", map[string]interface{}{"_id": map[string]interface{}{"$in": ids}}, `{_id: 1}`, fs, false, -1, -1)
 	if b && len(*binfo) > 0 {
 		for _, m := range *binfo {
 			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)
+					if top := common.ObjToString(m["s_topscopeclass"]); strings.Contains(top, s) {
+						m["_id"] = mongodb.BsonIdToSId(m["_id"])
+						resultList = append(resultList, GetInfoData(m))
 						break
 					}
 				}
@@ -92,10 +95,67 @@ func GetCollectList(req *types.PrCollectListReq) (resultList []map[string]interf
 
 	// 处理边界情况
 	if start >= len(resultList) {
-		return make([]map[string]interface{}, 0), total
+		return make([]map[string]interface{}, 0), total, has
 	}
 	if end > len(resultList) {
 		end = len(resultList)
 	}
-	return resultList[start:end], total
+	return resultList[start:end], total, has
+}
+
+func GetInfoData(m map[string]interface{}) (result map[string]interface{}) {
+	result = make(map[string]interface{})
+	result["_id"] = encrypt.CommonEncodeArticle("content", common.ObjToString(m["_id"]))
+	result["title"] = m["title"]
+	result["toptype"] = m["toptype"]
+	result["subtype"] = m["subtype"]
+	result["publishtime"] = m["publishtime"]
+	if len(common.ObjToString(m["detail"])) > 200 {
+		result["detail"] = strings.ReplaceAll(common.ObjToString(m["detail"])[:200], " ", "")
+	} else {
+		result["detail"] = strings.ReplaceAll(common.ObjToString(m["detail"]), " ", "")
+	}
+	result["site"] = m["site"]
+	result["spidercode"] = m["spidercode"]
+	result["area"] = m["area"]
+	if m["city"] != nil {
+		result["city"] = m["city"]
+	}
+	if m["district"] != nil {
+		result["district"] = m["district"]
+	}
+	result["s_subscopeclass"] = m["s_subscopeclass"]
+	if m["budget"] != nil {
+		result["budget"] = m["budget"]
+	}
+	if m["buyerclass"] != nil {
+		result["buyerClass"] = m["buyerclass"]
+	}
+	if m["buyer"] != nil {
+		result["buyer"] = m["buyer"]
+		if m["buyertel"] != nil {
+			result["buyerTel"] = m["buyertel"]
+		}
+		if m["buyerperson"] != nil {
+			result["buyerPerson"] = m["buyerperson"]
+		}
+	}
+	if m["agency"] != nil {
+		result["agency"] = m["agency"]
+		if m["agencytel"] != nil {
+			result["agencyTel"] = m["agencytel"]
+		}
+		if m["agencyperson"] != nil {
+			result["agencyPerson"] = m["agencyperson"]
+		}
+	}
+	if m["bidopentime"] != nil {
+		result["bidOpenTime"] = m["bidopentime"]
+	}
+	if m["bidendtime"] != nil {
+		result["bidEndTime"] = m["bidendtime"]
+	}
+
+	return
+
 }

+ 6 - 0
api/internal/types/types.go

@@ -86,6 +86,8 @@ type AddOrUpdateReq struct {
 }
 
 type AssociateReq struct {
+	EntId        int64  `header:"entId"`
+	MgoUserId    string `header:"mgoUserId"`
 	EntAccountId int64  `header:"entAccountId"`
 	EntName      string `header:"entName"`
 	Name         string `json:"name"`
@@ -93,6 +95,8 @@ type AssociateReq struct {
 }
 
 type AllprojectReq struct {
+	EntId        int64  `header:"entId"`
+	MgoUserId    string `header:"mgoUserId"`
 	EntAccountId int64  `header:"entAccountId"`
 	PositionId   int64  `header:"positionId"`
 	Name         string `json:"name,optional"`
@@ -104,6 +108,8 @@ type NetWorkListReq struct {
 	UserId             string `header:"userId"`
 	EntAccountId       int64  `header:"entAccountId"`
 	PositionId         int64  `header:"positionId"`
+	EntId              int64  `header:"entId"`
+	MgoUserId          string `header:"mgoUserId"`
 	Type               string `json:"type,optional"`
 	Name               string `json:"name,optional"`
 	Monitor            int64  `json:"monitor,optional"`

+ 0 - 6
api/logs/access.log

@@ -1,6 +0,0 @@
-{"@timestamp":"2024-10-11T14:49:09.916+08:00","caller":"common/initconfig.go:53","content":"info--日志记录","level":"info"}
-{"@timestamp":"2024-10-11T14:49:09.916+08:00","caller":"common/initconfig.go:53","content":"error--日志记录","level":"info"}
-{"@timestamp":"2024-10-11T14:50:47.501+08:00","caller":"common/initconfig.go:53","content":"info--日志记录","level":"info"}
-{"@timestamp":"2024-10-11T14:50:47.501+08:00","caller":"common/initconfig.go:53","content":"error--日志记录","level":"info"}
-{"@timestamp":"2024-10-11T14:50:47.622+08:00","caller":"common/initconfig.go:83","content":"--初始化 mongodb--","level":"info"}
-{"@timestamp":"2024-10-11T14:50:47.624+08:00","caller":"common/initconfig.go:92","content":"--初始化 mongodb Bidding --","level":"info"}

+ 0 - 0
api/logs/error.log


+ 0 - 0
api/logs/severe.log


+ 0 - 0
api/logs/slow.log


+ 0 - 0
api/logs/stat.log


+ 6 - 0
api/networkmanage.api

@@ -80,12 +80,16 @@ type (
 		Type                    string `json:"type"`
 	}
 	AssociateReq {
+		EntId        int64  `header:"entId"`
+		MgoUserId    string `header:"mgoUserId"`
 		EntAccountId int64  `header:"entAccountId"`
 		EntName      string `header:"entName"`
 		Name         string `json:"name"`
 		Type         string `json:"type"`
 	}
 	AllprojectReq {
+		EntId        int64  `header:"entId"`
+		MgoUserId    string `header:"mgoUserId"`
 		EntAccountId int64  `header:"entAccountId"`
 		PositionId   int64  `header:"positionId"`
 		Name         string `json:"name,optional"`
@@ -96,6 +100,8 @@ type (
 		UserId             string `header:"userId"`
 		EntAccountId       int64  `header:"entAccountId"`
 		PositionId         int64  `header:"positionId"`
+		EntId              int64  `header:"entId"`
+		MgoUserId          string `header:"mgoUserId"`
 		Type               string `json:"type,optional"`
 		Name               string `json:"name,optional"`
 		Monitor            int64  `json:"monitor,optional"`

+ 1 - 51
go.mod

@@ -3,15 +3,10 @@ module bp.jydev.jianyu360.cn/CRM/networkManage
 go 1.19
 
 require (
-	app.yhyue.com/moapp/jybase v0.0.0-20240424025716-c77615e9004e
+	app.yhyue.com/moapp/jybase v0.0.0-20241016090300-f39a281ac0ff
 	app.yhyue.com/moapp/jypkg v0.0.0-20230825092743-3bfc415bb5bb
-	bp.jydev.jianyu360.cn/BaseService/fileCenter v0.0.0-20231016051530-64b559fee531
 	bp.jydev.jianyu360.cn/BaseService/gateway v1.3.4
-	bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.14-0.20230821092053-934ffe439a9d
-	bp.jydev.jianyu360.cn/CRM/baseCenter v0.0.0-20230904054652-d86e21ec57f3
-	bp.jydev.jianyu360.cn/SocialPlatform/socialPlatform v0.0.0-20230529115950-b726dfbf171f
 	github.com/ClickHouse/clickhouse-go/v2 v2.2.0
-	github.com/RoaringBitmap/roaring v1.5.0
 	github.com/gogf/gf/v2 v2.0.6
 	github.com/golang/protobuf v1.5.3
 	github.com/shopspring/decimal v1.3.1
@@ -21,61 +16,33 @@ require (
 
 require (
 	app.yhyue.com/moapp/esv1 v0.0.0-20220414031211-3da4123e648d // indirect
-	app.yhyue.com/moapp/jyMarketing v0.0.2-0.20230304035551-21bb1eedf547 // indirect
-	bp.jydev.jianyu360.cn/BaseService/entManageApplication v0.0.0-20230214091519-89a98c01ab0e // indirect
-	bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230225125145-431a4f70093a // indirect
-	bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.7 // indirect
-	github.com/BurntSushi/toml v0.4.1 // indirect
 	github.com/beorn7/perks v1.0.1 // indirect
-	github.com/bits-and-blooms/bitset v1.2.0 // indirect
 	github.com/cenkalti/backoff/v4 v4.2.1 // indirect
 	github.com/cespare/xxhash/v2 v2.2.0 // indirect
-	github.com/clbanning/mxj/v2 v2.5.5 // indirect
 	github.com/coreos/go-semver v0.3.1 // indirect
 	github.com/coreos/go-systemd/v22 v22.5.0 // indirect
-	github.com/davecgh/go-spew v1.1.1 // indirect
-	github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
-	github.com/emicklei/go-restful/v3 v3.9.0 // indirect
 	github.com/fatih/color v1.15.0 // indirect
 	github.com/fsnotify/fsnotify v1.6.0 // indirect
 	github.com/garyburd/redigo v1.6.2 // indirect
 	github.com/go-logr/logr v1.2.4 // indirect
 	github.com/go-logr/stdr v1.2.2 // indirect
-	github.com/go-openapi/jsonpointer v0.19.6 // indirect
-	github.com/go-openapi/jsonreference v0.20.1 // indirect
-	github.com/go-openapi/swag v0.22.3 // indirect
-	github.com/go-redis/redis/v8 v8.11.5 // indirect
 	github.com/go-sql-driver/mysql v1.7.1 // indirect
 	github.com/gogo/protobuf v1.3.2 // indirect
 	github.com/golang-jwt/jwt/v4 v4.5.0 // indirect
-	github.com/golang/mock v1.6.0 // indirect
 	github.com/golang/snappy v0.0.4 // indirect
 	github.com/gomodule/redigo v2.0.0+incompatible // indirect
-	github.com/google/gnostic v0.5.7-v3refs // indirect
-	github.com/google/go-cmp v0.5.9 // indirect
-	github.com/google/gofuzz v1.2.0 // indirect
 	github.com/google/uuid v1.3.0 // indirect
-	github.com/gorilla/websocket v1.5.0 // indirect
-	github.com/grokify/html-strip-tags-go v0.0.1 // indirect
 	github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.0 // indirect
 	github.com/jinzhu/inflection v1.0.0 // indirect
 	github.com/jinzhu/now v1.1.1 // indirect
 	github.com/josharian/intern v1.0.0 // indirect
-	github.com/json-iterator/go v1.1.12 // indirect
 	github.com/klauspost/compress v1.15.15 // indirect
-	github.com/longbridgeapp/sqlparser v0.3.1 // indirect
 	github.com/mailru/easyjson v0.7.7 // indirect
 	github.com/mattn/go-colorable v0.1.13 // indirect
 	github.com/mattn/go-isatty v0.0.17 // indirect
-	github.com/mattn/go-runewidth v0.0.13 // indirect
 	github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
-	github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
-	github.com/modern-go/reflect2 v1.0.2 // indirect
 	github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe // indirect
-	github.com/mschoch/smat v0.2.0 // indirect
-	github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
 	github.com/nsqio/go-nsq v1.1.0 // indirect
-	github.com/olekukonko/tablewriter v0.0.5 // indirect
 	github.com/olivere/elastic v6.2.37+incompatible // indirect
 	github.com/olivere/elastic/v7 v7.0.22 // indirect
 	github.com/openzipkin/zipkin-go v0.4.1 // indirect
@@ -87,7 +54,6 @@ require (
 	github.com/prometheus/client_model v0.3.0 // indirect
 	github.com/prometheus/common v0.42.0 // indirect
 	github.com/prometheus/procfs v0.10.1 // indirect
-	github.com/rivo/uniseg v0.2.0 // indirect
 	github.com/spaolacci/murmur3 v1.1.0 // indirect
 	github.com/xdg-go/pbkdf2 v1.0.0 // indirect
 	github.com/xdg-go/scram v1.1.2 // indirect
@@ -114,31 +80,15 @@ require (
 	go.uber.org/zap v1.24.0 // indirect
 	golang.org/x/crypto v0.12.0 // indirect
 	golang.org/x/net v0.14.0 // indirect
-	golang.org/x/oauth2 v0.7.0 // indirect
 	golang.org/x/sync v0.2.0 // indirect
 	golang.org/x/sys v0.11.0 // indirect
-	golang.org/x/term v0.11.0 // indirect
 	golang.org/x/text v0.12.0 // indirect
-	golang.org/x/time v0.3.0 // indirect
-	google.golang.org/appengine v1.6.7 // indirect
 	google.golang.org/genproto v0.0.0-20230526161137-0005af68ea54 // indirect
 	google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9 // indirect
 	google.golang.org/genproto/googleapis/rpc v0.0.0-20230525234030-28d5490b6b19 // indirect
 	google.golang.org/protobuf v1.31.0 // indirect
 	gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
-	gopkg.in/inf.v0 v0.9.1 // indirect
 	gopkg.in/yaml.v2 v2.4.0 // indirect
-	gopkg.in/yaml.v3 v3.0.1 // indirect
 	gorm.io/driver/mysql v1.0.5 // indirect
 	gorm.io/gorm v1.21.3 // indirect
-	jygit.jydev.jianyu360.cn/ApplicationCenter/publicService v0.0.0-20230710093759-d9d6c68de8b1 // indirect
-	k8s.io/api v0.26.3 // indirect
-	k8s.io/apimachinery v0.27.0-alpha.3 // indirect
-	k8s.io/client-go v0.26.3 // indirect
-	k8s.io/klog/v2 v2.90.1 // indirect
-	k8s.io/kube-openapi v0.0.0-20230307230338-69ee2d25a840 // indirect
-	k8s.io/utils v0.0.0-20230209194617-a36077c30491 // indirect
-	sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
-	sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
-	sigs.k8s.io/yaml v1.3.0 // indirect
 )

Plik diff jest za duży
+ 6 - 611
go.sum


Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików