| 123456789101112131415161718192021222324252627282930313233343536373839 |
- <?php
- namespace ghs\controllers;
- use bizGhs\custom\services\CustomService;
- use common\components\stringUtil;
- use common\components\util;
- use Yii;
- use yii\web\Controller;
- class CustomController extends BaseController
- {
- //客户列表 shish 2021.7.8
- public function actionList()
- {
- $get = Yii::$app->request->get();
- $type = isset($get['type']) ? $get['type'] : -1;
- $name = isset($get['name']) ? $get['name'] : '';
- $where = ['ghsId' => $this->ghsId];
- switch ($type) {
- case 1:
- //已开店
- $where['isOpen'] = 1;
- break;
- default:
- }
- if (!empty($name)) {
- if (stringUtil::isMobile($name)) {
- $where['mobile'] = $name;
- } else {
- $where['shopName'] = ['like', $name];
- }
- }
- $list = CustomService::getCustomList($where);
- util::success($list);
- }
- }
|