Pārlūkot izejas kodu

Merge branch 'feature/v1.0.4' of https://jygit.jydev.jianyu360.cn/CRM/application into feature/v1.0.4

wangchuanjin 1 gadu atpakaļ
vecāks
revīzija
465b3536f1

+ 1 - 1
api/internal/logic/ignoreactionlogic.go

@@ -41,7 +41,7 @@ func (l *IgnoreActionLogic) IgnoreAction(req *types.IgnoreReq) (resp *types.Repl
 			"is_ignore": req.Action,
 		}
 		if req.Action == "1" {
-			update["is_handle"] = 1
+			update["is_handle"] = 0
 		}
 		b := T.CrmMysql.Update("connection_status", query, update)
 		if !b {

+ 4 - 2
api/internal/service/CoopHistoryService.go

@@ -174,7 +174,7 @@ func GetData(propertyForm []string, bid string) (result1, result2 []map[string]i
 					if len(m1Buckets.Buckets) > 0 {
 						for _, v := range m1Buckets.Buckets {
 							if v.Key != "" {
-								m1[v.Key] = map[string]interface{}{"name": v.Key, "amount": v.Amount_all.Value, "count": v.Doc_count}
+								m1[v.Key] = map[string]interface{}{"name": v.Key, "amount": v.Amount_all.Value, "count": v.Doc_count, "nameId": v.EntId.Buckets[0].Key}
 							}
 						}
 					}
@@ -185,6 +185,7 @@ func GetData(propertyForm []string, bid string) (result1, result2 []map[string]i
 			v1 := v.(map[string]interface{})
 			tmp := make(map[string]interface{})
 			tmp["name"] = k
+			tmp["nameId"] = v1["nameId"]
 			tmp["coop_size"] = v1["count"]
 			tmp["coop_amount"] = v1["amount"]
 			result1 = append(result1, tmp)
@@ -206,7 +207,7 @@ func GetData(propertyForm []string, bid string) (result1, result2 []map[string]i
 				if len(m2Buckets.Buckets) > 0 {
 					for _, v := range m2Buckets.Buckets {
 						if v.Key != "" {
-							m2[v.Key] = map[string]interface{}{"name": v.Key, "amount": v.Amount_all.Value, "count": v.Doc_count}
+							m2[v.Key] = map[string]interface{}{"name": v.Key, "amount": v.Amount_all.Value, "count": v.Doc_count, "nameId": v.EntId.Buckets[0].Key}
 						}
 					}
 				}
@@ -217,6 +218,7 @@ func GetData(propertyForm []string, bid string) (result1, result2 []map[string]i
 		v1 := v.(map[string]interface{})
 		tmp := make(map[string]interface{})
 		tmp["name"] = k
+		tmp["nameId"] = v1["nameId"]
 		tmp["coop_size"] = v1["count"]
 		tmp["coop_amount"] = v1["amount"]
 		result2 = append(result2, tmp)

+ 1 - 0
api/internal/service/plistService.go

@@ -95,6 +95,7 @@ func GetProjectList(req *types.ProjectListReq) (resultList []*ProjectEntry, hasN
 	} else {
 		total = int(T.NetworkCom.Count(countSql))
 	}
+	total = len(resultList)
 	if total > req.PageSize {
 		hasNextPage = true
 	} else {

+ 3 - 2
service/custom.go

@@ -340,15 +340,15 @@ func SaveConnection(tx *sql.Tx, positionId int64, businessId, ownerId string, en
 		if cm.CrmMysql.Count(table, map[string]interface{}{
 			"position_id": positionId,
 			"relate_id":   sourceType,
-			"type":        sourceType,
+			"itype":       sourceType,
 		}) > 0 {
 			cm.CrmMysql.UpdateByTx(tx, table, map[string]interface{}{
 				"position_id": positionId,
 				"relate_id":   businessId,
+				"itype":       sourceType,
 			}, map[string]interface{}{
 				"is_handle":   1,
 				"relate_id":   businessId,
-				"type":        sourceType,
 				"update_time": time.Now().Format(date.Date_Full_Layout),
 				"is create":   1,
 			})
@@ -362,6 +362,7 @@ func SaveConnection(tx *sql.Tx, positionId int64, businessId, ownerId string, en
 				"relate_id":   businessId,
 				"is_handle":   1,
 				"is create":   1,
+				"itype":       sourceType,
 				"create_time": time.Now().Format(date.Date_Full_Layout),
 			})
 			return id > 0