|
|
@@ -9,43 +9,43 @@ use Yii;
|
|
|
|
|
|
class CustomService extends BaseService
|
|
|
{
|
|
|
-
|
|
|
- public static $baseFile = '\bizGhs\custom\classes\CustomClass';
|
|
|
-
|
|
|
- public static function getCustomList($where)
|
|
|
- {
|
|
|
- $data = CustomClass::getList('*', $where, 'addTime DESC');
|
|
|
- $list = isset($data['list']) && !empty($data['list']) ? $data['list'] : [];
|
|
|
- if (empty($list)) {
|
|
|
- return $data;
|
|
|
- }
|
|
|
- $data['list'] = CustomClass::groupBaseInfo($list);
|
|
|
- $data['isOpenNum'] = 10;
|
|
|
- $data['allNum'] = 80;
|
|
|
- return $data;
|
|
|
- }
|
|
|
-
|
|
|
- //获取客户信息,包括商家头像和店长信息 shish 2021.1.8
|
|
|
- public static function getCustomInfo($customId)
|
|
|
- {
|
|
|
- $custom = CustomClass::getById($customId);
|
|
|
- if (empty($custom)) {
|
|
|
- return [];
|
|
|
- }
|
|
|
- $list = CustomClass::groupBaseInfo([$custom]);
|
|
|
- $custom = current($list);
|
|
|
- $retailShopId = $custom['retailShopId'] ?? 0;
|
|
|
- $retailShop = \biz\merchant\classes\ShopClass::getById($retailShopId);
|
|
|
- $super = \biz\merchant\classes\ShopClass::getSuper($retailShopId);
|
|
|
- $custom['province'] = $retailShop['province'] ?? '';
|
|
|
- $custom['city'] = $retailShop['city'] ?? '';
|
|
|
- $custom['address'] = $retailShop['address'] ?? '';
|
|
|
- $custom['floor'] = $retailShop['floor'] ?? '';
|
|
|
- $custom['lat'] = $retailShop['lat'] ?? '';
|
|
|
- $custom['long'] = $retailShop['long'] ?? '';
|
|
|
- $custom['userName'] = $super['adminName'] ?? '';
|
|
|
- $custom['mobile'] = $super['mobile'] ?? '';
|
|
|
- return $custom;
|
|
|
- }
|
|
|
-
|
|
|
+
|
|
|
+ public static $baseFile = '\bizGhs\custom\classes\CustomClass';
|
|
|
+
|
|
|
+ public static function getCustomList($where)
|
|
|
+ {
|
|
|
+ $data = CustomClass::getList('*', $where, 'addTime DESC');
|
|
|
+ $data['isOpenNum'] = 10;
|
|
|
+ $data['allNum'] = 80;
|
|
|
+ $list = isset($data['list']) && !empty($data['list']) ? $data['list'] : [];
|
|
|
+ if (empty($list)) {
|
|
|
+ return $data;
|
|
|
+ }
|
|
|
+ $data['list'] = CustomClass::groupBaseInfo($list);
|
|
|
+ return $data;
|
|
|
+ }
|
|
|
+
|
|
|
+ //获取客户信息,包括商家头像和店长信息 shish 2021.1.8
|
|
|
+ public static function getCustomInfo($customId)
|
|
|
+ {
|
|
|
+ $custom = CustomClass::getById($customId);
|
|
|
+ if (empty($custom)) {
|
|
|
+ return [];
|
|
|
+ }
|
|
|
+ $list = CustomClass::groupBaseInfo([$custom]);
|
|
|
+ $custom = current($list);
|
|
|
+ $retailShopId = $custom['retailShopId'] ?? 0;
|
|
|
+ $retailShop = \biz\merchant\classes\ShopClass::getById($retailShopId);
|
|
|
+ $super = \biz\merchant\classes\ShopClass::getSuper($retailShopId);
|
|
|
+ $custom['province'] = $retailShop['province'] ?? '';
|
|
|
+ $custom['city'] = $retailShop['city'] ?? '';
|
|
|
+ $custom['address'] = $retailShop['address'] ?? '';
|
|
|
+ $custom['floor'] = $retailShop['floor'] ?? '';
|
|
|
+ $custom['lat'] = $retailShop['lat'] ?? '';
|
|
|
+ $custom['long'] = $retailShop['long'] ?? '';
|
|
|
+ $custom['userName'] = $super['adminName'] ?? '';
|
|
|
+ $custom['mobile'] = $super['mobile'] ?? '';
|
|
|
+ return $custom;
|
|
|
+ }
|
|
|
+
|
|
|
}
|