SupplierController.php 810 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace hd\controllers;
  3. use bizHd\merchant\services\ShopService;
  4. use bizGhs\merchant\services\SupplierService;
  5. use common\components\dirUtil;
  6. use common\components\util;
  7. use common\components\wxUtil;
  8. use Yii;
  9. class SupplierController extends BaseController
  10. {
  11. //供货商列表 shish 2021.1.24
  12. public function actionList()
  13. {
  14. $where = [];
  15. $where['merchantId'] = $this->sjId;
  16. $respond = SupplierService::getSupplierList($where);
  17. util::success($respond);
  18. }
  19. //待结款供货商列表 shish 2021.1.26
  20. public function actionDebtList()
  21. {
  22. $get = Yii::$app->request->get();
  23. $where = ['merchantId' => $this->sjId];
  24. $status = $get['status'] ?? 0;
  25. if (!empty($status)) {
  26. $where['status'] = $status;
  27. }
  28. $list = SupplierService::getDebtList($where);
  29. util::success($list);
  30. }
  31. }