Просмотр исходного кода

Merge branch 'master' of git.huaml.com:zhh/huahuibao

shizhongqi 4 лет назад
Родитель
Сommit
5cffcfe386

+ 0 - 1
app-mall/controllers/ShopController.php

@@ -36,7 +36,6 @@ class ShopController extends BaseController
     public function actionGetNewShop()
     {
         $respond = ShopClass::getNewShopList();
-        //显示国兰的信息 0不是 1是
         $showGlInfo = getenv('SHOW_GL_INFO');
         $info = $showGlInfo === false ? 1 : $showGlInfo;
         $respond['showGlInfo'] = $info;

+ 4 - 0
app-pt/controllers/ShopAdminController.php

@@ -50,6 +50,10 @@ class ShopAdminController extends BaseController
                         ApplyClass::deleteByCondition(['mobile' => $mobile]);
                     }
                     $shop->delete();
+                    $merchantName = $shop->merchantName ?? '';
+                    if (!empty($merchantName)) {
+                        SjClass::deleteByCondition(['name' => $merchantName]);
+                    }
                 }
             }
             $sj = SjClass::getById($sjId, true);

+ 17 - 15
app-pt/views/main/app.php

@@ -1,30 +1,32 @@
+<?php
+$host = $_SERVER['HTTP_HOST'];
+$xhbApi = substr($host, strpos($host, '.') + 1);
+if ($xhbApi == 'wixhb.com') {
+    $hhbApi = 'huahb.cn';
+    $title = '中花汇';
+} else {
+    $hhbApi = 'huaml.com';
+    $title = '测试';
+}
+?>
 <!DOCTYPE html>
 <html lang="en">
 <head>
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-    <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
+    <meta name="viewport"
+          content="width=device-width, height=device-height, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
     <meta http-equiv="X-UA-Compatible" content="ie=edge">
-    <title>中花汇</title>
+    <title><?php echo $title; ?></title>
 </head>
 <body>
-
-<?php
-$host = $_SERVER['HTTP_HOST'];
-$xhbApi = substr($host,strpos($host,'.')+1);
-if($xhbApi == 'wixhb.com'){
-    $hhbApi = 'huahb.cn';
-}else{
-    $hhbApi = 'huaml.com';
-}
-?>
 <div style="text-align:center;margin-top:100px;">
-<a style="margin:0 auto;display:inline-block;border:none;padding:8px 15px;border-radius:16px;color:white;background-color:#3385FF;text-decoration:none"
-   href="https://api.shop.<?php echo $xhbApi; ?>/apk/1.0.9.apk">销花宝APP</a>
+    <a style="margin:0 auto;display:inline-block;border:none;padding:8px 15px;border-radius:16px;color:white;background-color:#3385FF;text-decoration:none"
+       href="https://api.shop.<?php echo $xhbApi; ?>/apk/118.apk">销花宝APP</a>
 </div>
 
 <div style="text-align:center;margin-top:30px;">
     <a style="margin:0 auto;display:inline-block;border:none;padding:8px 15px;border-radius:16px;color:white;background-color:#3385FF;text-decoration:none"
-       href="https://api.shop.<?php echo $hhbApi; ?>/apk/1.0.9.apk">花掌柜APP</a>
+       href="https://api.shop.<?php echo $hhbApi; ?>/apk/111.apk">花掌柜APP</a>
 </div>
 
 <div style="text-align:center;margin-top:30px;">

+ 12 - 8
biz-ghs/order/classes/OrderClass.php

@@ -598,14 +598,6 @@ class OrderClass extends BaseClass
         return $list;
     }
 
-    //订单列表 ssh 2021.1.19
-    public static function getOrderList($where)
-    {
-        $data = self::getList('*', $where, 'addTime DESC');
-        $data['list'] = self::groupOrder($data['list'], true, false, false, true);
-        return $data;
-    }
-
     //显示操作按钮
     public static function getShowButton($showButton, $isList, $order)
     {
@@ -814,6 +806,18 @@ class OrderClass extends BaseClass
         return ['list' => $list, 'itemStat' => $itemStat];
     }
 
+    //订单列表 ssh 2021.1.19
+    public static function getOrderList($where)
+    {
+        $data = self::getList('*', $where, 'addTime DESC');
+        if (isset($data['list']) && !empty($data['list'])) {
+            foreach ($data['list'] as $key => $val) {
+                $data['list'][$key]['customAvatarUrl'] = imgUtil::groupImg('');
+            }
+        }
+        return $data;
+    }
+
     //整合订单员工和供应商等信息 ssh 2021.1.19
     //$isList 是否列表页
     public static function groupOrder($list, $showButton = false, $showItem = false, $showExpress = false, $isList = false)

