|
|
@@ -10,9 +10,9 @@ use Yii;
|
|
|
|
|
|
class ShopService extends BaseService
|
|
|
{
|
|
|
-
|
|
|
+
|
|
|
public static $baseFile = '\bizTy\shop\classes\ShopClass';
|
|
|
-
|
|
|
+
|
|
|
//计算运费 shish 2019.12.4
|
|
|
public static function getSendCost($lat, $lng, $jsStatDistance, $shopInfo)
|
|
|
{
|
|
|
@@ -34,44 +34,44 @@ class ShopService extends BaseService
|
|
|
$sendCost = ceil($remainDistance * 1000 / 1000 / 1000) * $addPrice;
|
|
|
return $sendCost;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
//获取默认门店信息 shish 2019.12.6
|
|
|
public static function getDefaultShop($merchant)
|
|
|
{
|
|
|
$defaultShopId = $merchant['defaultShopId'];
|
|
|
return ShopClass::getById($defaultShopId);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
//验证门店
|
|
|
public static function valid($shopInfo, $merchantId)
|
|
|
{
|
|
|
ShopClass::valid($shopInfo, $merchantId);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
public static function getShopList($where)
|
|
|
{
|
|
|
$list = ShopClass::getShopList($where);
|
|
|
return $list;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
//获取默认门店 shish 2020.1.19
|
|
|
public static function getDefaultShopId($merchant)
|
|
|
{
|
|
|
return ShopClass::getDefaultShopId($merchant);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
//添加门店 shish 2020.2.29
|
|
|
public static function addShop($data)
|
|
|
{
|
|
|
return ShopClass::addShop($data);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
//更新门店 shish 2020.2.29
|
|
|
public static function updateShop($id, $data)
|
|
|
{
|
|
|
return ShopClass::updateShop($id, $data);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
//删除门店 shish 2020.3.1
|
|
|
public static function deleteShop($shop)
|
|
|
{
|
|
|
@@ -84,4 +84,15 @@ class ShopService extends BaseService
|
|
|
return ShopClass::generateGatheringCode($merchantId, $shopId);
|
|
|
}
|
|
|
|
|
|
-}
|
|
|
+
|
|
|
+ //根据商家ID,获取所有门店 shopIds linqh 2021.3.4
|
|
|
+ public static function getShopIds($merchantId)
|
|
|
+ {
|
|
|
+ $shops = ShopClass::getAllShop($merchantId);
|
|
|
+ $shopIds = [];
|
|
|
+ if($shops){
|
|
|
+ $shopIds = array_column($shops,'id');
|
|
|
+ }
|
|
|
+ return $shopIds;
|
|
|
+ }
|
|
|
+}
|