From d1bf56da70e6f97d616c4a417f59a42093cc24cb Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Thu, 26 Sep 2024 08:35:06 -0400 Subject: [PATCH] /*ONLY IF OFFER IS GREATER THAN 2 */ --- wrenchboard/src/shared_tool/reco_egine.cc | 28 ++++++++++++++++------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/wrenchboard/src/shared_tool/reco_egine.cc b/wrenchboard/src/shared_tool/reco_egine.cc index 7fe5899a..b02129c1 100644 --- a/wrenchboard/src/shared_tool/reco_egine.cc +++ b/wrenchboard/src/shared_tool/reco_egine.cc @@ -42,6 +42,9 @@ long RecoPendingInterestCount( int itm_count, CVars in, CVars &out ); long RecoStartMarketCard( int itm_count, CVars in, CVars &out ); long RecoStartMarketCardUS( int itm_count, CVars in, CVars &out ); +long RecoLearnMore( int itm_count, CVars in, CVars &out ); +long RecoJobOwner( int itm_count, CVars in, CVars &out ); + long recommendation_engine(long action , CVars in, CVars &out) { try{ @@ -90,7 +93,7 @@ long WrenchHomeBanners(CVars in, CVars &out) { char vname[30]; long member_id = REQ_LONG(in, "member_id", 1, -1); int itm_count= 0; - if( RecoCheckOffers( itm_count, in, out ) != PHP_API_BAD_PARAM ) { itm_count++; } + if( RecoCheckOffers( itm_count, in, out ) != PHP_API_BAD_PARAM ) { itm_count++; } /*ONLY IF OFFER IS GREATER THAN 2 */ if( RecoCheckActiveTask( itm_count, in, out ) != PHP_API_BAD_PARAM ) { itm_count++; } if( RecoStartMarketCardUS( itm_count, in, out ) != PHP_API_BAD_PARAM ) { itm_count++; } if( RecoStartMarketCard( itm_count, in, out ) != PHP_API_BAD_PARAM ) { itm_count++; } @@ -157,8 +160,17 @@ JOBOWNER_HOME_DASH return ret; } +long RecoLearnMore( int itm_count, CVars in, CVars &out ){ + +return 0; +} +long RecoJobOwner( int itm_count, CVars in, CVars &out ){ + +return 0; +} + long RecoStartMarketCardUS( int itm_count, CVars in, CVars &out ){ - logfmt(logINFO, "RecoCheckOffers()"); + logfmt(logINFO, "RecoStartMarketCardUS()"); long ret = PHP_API_BAD_PARAM; const PGresult *res; char vname[30]; @@ -218,7 +230,7 @@ long RecoStartMarketCardUS( int itm_count, CVars in, CVars &out ){ } catch (bad_parameter) { out["status"] = "ERROR"; } - logfmt(logINFO, "/RecoStartMarketCard()"); + logfmt(logINFO, "/RecoStartMarketCardUS()"); return ret; } @@ -289,7 +301,7 @@ long RecoOffersInterest(int itm_count, CVars in, CVars &out ){ } long RecoStartMarketCard( int itm_count, CVars in, CVars &out ){ - logfmt(logINFO, "RecoCheckOffers()"); + logfmt(logINFO, "RecoStartMarketCard()"); long ret = PHP_API_BAD_PARAM; const PGresult *res; char vname[30]; @@ -358,7 +370,7 @@ long RecoStartMarketCard( int itm_count, CVars in, CVars &out ){ logfmt(logINFO, "/RecoStartMarketCard()"); return ret; } - +/*ONLY IF OFFER IS GREATER THAN 2 */ long RecoCheckOffers(int itm_count, CVars in, CVars &out ){ logfmt(logINFO, "RecoCheckOffers()"); long ret = PHP_API_BAD_PARAM; @@ -368,7 +380,7 @@ long RecoCheckOffers(int itm_count, CVars in, CVars &out ){ int ic = itm_count; long member_id = REQ_LONG(in, "member_id", 1, -1); res = pgsql_query("SELECT * FROM members_jobs_offer WHERE expire > now() AND status = 1 AND client_id > 0 AND client_id = %lu ",member_id); - if (res != NULL && pgsql_num_rows(res) > 0) { + if (res != NULL && pgsql_num_rows(res) > 2) { snprintf(vname, sizeof (vname), "title_%05d", ic); out[vname] = "Some offers are waiting for you."; @@ -402,7 +414,7 @@ long RecoCheckOffers(int itm_count, CVars in, CVars &out ){ out[vname] = "Continue"; snprintf(vname, sizeof (vname), "short_button_text_%05d", ic); - out[vname] = "short_button_text"; + out[vname] = "View now"; snprintf(vname, sizeof (vname), "short_title_%05d", ic); out[vname] = "Some offers are waiting for you."; @@ -663,7 +675,7 @@ long RecoCheckFamilyCount( int itm_count, CVars in, CVars &out ){ out[vname] = "Continue"; snprintf(vname, sizeof (vname), "short_button_text_%05d", ic); - out[vname] = "short_button_text"; + out[vname] = "View now"; snprintf(vname, sizeof (vname), "short_title_%05d", ic); out[vname] = "Activate your family account.";