WH01243 9 kuukautta sitten
vanhempi
commit
a313925217
1 muutettua tiedostoa jossa 4 lisäystä ja 16 poistoa
  1. 4 16
      api/internal/service/network.go

+ 4 - 16
api/internal/service/network.go

@@ -143,7 +143,7 @@ func (n *nodeTrees) Swap(i, j int) {
 	(*n)[i], (*n)[j] = (*n)[j], (*n)[i]
 }
 
-//人脉库-添加/修改人脉
+// 人脉库-添加/修改人脉
 func (n *network) AddOrUpdate(in *types.AddOrUpdateReq) *types.Reply {
 	reply := &types.Reply{Data: map[string]interface{}{
 		"status": 0,
@@ -234,7 +234,7 @@ func (n *network) AddOrUpdate(in *types.AddOrUpdateReq) *types.Reply {
 	return reply
 }
 
-//人脉库-业主名称联想
+// 人脉库-业主名称联想
 func (n *network) Associate(in *types.AssociateReq) (reply *types.Reply) {
 	//类型;firstparty:甲方 supplier:供应商 adiffb:同甲异业 middleman:中间人 middleman_owner:中间人-业主 middleman_project:中间人-项目 agency:招标代理机构
 	res := []map[string]string{}
@@ -325,7 +325,7 @@ func (n *network) Associate(in *types.AssociateReq) (reply *types.Reply) {
 	return
 }
 
-//人脉库-全部人脉项目
+// 人脉库-全部人脉项目
 func (n *network) AllProject(in *types.AllprojectReq) (reply *types.Reply) {
 	reply = &types.Reply{}
 	key := fmt.Sprintf(NetworkManageAllProjectKey, in.PositionId)
@@ -578,7 +578,7 @@ func (n *network) AllProject(in *types.AllprojectReq) (reply *types.Reply) {
 	return reply
 }
 
-//人脉库-列表
+// 人脉库-列表
 func (n *network) List(in *types.NetWorkListReq) *types.Reply {
 	if in.Page_size <= 0 {
 		in.Page_size = 10
@@ -874,7 +874,6 @@ func (n *network) List(in *types.NetWorkListReq) *types.Reply {
 	}
 }
 
-//
 func (n *network) FirstpartyNetwork(name string, values []string) map[string][]*firstpartyNetwork {
 	result := map[string][]*firstpartyNetwork{}
 	if len(values) == 0 {
@@ -916,7 +915,6 @@ func (n *network) FirstpartyNetwork(name string, values []string) map[string][]*
 	return result
 }
 
-//
 func (n *network) Introduce_Firstparty(fpn map[string][]*firstpartyNetwork, businessType []string) map[string]*projectInfo {
 	values := []string{}
 	vm := map[string]*projectInfo{}
@@ -983,7 +981,6 @@ func (n *network) Introduce_Firstparty(fpn map[string][]*firstpartyNetwork, busi
 	return result
 }
 
-//
 func (n *network) Introduce_Supplier(values []string, businessType []string) map[string]*projectInfo {
 	if len(values) == 0 {
 		return map[string]*projectInfo{}
@@ -1037,7 +1034,6 @@ func (n *network) Introduce_Supplier(values []string, businessType []string) map
 	return n.MakeProjectInfo(buyers, vbs, businessType)
 }
 
-//
 func (n *network) Introduce_Agency(values []string, businessType []string) map[string]*projectInfo {
 	if len(values) == 0 {
 		return map[string]*projectInfo{}
@@ -1081,7 +1077,6 @@ func (n *network) Introduce_Agency(values []string, businessType []string) map[s
 	return n.MakeProjectInfo(buyers, vbs, businessType)
 }
 
-//
 func (n *network) Introduce_Middleman(values []string, businessType []string) map[string]*projectInfo {
 	result := map[string]*projectInfo{}
 	if len(values) == 0 {
@@ -1120,7 +1115,6 @@ func (n *network) Introduce_Middleman(values []string, businessType []string) ma
 	return result
 }
 
-//
 func (n *network) TypeStrConvert(itype string) int64 {
 	//firstparty:甲方 supplier:供应商 adiffb:同甲异业 middleman:中间人 agency:招标代理机构
 	switch itype {
@@ -1138,7 +1132,6 @@ func (n *network) TypeStrConvert(itype string) int64 {
 	return 0
 }
 
-//
 func (n *network) TypeIntConvert(itype int64) string {
 	//firstparty:甲方 supplier:供应商 adiffb:同甲异业 middleman:中间人 agency:招标代理机构
 	switch itype {
@@ -1156,7 +1149,6 @@ func (n *network) TypeIntConvert(itype int64) string {
 	return ""
 }
 
-//
 func (n *network) GetQyxyId(ids []string) map[string]string {
 	m := map[string]string{}
 	if len(ids) == 0 {
@@ -1187,7 +1179,6 @@ func (n *network) GetQyxyId(ids []string) map[string]string {
 	return m
 }
 
-//
 func (n *network) BuyerProjectInfo(ids []string, businessType []string) map[string]*projectInfo {
 	vm := map[string]*projectInfo{}
 	if len(ids) == 0 {
@@ -1231,7 +1222,6 @@ func (n *network) BuyerProjectInfo(ids []string, businessType []string) map[stri
 	return vm
 }
 
-//
 func (n *network) MakeProjectInfo(buyers []string, vbs map[string][]*idName, businessType []string) map[string]*projectInfo {
 	pis := n.BuyerProjectInfo(buyers, businessType)
 	vm := map[string]*projectInfo{}
@@ -1259,7 +1249,6 @@ func (n *network) MakeProjectInfo(buyers []string, vbs map[string][]*idName, bus
 	return vm
 }
 
-//
 func (n *network) AllIntroduceOwner(sqlAppend1, sqlAppend2 string, args []interface{}, isTjProject bool, businessType []string) *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
@@ -1318,7 +1307,6 @@ func (n *network) AllIntroduceOwner(sqlAppend1, sqlAppend2 string, args []interf
 	return iop
 }
 
-//
 func (n *network) DeleteCache(positionId int64) {
 	redis.Del("newother", fmt.Sprintf(NetworkManageAllProjectKey, positionId))
 	redis.DelByCodePattern("newother", fmt.Sprintf(NetworkManageList, positionId, "*"))