客户基本信息支持快速编辑,新增微信与QQ字段

工作台侧栏可点击编辑手机/邮箱/微信/QQ;客户资料同步展示,自动识别仅在主字段为空时回填。
This commit is contained in:
yml2213
2026-07-19 00:23:21 +08:00
parent 6070cf47dc
commit cbc76f3258
6 changed files with 191 additions and 17 deletions
@@ -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)