|
@@ -80,10 +80,19 @@ class Info
|
|
|
|
|
|
|
|
$data = Dever::db($table)->$method($where);
|
|
$data = Dever::db($table)->$method($where);
|
|
|
|
|
|
|
|
|
|
+ $result_1 = array();
|
|
|
|
|
+ $result_2 = array();
|
|
|
if ($data) {
|
|
if ($data) {
|
|
|
foreach ($data as $k => $v) {
|
|
foreach ($data as $k => $v) {
|
|
|
$data[$k] = $this->getGoodsInfo($where['shop_id'], $v);
|
|
$data[$k] = $this->getGoodsInfo($where['shop_id'], $v);
|
|
|
|
|
+ if ($data[$k]['total'] <= 0) {
|
|
|
|
|
+ $result_2[] = $data[$k];
|
|
|
|
|
+ } else {
|
|
|
|
|
+ $result_1[] = $data[$k];
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ $data = array_merge($result_1, $result_2);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
return $data;
|
|
return $data;
|