list format

This commit is contained in:
CHIEFSOFT\ameye
2023-07-03 18:20:43 -04:00
parent 195aec3f49
commit af42a41725
+20 -1
View File
@@ -82,6 +82,25 @@ class ResultFormatter extends Model
// id AS coupon_id, ca.code, ca.amount, ca.added::date,ca.status
switch ($in["action"]) {
case WRENCHBOARD_FAMILY_SGGESTLIST:
$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(
"uid" => $out["uid_${key}"],
"description" => $out["description_${key}"],
"title" => $out["title_${key}"],
"added" => $out["added_${key}"],
"status" => $out["status_${key}"],
);
}
break;
case WRENCHBOARD_FAMILY_SAMPLETASKS:
$total = $out["total_record"];
$res = array(
@@ -102,7 +121,7 @@ class ResultFormatter extends Model
);
}
break;
case WRENCHBOARD_JOB_OFFER_INTLIST:
case WRENCHBOARD_JOB_WAITING_INT: