bannerGetOffers($in)
This commit is contained in:
@@ -40,6 +40,18 @@ class WrenchBanners extends BaseController
|
|||||||
// return $this->summaryReturnData($in,$out); //json_encode( $final_out );
|
// return $this->summaryReturnData($in,$out); //json_encode( $final_out );
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
private function bannerGetOffers($in){
|
||||||
|
$in["action"] = WRENCHBOARD_MOBILE_OFFERSLIST;
|
||||||
|
$endpoint = "BANNERS_OFFERS-". $in["uid"]; // str_pad($in["uid"], 12, "0", STR_PAD_LEFT);
|
||||||
|
$wrenchboard = new \App\Models\BackendModel();
|
||||||
|
|
||||||
|
$out = $this->getCache($endpoint);
|
||||||
|
if (count($out)==0){
|
||||||
|
$ret= $wrenchboard->wrenchboard_api($in, $out);
|
||||||
|
$this->saveCache($endpoint,$out,100);
|
||||||
|
}
|
||||||
|
return ( new \App\Models\ResultFormatter() )->processOutJson($in, $out);
|
||||||
|
}
|
||||||
public function usersBanners(){
|
public function usersBanners(){
|
||||||
$raw_json = file_get_contents('php://input');
|
$raw_json = file_get_contents('php://input');
|
||||||
$in = json_decode($raw_json, true);
|
$in = json_decode($raw_json, true);
|
||||||
@@ -57,6 +69,9 @@ class WrenchBanners extends BaseController
|
|||||||
log_message('critical', "usersBanners ********* ALL ".serialize($out) );
|
log_message('critical', "usersBanners ********* ALL ".serialize($out) );
|
||||||
$this->saveCache($endpoint,$out,1500);
|
$this->saveCache($endpoint,$out,1500);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$out["offers_list"] = $this->bannerGetOffers($in);
|
||||||
|
|
||||||
return $this->summaryReturnData($in,$out); //json_encode( $final_out );
|
return $this->summaryReturnData($in,$out); //json_encode( $final_out );
|
||||||
}
|
}
|
||||||
public function apigate(){
|
public function apigate(){
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ class WrenchBlog extends BaseController
|
|||||||
if (count($res1)==0){
|
if (count($res1)==0){
|
||||||
$rawData = $this->apiData($blog_id);
|
$rawData = $this->apiData($blog_id);
|
||||||
$res1= $rawData['payload']; //[0]['payload'];
|
$res1= $rawData['payload']; //[0]['payload'];
|
||||||
$this->saveCache($endpoint,$res1);
|
$this->saveCache($endpoint,$res1,18000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
|||||||
Reference in New Issue
Block a user