瀏覽代碼

1. 更新门店(updateShop)增加营业时间设置逻辑
2. 注释了部分无用代码(biz/shop/services/ShopService.php)

shizhongqi 4 年之前
父節點
當前提交
12a21949d8
共有 2 個文件被更改,包括 14 次插入6 次删除
  1. 8 0
      biz/shop/classes/ShopClass.php
  2. 6 6
      biz/shop/services/ShopService.php

+ 8 - 0
biz/shop/classes/ShopClass.php

@@ -122,7 +122,13 @@ class ShopClass extends BaseClass
         $floor = $data['floor'] ?? '';
         $address = $data['address'] ?? '';
         $data['fullAddress'] = $data['city'] . $dist . $address . $floor;
+        // 营业时间设置逻辑
+        if ($data['openType'] === 0) { // openType: 0. 表示 24小时营业  1. 表示 xx ~ xx
+            $data['openStartTime'] = ''; // openStartTime 营业开始时间,空表示24小时
+            $data['openEndTime'] = '';
+        }
         $respond = self::updateById($id, $data);
+
         $ptStyle = $shop['ptStyle'] ?? dict::getDict('ptStyle', 'hd');
         $default = $shop['default'] ?? 0;
         $sjName = $shop['merchantName'] ?? '';
@@ -150,6 +156,8 @@ class ShopClass extends BaseClass
         return $respond;
     }
 
+
+
     //取商家所有门店 ssh 2020.2.29
     public static function getAllShop($sjId)
     {

+ 6 - 6
biz/shop/services/ShopService.php

@@ -61,22 +61,22 @@ class ShopService extends BaseService
 	}
 
 	//更新门店 ssh 2020.2.29
-	public static function updateShop($id, $data)
+	/*public static function updateShop($id, $data)
 	{
 		return ShopClass::updateShop($id, $data);
-	}
+	}*/
 
 	//删除门店 ssh 2020.3.1
-	public static function deleteShop($shop)
+	/*public static function deleteShop($shop)
 	{
 		return ShopClass::deleteShop($shop);
-	}
+	}*/
 
 	//获取收款码 ssh 2020.3.9
-	public static function generateGatheringCode($sjId, $shopId)
+	/*public static function generateGatheringCode($sjId, $shopId)
 	{
 		return ShopClass::generateGatheringCode($sjId, $shopId);
-	}
+	}*/
 
 
     //根据商家ID,获取所有门店 shopIds  lqh 2021.3.4