refactor: remove ExternalSource and ExternalID from Conversation model and related services, update references to use ChannelID instead

This commit is contained in:
mlogclub
2026-04-27 19:04:10 +08:00
parent 24105781d9
commit b3ef55b04e
21 changed files with 183 additions and 136 deletions
@@ -45,6 +45,13 @@ func (r *customerIdentityRepository) GetBy(db *gorm.DB, externalSource enums.Ext
Eq("external_id", externalID))
}
func (r *customerIdentityRepository) FindByCustomerID(db *gorm.DB, customerID int64) []models.CustomerIdentity {
if customerID <= 0 {
return nil
}
return r.Find(db, sqls.NewCnd().Eq("customer_id", customerID).Eq("status", enums.StatusOk).Desc("id"))
}
func (r *customerIdentityRepository) Find(db *gorm.DB, cnd *sqls.Cnd) (list []models.CustomerIdentity) {
cnd.Find(db, &list)
return