|
@@ -603,17 +603,17 @@ func MarketingSave(in *biservice.AcceptanceReq, positionId int64, product, dkPer
|
|
|
}
|
|
|
|
|
|
// 构建备注JSON
|
|
|
- remarkJson := map[string]interface{}{
|
|
|
- "提出时间": time.Now().Format(time.DateTime),
|
|
|
- "销售线索来源": "主动咨询客服留资客户",
|
|
|
- "姓名": common.If(customerName == "", phone, customerName),
|
|
|
- "联系方式": phone,
|
|
|
- "公司名称": company,
|
|
|
- "咨询产品": product,
|
|
|
- "客户需求": demand,
|
|
|
- "备注": remark,
|
|
|
+ remarkFields := []string{
|
|
|
+ fmt.Sprintf("%s :%s", "提出时间", time.Now().Format(time.DateTime)),
|
|
|
+ fmt.Sprintf("%s :%s", "销售线索来源", "主动咨询客服留资客户"),
|
|
|
+ fmt.Sprintf("%s :%s", "姓名", common.If(customerName == "", phone, customerName)),
|
|
|
+ fmt.Sprintf("%s :%s", "联系方式", phone),
|
|
|
+ fmt.Sprintf("%s :%s", "公司名称", company),
|
|
|
+ fmt.Sprintf("%s :%s", "咨询产品", product),
|
|
|
+ fmt.Sprintf("%s :%s", "客户需求", demand),
|
|
|
+ fmt.Sprintf("%s :%s", "备注", remark),
|
|
|
}
|
|
|
-
|
|
|
+ filterStr := strings.Join(remarkFields, "\n")
|
|
|
// 保存销售线索
|
|
|
clueId := CrmService.InsertByTx(tx, "sale_clue", map[string]interface{}{
|
|
|
"position_id": positionId, // 职位ID
|
|
@@ -631,14 +631,7 @@ func MarketingSave(in *biservice.AcceptanceReq, positionId int64, product, dkPer
|
|
|
"channel": channel, // 渠道
|
|
|
"source": "主动咨询客服留资客户", // 来源
|
|
|
})
|
|
|
-
|
|
|
// 保存任务
|
|
|
- filter, _ := json.Marshal(remarkJson)
|
|
|
- filterStr := gconv.String(filter)
|
|
|
- filterStr = strings.ReplaceAll(filterStr, "{", "")
|
|
|
- filterStr = strings.ReplaceAll(filterStr, "}", "")
|
|
|
- filterStr = strings.ReplaceAll(filterStr, ",", "\n")
|
|
|
- filterStr = strings.ReplaceAll(filterStr, `"`, ` `)
|
|
|
taskId := CrmService.InsertByTx(tx, "task", map[string]interface{}{
|
|
|
"ent_id": entId, // 企业ID
|
|
|
"name": common.If(customerName == "", phone, customerName), // 任务名称
|