diff --git a/wrenchboard/src/shared_tool/reco_egine.cc b/wrenchboard/src/shared_tool/reco_egine.cc index f8f89213..ccf971f3 100644 --- a/wrenchboard/src/shared_tool/reco_egine.cc +++ b/wrenchboard/src/shared_tool/reco_egine.cc @@ -46,6 +46,7 @@ long RecoLearnMore( int itm_count, CVars in, CVars &out ); long RecoJobOwner( int itm_count, CVars in, CVars &out ); long RecoFamilyWaiting( int itm_count, CVars in, CVars &out ); long RecoRecentPastDueTask( int itm_count, CVars in, CVars &out ); +long RecoPlayGround( int itm_count, CVars in, CVars &out ); long recommendation_engine(long action , CVars in, CVars &out) { try{ @@ -122,6 +123,7 @@ long WrenchHomeBanners(CVars in, CVars &out) { if(itm_count < 3){ if( RecoLearnMore( itm_count, in, out ) != PHP_API_BAD_PARAM ) { itm_count++; } + if( RecoPlayGround( itm_count, in, out ) != PHP_API_BAD_PARAM ) { itm_count++; } if( RecoReferAFreind( itm_count, in, out ) != PHP_API_BAD_PARAM ) { itm_count++; } if( RecoCheckBlog( itm_count, in, out ) != PHP_API_BAD_PARAM ) { itm_count++; } } @@ -298,6 +300,61 @@ long RecoFamilyWaiting( int itm_count, CVars in, CVars &out ){ //return 0; //} +long RecoPlayGround( int itm_count, CVars in, CVars &out ){ + + logfmt(logINFO, "RecoPlayGround()"); + long ret = PHP_API_BAD_PARAM; + const PGresult *res; + char vname[30]; + int ic = itm_count; + + snprintf(vname, sizeof (vname), "title_%05d", ic); + out[vname] = "Some of your task as owner Need Review now "; + + snprintf(vname, sizeof (vname), "description_%05d", ic); + out[vname] = "Some of your task as owner Need Review now,Some of your task as owner Need Review now, S Need Review now"; + + snprintf(vname, sizeof (vname), "card_type_%05d", ic); + out[vname] = "PLAYGROUND"; + + snprintf(vname, sizeof (vname), "offer_id_%05d", ic); + out[vname] = "0"; + + snprintf(vname, sizeof (vname), "blog_id_%05d", ic); + out[vname] = "0"; + + snprintf(vname, sizeof (vname), "card_icon_%05d", ic); + out[vname] = "icon1"; + + snprintf(vname, sizeof (vname), "banner_%05d", ic); + out[vname] ="https://www.wrenchboard.com/assets/images/apps/banners/banner-job-due.jpg"; + + snprintf(vname, sizeof (vname), "banner_location_%05d", ic); + out[vname] ="URL"; + + snprintf(vname, sizeof (vname), "link_path_%05d", ic); + out[vname] = "resources"; + + snprintf(vname, sizeof (vname), "button_text_%05d", ic); + out[vname] = "View Tasks"; + + snprintf(vname, sizeof (vname), "short_button_text_%05d", ic); + out[vname] = "View"; + + snprintf(vname, sizeof (vname), "short_title_%05d", ic); + out[vname] = "Review Ready Tasks"; + + snprintf(vname, sizeof (vname), "short_description_%05d", ic); + out[vname] = "Some of your jobs are waiting for approval "; + + snprintf(vname, sizeof (vname), "short_style_%05d", ic); + out[vname] = "short_style lr"; + + ret = PHP_API_OK; + + return ret; +} + long RecoJobOwner( int itm_count, CVars in, CVars &out ){ return 0;