From 4b5596a540eb5f7eda7c41fe548952dc1d7b3496 Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Wed, 28 Jun 2023 11:48:19 -0400 Subject: [PATCH] Resources data --- wrenchboard/src/shared_tool/jobs.cc | 2 - wrenchboard/src/shared_tool/reco_egine.cc | 3 +- www-api/app/Controllers/WrenchResources.php | 43 ++++++++++++++++++++- 3 files changed, 44 insertions(+), 4 deletions(-) diff --git a/wrenchboard/src/shared_tool/jobs.cc b/wrenchboard/src/shared_tool/jobs.cc index 264833cd..057c6bc3 100644 --- a/wrenchboard/src/shared_tool/jobs.cc +++ b/wrenchboard/src/shared_tool/jobs.cc @@ -408,7 +408,6 @@ long WrenchJobsOfferInterestList(CVars in, CVars &out) { CVars rec; map_to_cvars(f, rec); - snprintf(vname, sizeof (vname), "interest_uid_%05d", i); out[vname] = rec["interest_uid"]; @@ -442,7 +441,6 @@ long WrenchJobsOfferInterestList(CVars in, CVars &out) { snprintf(vname, sizeof (vname), "client_ratings_%05d", i); out[vname] = "0"; - snprintf(vname, sizeof (vname), "offer_code_%05d", i); out[vname] = rec["offer_code"]; diff --git a/wrenchboard/src/shared_tool/reco_egine.cc b/wrenchboard/src/shared_tool/reco_egine.cc index bf9fd398..bc1b3734 100644 --- a/wrenchboard/src/shared_tool/reco_egine.cc +++ b/wrenchboard/src/shared_tool/reco_egine.cc @@ -393,7 +393,8 @@ long RecoPendingInterestCount( 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 moi.*,mjo.expire FROM members_offer_interest moi LEFT JOIN members_jobs_offer mjo ON mjo.id = moi.offer_id " - " WHERE moi.member_id = %lu AND mjo.expire > now()",member_id); + " LEFT JOIN members_jobs j ON j.id= mjo.job_id " + " WHERE moi.member_id = %lu AND mjo.expire > now() AND j.status= 1",member_id); if (res != NULL && pgsql_num_rows(res) > 0) { snprintf(vname, sizeof (vname), "title_%05d", ic); diff --git a/www-api/app/Controllers/WrenchResources.php b/www-api/app/Controllers/WrenchResources.php index cc914c79..4749288f 100644 --- a/www-api/app/Controllers/WrenchResources.php +++ b/www-api/app/Controllers/WrenchResources.php @@ -31,7 +31,7 @@ class WrenchResources extends BaseController } public function website(){ log_message('critical', "WrenchResources-> " ); - + $res1['tab_categories'] = $this->CategoryData(); $res1['marketdata'] = $this->MarketData(); $res1['productdata'] = $this->ProductData(); $res1['collectiondata'] = $this->CollectionData(); @@ -43,6 +43,47 @@ class WrenchResources extends BaseController } + private function CategoryData(){ + + + $arrayVar = [ + "data" => [ + [ + "id" => "1", + "name" => "onsale", + "content" => "On Sale", + ], + [ + "id" => "2", + "name" => "owned", + "content" => "Owned", + ], + [ + "id" => "3", + "name" => "created", + "content" => "Created", + ], + [ + "id" => "4", + "name" => "hidden", + "content" => "Hidden", + ], + [ + "id" => "5", + "name" => "collection", + "content" => "Collection", + ], + [ + "id" => "6", + "name" => "activity", + "content" => "Activity", + ], + ] + ]; + + return $arrayVar; + } + private function CollectionData(){ $arrayVar = [