ShopController.php 654 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace pt\controllers;
  3. use bizHd\merchant\services\ShopService;
  4. use common\components\stringUtil;
  5. use common\components\util;
  6. use Yii;
  7. class ShopController extends BaseController
  8. {
  9. //门店列表 ssh 20210730
  10. public function actionList()
  11. {
  12. $where = [];
  13. $name = Yii::$app->request->get('name', '');
  14. if (!empty($name)) {
  15. if (stringUtil::isLetter($name)) {
  16. $where['py'] = ['like', $name];
  17. } else {
  18. $where['merchantName'] = ['like', $name];
  19. }
  20. }
  21. $list = ShopService::getShopList($where);
  22. util::success($list);
  23. }
  24. }