refactor: remove Subject field from Conversation model and related logic, replace with CustomerName

This commit is contained in:
mlogclub
2026-04-27 19:22:40 +08:00
parent 2d2d2d2051
commit 3a9bc4914a
24 changed files with 49 additions and 64 deletions
@@ -36,7 +36,7 @@ func (c *ConversationController) AnyList() *web.JsonResult {
if keyword, _ := params.Get(c.Ctx, "keyword"); strs.IsNotBlank(keyword) {
keywordLike := "%" + strings.TrimSpace(keyword) + "%"
cnd.Where("subject LIKE ? OR last_message_summary LIKE ?", keywordLike, keywordLike)
cnd.Where("last_message_summary LIKE ? OR customer_id IN (SELECT id FROM t_customer WHERE name LIKE ?)", keywordLike, keywordLike)
}
// 标签搜索