From 175202deb795369f197be19a4ec2a433b7afd8ea Mon Sep 17 00:00:00 2001 From: Jo YoHan Date: Wed, 12 Jun 2024 10:41:34 +0900 Subject: [PATCH] temp: temporarily disable the condition. --- cmd/server/main.go | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/cmd/server/main.go b/cmd/server/main.go index ec5a81a..6991975 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -102,25 +102,26 @@ func publish(conf *Config, db *gorm.DB, subscription entity.Subscription) int { where = append(where, "? <= item_published") param = append(param, subscription.Published) - if len(subscription.PreferredCompanyArr) > 0 { - where = append(where, "feed_id IN ?") - param = append(param, []int64(subscription.PreferredCompanyArr)) - } - - if len(subscription.PreferredCompanySizeArr) > 0 { - where = append(where, "company_size IN ?") - param = append(param, []int64(subscription.PreferredCompanySizeArr)) - } - - if len(subscription.PreferredJobArr) > 0 { - where = append(where, "job_tags_id_arr && ?") // `&&`: overlap (have elements in common) - param = append(param, getArrToString(subscription.PreferredJobArr)) - } - - if len(subscription.PreferredSkillArr) > 0 { - where = append(where, "skill_tags_id_arr && ?") // `&&`: overlap (have elements in common) - param = append(param, getArrToString(subscription.PreferredSkillArr)) - } + // TODO: 카테고라이징이 제대로 준비될 때까지 임시로 조건 비활성화 + // if len(subscription.PreferredCompanyArr) > 0 { + // where = append(where, "feed_id IN ?") + // param = append(param, []int64(subscription.PreferredCompanyArr)) + // } + + // if len(subscription.PreferredCompanySizeArr) > 0 { + // where = append(where, "company_size IN ?") + // param = append(param, []int64(subscription.PreferredCompanySizeArr)) + // } + + // if len(subscription.PreferredJobArr) > 0 { + // where = append(where, "job_tags_id_arr && ?") // `&&`: overlap (have elements in common) + // param = append(param, getArrToString(subscription.PreferredJobArr)) + // } + + // if len(subscription.PreferredSkillArr) > 0 { + // where = append(where, "skill_tags_id_arr && ?") // `&&`: overlap (have elements in common) + // param = append(param, getArrToString(subscription.PreferredSkillArr)) + // } if err := db.Select( "item_title",