客户基本信息支持快速编辑,新增微信与QQ字段
工作台侧栏可点击编辑手机/邮箱/微信/QQ;客户资料同步展示,自动识别仅在主字段为空时回填。
This commit is contained in:
@@ -137,6 +137,14 @@ func mergeCustomerContacts(tenantID, customerID uint, contacts []extractedContac
|
||||
updates["email"] = c.Value
|
||||
customer.Email = c.Value
|
||||
}
|
||||
if c.Kind == "wechat" && strings.TrimSpace(customer.Wechat) == "" && updates["wechat"] == nil {
|
||||
updates["wechat"] = c.Value
|
||||
customer.Wechat = c.Value
|
||||
}
|
||||
if c.Kind == "qq" && strings.TrimSpace(customer.QQ) == "" && updates["qq"] == nil {
|
||||
updates["qq"] = c.Value
|
||||
customer.QQ = c.Value
|
||||
}
|
||||
}
|
||||
if len(updates) > 0 {
|
||||
model.DB.Model(&model.Customer{}).Where("id = ?", customerID).Updates(updates)
|
||||
|
||||
Reference in New Issue
Block a user