category
This commit is contained in:
@@ -117,7 +117,25 @@ class ResultFormatter extends Model
|
||||
public function processOutJson($in, $out) {
|
||||
// id AS coupon_id, ca.code, ca.amount, ca.added::date,ca.status
|
||||
switch ($in["action"]) {
|
||||
|
||||
case WRENCHBOARD_PROMOADMIN_ACTIONLIST:
|
||||
$total = $out["total_record"];
|
||||
$res = array(
|
||||
"status" => $out["status"],
|
||||
"total_record" => $total,
|
||||
"internal_return" => $out["internal_return"],
|
||||
"result_list" => array(),
|
||||
);
|
||||
for ($i = 0; $i < $total; $i++) {
|
||||
$key = sprintf("%05d", $i);
|
||||
$res["result_list"][] = array(
|
||||
"category" => $out["category_${key}"],
|
||||
"description" => $out["description_${key}"],
|
||||
"status" => $out["status_${key}"],
|
||||
"added" => $out["added_${key}"],
|
||||
"updated" => $out["updated_${key}"]
|
||||
);
|
||||
}
|
||||
break;
|
||||
case WRENCHBOARD_PROMOADMIN_GETLIST:
|
||||
$total = $out["total_record"];
|
||||
$res = array(
|
||||
|
||||
Reference in New Issue
Block a user