|
|
@@ -118,16 +118,14 @@ class CustomController extends BaseController
|
|
|
$type = isset($get['type']) ? $get['type'] : 0;
|
|
|
$name = isset($get['name']) ? $get['name'] : '';
|
|
|
$where = ['ownShopId' => $this->shopId];
|
|
|
+ $sort = 'visitTime DESC';
|
|
|
if ($type == 1) {
|
|
|
+ //消费排行
|
|
|
+ $sort = 'buyAmount DESC';
|
|
|
+ } else if ($type == 2) {
|
|
|
//欠款客户
|
|
|
$where['isDebt'] = 1;
|
|
|
$sort = 'debtAmount DESC';
|
|
|
- } else if ($type == 2) {
|
|
|
- //消费排行
|
|
|
- $sort = 'buyAmount DESC';
|
|
|
- } else {
|
|
|
- //其它
|
|
|
- $sort = 'visitTime DESC';
|
|
|
}
|
|
|
if (!empty($name)) {
|
|
|
if (stringUtil::isLetter($name)) {
|