True back end - notifications
This commit is contained in:
@@ -73,7 +73,7 @@ wrenchboard=> SELECT uid,icon,msg,added FROM members_notification WHERE member_i
|
|||||||
logfmt(logINFO, "/WrenchReturnMemberNotifications()");
|
logfmt(logINFO, "/WrenchReturnMemberNotifications()");
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
return 0;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
long WrenchReturnMemberBankAccount(CVars in, CVars &out) {
|
long WrenchReturnMemberBankAccount(CVars in, CVars &out) {
|
||||||
|
|||||||
@@ -77,8 +77,9 @@ class WrenchNotifications extends BaseController
|
|||||||
|
|
||||||
switch ($endpoint){
|
switch ($endpoint){
|
||||||
case 'mynotifications':
|
case 'mynotifications':
|
||||||
$call_backend = false;
|
$call_backend = true;
|
||||||
$local_out = $this->dummyData();
|
// $local_out = $this->dummyData();
|
||||||
|
$in["action"]=WRENCHBOARD_ACCT_NOTIFICATIONS;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -119,6 +119,27 @@ class ResultFormatter extends Model
|
|||||||
|
|
||||||
// id AS coupon_id, ca.code, ca.amount, ca.added::date,ca.status
|
// id AS coupon_id, ca.code, ca.amount, ca.added::date,ca.status
|
||||||
switch ($in["action"]) {
|
switch ($in["action"]) {
|
||||||
|
|
||||||
|
case WRENCHBOARD_ACCT_NOTIFICATIONS:
|
||||||
|
$total = $out["total_record"];
|
||||||
|
$res = array(
|
||||||
|
"status" => $out["status"],
|
||||||
|
"total_record" => ($total - 1),
|
||||||
|
"internal_return" => $out["internal_return"],
|
||||||
|
"result_list" => array(),
|
||||||
|
);
|
||||||
|
for ($i = 0; $i < $total; $i++) {
|
||||||
|
$key = sprintf("%05d", $i);
|
||||||
|
$res["result_list"][] = array(
|
||||||
|
"msg" => $out["msg_${key}"],
|
||||||
|
"uid" => $out["uid_${key}"],
|
||||||
|
"icon" => $out["icon_${key}"],
|
||||||
|
"added" => $out["added_${key}"],
|
||||||
|
|
||||||
|
);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case WRENCHBOARD_ACCOUNT_RECENTS:
|
case WRENCHBOARD_ACCOUNT_RECENTS:
|
||||||
$total = $out["total_record"];
|
$total = $out["total_record"];
|
||||||
$res = array(
|
$res = array(
|
||||||
|
|||||||
Reference in New Issue
Block a user