Selaa lähdekoodia

线索名称修改

WH01243 1 vuosi sitten
vanhempi
commit
9c890a572a
1 muutettua tiedostoa jossa 4 lisäystä ja 1 poistoa
  1. 4 1
      clueSync/job.go

+ 4 - 1
clueSync/job.go

@@ -260,7 +260,6 @@ func FormatData(data map[string]interface{}, item string) (bool, bool) {
 			if uCount == nil || len(*uCount) == 0 {
 				oks = SaveClue0(item, userId, uId, top_cluetype, sub_cluetype, topname, subname, cluename, name, saleName, phone, position, department, departments, industry, follow_project_area, role, seatNumber, position_id, source, sourceCode, remark, keyword, belong_to, isGroup, isCommerce, isFreeze)
 				log.Println(oks)
-				AssFail(noticePositionId, cluename, phone)
 			} else {
 				//留资线索更新
 				if item != "orders" && item != "users" { //新用户和订单之外的替换一下新的留资信息
@@ -280,9 +279,13 @@ func FormatData(data map[string]interface{}, item string) (bool, bool) {
 					if role != "" {
 						clueUpdateData["role"] = role
 					}
+					if cluename != "" {
+						clueUpdateData["cluename"] = cluename //新的线索名不为空才替换
+					}
 					TiDb.Update("dwd_f_crm_clue_info", map[string]interface{}{"uid": uId}, clueUpdateData)
 				}
 			}
+			AssFail(noticePositionId, cluename, phone)
 			return true, true
 		}
 		return true, false