shish 5 năm trước cách đây
mục cha
commit
726b8b89bd

+ 10 - 1
app-pt/controllers/ShopController.php

@@ -3,16 +3,25 @@
 namespace pt\controllers;
 namespace pt\controllers;
 
 
 use bizHd\merchant\services\ShopService;
 use bizHd\merchant\services\ShopService;
-use common\components\mapUtil;
+use common\components\stringUtil;
 use common\components\util;
 use common\components\util;
 use Yii;
 use Yii;
 
 
 class ShopController extends BaseController
 class ShopController extends BaseController
 {
 {
 
 
+    //门店列表 shish 20210730
     public function actionList()
     public function actionList()
     {
     {
         $where = [];
         $where = [];
+        $name = Yii::$app->request->get('name', '');
+        if (!empty($name)) {
+            if (stringUtil::isLetter($name)) {
+                $where['py'] = ['like', $name];
+            } else {
+                $where['name'] = ['like', $name];
+            }
+        }
         $list = ShopService::getShopList($where);
         $list = ShopService::getShopList($where);
         util::success($list);
         util::success($list);
     }
     }