Browse Source

用户查询处理

WH01243 4 days ago
parent
commit
3b822d4061
1 changed files with 13 additions and 2 deletions
  1. 13 2
      clueSync/manualOperation.go

+ 13 - 2
clueSync/manualOperation.go

@@ -372,7 +372,7 @@ func getClueState(c *gin.Context) {
 	}
 	log.Println("getClueState", req)
 	// 2. 处理用户信息
-	uId, _, source, belong_to, _, _ := processUserInfo(req)
+	uId, userId, source, belong_to, _, _ := processUserInfo(req)
 	if source == "0104" || strings.HasPrefix(belong_to, "02") || source == "0102" || source == "0103" || strings.HasPrefix(belong_to, "03") {
 		c.JSON(http.StatusOK, response)
 		return
@@ -380,7 +380,18 @@ func getClueState(c *gin.Context) {
 	// 3. 处理线索信息
 	_, _, kcPositionId, isTransfer, clueData := processClueInfo(uId, "")
 	// 4. 根据是否转移获取不同数据
-	positionId := gconv.Int64((*clueData)["position_id"])
+	positionId := int64(0)
+	if clueData == nil {
+		positionId = gconv.Int64((*clueData)["position_id"])
+	} else {
+		data := TiDb.FindOne("temporary_assignment", map[string]interface{}{
+			"userId": userId,
+			"status": 0,
+		}, "", "")
+		if data != nil {
+			positionId = gconv.Int64((*data)["positionId"])
+		}
+	}
 	if isTransfer == 1 {
 		response.Phone, response.Wxer, response.Name = GetPersonSubsidiary(kcPositionId)
 	} else {