瀏覽代碼

Merge branch 'dev_v1.0.4_wh' of CRM/application into hotfix/v1.0.4.3

王浩 1 年之前
父節點
當前提交
d0e0213480
共有 1 個文件被更改,包括 9 次插入2 次删除
  1. 9 2
      api/internal/service/owner.go

+ 9 - 2
api/internal/service/owner.go

@@ -364,6 +364,7 @@ where
 				"count":        gconv.Int64(m["count"]),
 				"personName":   gconv.String(m["personName"]),
 				"list":         m["list"],
+				"zbtime":       m["zbtime"],
 			})
 		}
 		for _, m := range agencyMap {
@@ -377,11 +378,16 @@ where
 				"personName":   gconv.String(m["personName"]),
 				"count":        gconv.Int64(m["count"]),
 				"list":         m["list"],
+				"zbtime":       m["zbtime"],
 			})
 		}
 	}
 	sort.Slice(returnData, func(i, j int) bool {
-		return gconv.Int64(returnData[i]["zbtime"]) > gconv.Int64(returnData[j]["zbtime"])
+		aa := fmt.Sprintf("%s%s", gconv.String(returnData[i]["zbtime"]),
+			gconv.String(returnData[i]["b_id"]))
+		bb := fmt.Sprintf("%s%s", gconv.String(returnData[j]["zbtime"]),
+			gconv.String(returnData[j]["b_id"]))
+		return aa > bb
 	})
 	return returnData
 }
@@ -1086,7 +1092,8 @@ func (t *OwnerService) CandidateChannel() (*ResultDatas, int, int, int, int) {
 	returnData := []*ResultData{}
 	dataMap := &map[string]map[string]interface{}{}
 	if t.PartyA != "" || t.Supplier != "" || t.Heterotophy != "" || t.Intermediary != "" || t.Agency != "" {
-		dataMap = BuyerList(t.PartyA, t.Supplier, t.Heterotophy, t.Intermediary, t.Agency, t.PositionId)
+		dataMap = BuyerList(t.PartyA, t.Supplier, t.Heterotophy, t.Intermediary, t.Agency,
+			t.PositionId)
 	}
 	a1, a2, a3, a4 := 0, 0, 0, 0
 	if len(*dataMap) > 0 && dataMap != nil {