+ 6 - 4
biz-mall/goods/services/GoodsCategoryService.php

@@ -31,11 +31,17 @@ class GoodsCategoryService extends BaseService
     public static function getAppointCategoryList($category)
     {
         $ids = array_column($category, 'id');
+
+        //每个分类取的商品数
+        $getNum = [6, 2, 4];
+        $showRowNum = [2, 1, 2];
+
         //取出分类下的商品id
         $list = GoodsCategoryClass::getAllByCondition(['cId' => ['in', $ids]], 'inTurn DESC,addTime DESC', '*');
         if (empty($list)) {
             foreach ($category as $key => $val) {
                 $category[$key]['goodsInfoList'] = [];
+                $category[$key]['showRow'] = isset($showRowNum[$key]) ? $showRowNum[$key] : 2;
             }
             return $category;
         }
@@ -50,10 +56,6 @@ class GoodsCategoryService extends BaseService
         $goodsInfoList = GoodsService::getAllByCondition(['id' => ['in', $goodsList]], 'inTurn DESC', '*', 'id');
         $goodsInfoList = GoodsClass::groupGoodsBaseInfo($goodsInfoList);
 
-        //每个分类取的商品数
-        $getNum = [6, 2, 4];
-        $showRowNum = [2, 1, 2];
-
         foreach ($category as $key => $val) {
             $id = $val['id'];
             //当前分类下有哪些商品id,并组合商品信息

+ 42 - 11
console/controllers/SjController.php

@@ -3,9 +3,11 @@
 namespace console\controllers;
 
 use biz\admin\classes\AdminClass;
+use biz\ghs\classes\GhsClass;
 use biz\shop\classes\ShopAdminClass;
 use biz\shop\classes\ShopClass;
 use biz\sj\classes\SjClass;
+use bizGhs\custom\classes\CustomClass;
 use bizHd\saas\classes\ApplyClass;
 use common\components\util;
 use yii\console\Controller;
@@ -26,20 +28,49 @@ class SjController extends Controller
         foreach ($argv as $key => $item) {
             if ($key > 1) {
                 $mobile = $item;
-                $shop = ShopClass::getByCondition(['mobile' => $mobile], true);
-                if (!empty($shop)) {
-                    $merchantName = $shop->merchantName ?? '';
-                    if (!empty($merchantName)) {
-                        SjClass::deleteByCondition(['name' => $merchantName]);
+                $shopList = ShopClass::getAllByCondition(['mobile' => $mobile], null, '*', null, true);
+                if (!empty($shopList)) {
+                    foreach ($shopList as $shop) {
+                        $merchantName = $shop->merchantName ?? '';
+                        if (!empty($merchantName)) {
+                            SjClass::deleteByCondition(['name' => $merchantName]);
+                        }
+                        $sjId = $shop->sjId ?? 0;
+                        $shop->delete();
+                        if (!empty($sjId)) {
+                            $ghsList = GhsClass::getAllByCondition(['ownSjId' => $sjId], null, '*', null, true);
+                            if (!empty($ghsList)) {
+                                foreach ($ghsList as $ghs) {
+                                    $customId = $ghs->customId;
+                                    $ghs->delete();
+                                    $current = CustomClass::getById($customId, true);
+                                    if (!empty($current)) {
+                                        $current->delete();
+                                    }
+                                }
+                            }
+                            $customList = CustomClass::getAllByCondition(['ownSjId' => $sjId], null, '*', null, true);
+                            if (!empty($customList)) {
+                                foreach ($customList as $custom) {
+                                    $ghsId = $custom->ghsId;
+                                    $custom->delete();
+                                    $current = GhsClass::getById($ghsId, true);
+                                    if (!empty($current)) {
+                                        $current->delete();
+                                    }
+                                }
+                            }
+                        }
                     }
-                    $shop->delete();
                 }
                 ApplyClass::deleteByCondition(['mobile' => $mobile]);
-                $admin = AdminClass::getByCondition(['mobile' => $mobile], true);
-                if (!empty($admin)) {
-                    $adminId = $admin->id ?? 0;
-                    ShopAdminClass::deleteByCondition(['adminId' => $adminId]);
-                    $admin->delete();
+                $adminList = AdminClass::getAllByCondition(['mobile' => $mobile], null, '*', null, true);
+                if (!empty($adminList)) {
+                    foreach ($adminList as $admin) {
+                        $adminId = $admin->id ?? 0;
+                        ShopAdminClass::deleteByCondition(['adminId' => $adminId]);
+                        $admin->delete();
+                    }
                 }
             }
         }