Parcourir la source

获取门店信息(根绝tableName)

Panda il y a 2 semaines
Parent
commit
8d175df3f3
1 fichiers modifiés avec 11 ajouts et 0 suppressions
  1. 11 0
      application/common/business/PaymentBusiness.php

+ 11 - 0
application/common/business/PaymentBusiness.php

@@ -39,6 +39,17 @@ class PaymentBusiness extends BusinessResult
     public function __construct() {}
 
     /**
+     * 获取门店信息(根绝tableName)
+     * @param string $tableName
+     * @param int $shopId
+     * @return array|bool|\PDOStatement|string|\think\Model|null
+     */
+    public function getShopInfo(string $tableName,int $shopId)
+    {
+        return Db::name($tableName)->where(['shop_id' => $shopId])->find();
+    }
+
+    /**
      * 订单成交
      * @param int $bill_id
      * @param string $third_no