shish 5 år sedan
förälder
incheckning
726b8b89bd
1 ändrade filer med 10 tillägg och 1 borttagningar
  1. 10 1
      app-pt/controllers/ShopController.php

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

@@ -3,16 +3,25 @@
 namespace pt\controllers;
 
 use bizHd\merchant\services\ShopService;
-use common\components\mapUtil;
+use common\components\stringUtil;
 use common\components\util;
 use Yii;
 
 class ShopController extends BaseController
 {
 
+    //门店列表 shish 20210730
     public function actionList()
     {
         $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);
         util::success($list);
     }