Преглед изворни кода

Merge branch 'zhongqi-birthDay' into dev

shizhongqi пре 2 месеци
родитељ
комит
5d1f2162f7

+ 15 - 8
app-hd/controllers/ConsoleController.php

@@ -56,7 +56,10 @@ class ConsoleController extends BaseController
     public function actionProfile()
     {
         $mainId = $this->mainId;
-        $respond = \bizGhs\stat\classes\StatSaleClass::profile($mainId);
+
+        //--------- 今日的收入、订单和客户 ---------
+        $respond = StatSaleClass::profile($mainId);
+        $orderNum = $respond['totalOrderNum'] ?? 0;
         $incomeList = $respond['income'] ?? [];
         $todaySale = 0;
         if (!empty($incomeList)) {
@@ -69,15 +72,14 @@ class ConsoleController extends BaseController
             }
         }
 
-        $orderNum = $respond['totalOrderNum'] ?? 0;
-
         //访客数
         $visitCustom = StatVisitClass::getVisitNum($this->shopId);
         $wastage = \bizGhs\order\classes\StockWastageOrderClass::getTodayWaste($this->mainId);
 
         $hsReturn = StatOrderClass::statHsNum($this->mainId);
         $hsNum = $hsReturn['num'] ?? 0;
-        $mainId = $this->mainId;
+
+        //--------- 昨日的收入、订单和客户 ---------
         $_GET['searchTime'] = 'yesterday'; // 必须要有的,让其获取昨天的收入
         $respond = StatSaleClass::profile($mainId);
         $incomeList = $respond['income'] ?? [];
@@ -91,6 +93,10 @@ class ConsoleController extends BaseController
                 $yesterdayIncome = bcadd($yesterdayIncome, $item['amount'], 2);
             }
         }
+        $yesterdayOrderNum = $respond['totalOrderNum'] ?? 0;
+        $yesterdayVisitCustom = StatVisitClass::getVisitNum($this->shopId, date("Ymd", strtotime("-1 day")));
+
+
         $menu = [
             ["name" => "商城", "img" => "ghs/home/shop2.png", "url" => "/admin/cg/mall", 'pf' => 1,],
             ["name" => "改价", "img" => "ghs/home/gj2.png", "url" => "/admin/changePrice/list2", 'pf' => 1,],
@@ -104,10 +110,8 @@ class ConsoleController extends BaseController
             ["name" => "花束", "img" => "ghs/home/kcyjs2.png", "url" => "/admin/goods/list", 'pf' => 1,],
             ["name" => "客户充值", "img" => "ghs/home/kcyjs2.png", "url" => "/admin/recharge/rechargeCode", 'pf' => 1,],
         ];
-
         //查看财务的权限
         $lookMoney = \bizGhs\shop\classes\ShopAdminClass::lookMoneyPower($this->shopAdmin, $this->shop);
-
         $warning = '';
         $warningUrl = '';
         $warning = '结账功能重大调整 查看 >';
@@ -125,8 +129,11 @@ class ConsoleController extends BaseController
                 'wastage' => $wastage,
                 'bouquet' => $hsNum
             ],
-            'incomeStat' => [],
-            'yesterdayIncome' => $yesterdayIncome,
+            'yesterdayData' => [
+                'visit' => $yesterdayVisitCustom,
+                'income' => $yesterdayIncome,
+                'order' => $yesterdayOrderNum
+            ],
             'menu' => $menu,
             'lookMoney' => $lookMoney,
         ]);

+ 0 - 1
biz-mall/hd/classes/HdClass.php

@@ -4,7 +4,6 @@ namespace bizMall\hd\classes;
 
 use bizHd\shop\classes\ShopClass;
 use common\components\imgUtil;
-use Yii;
 use bizMall\base\classes\BaseClass;
 
 class HdClass extends BaseClass

+ 6 - 1
composer.json

@@ -38,7 +38,8 @@
         "shishaoqi/meituan-flash-purchase": "v1.1.0",
         "overtrue/chinese-calendar": "dev-master",
         "phpseclib/phpseclib": "~2.0",
-        "mikemadisonweb/yii2-rabbitmq": "dev-master"
+        "mikemadisonweb/yii2-rabbitmq": "dev-master",
+        "lakalasdk/openapi": "dev-master"
     },
     "require-dev": {
         "yiisoft/yii2-codeception": "~2.0.5",
@@ -69,6 +70,10 @@
         "0":{
             "type": "composer",
             "url": "https://asset-packagist.org"
+        },
+        "lakala-sdk":{
+            "type": "vcs",
+            "url": "git@git.huaml.com:shizhongqi/lakalasdk.git"
         }
     }
 }

+ 52 - 2
composer.lock

@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "04022398e12ef0ecf3730b16dddc4398",
+    "content-hash": "dbc7fe34fcf011cb7811caae4db989c2",
     "packages": [
         {
             "name": "adbario/php-dot-notation",
@@ -1109,6 +1109,55 @@
             ],
             "time": "2019-12-04T09:55:33+00:00"
         },
+        {
+            "name": "lakalasdk/openapi",
+            "version": "dev-master",
+            "source": {
+                "type": "git",
+                "url": "git@git.huaml.com:shizhongqi/lakalasdk.git",
+                "reference": "2b6223de6c184be975cccac8cfda55eefeaa5c7d"
+            },
+            "require": {
+                "php": "^7.0 || ^8.0"
+            },
+            "require-dev": {
+                "friendsofphp/php-cs-fixer": "^3.5",
+                "phpunit/phpunit": "^9.6"
+            },
+            "default-branch": true,
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "Lakala\\OpenAPISDK\\V2\\": "v2/src/",
+                    "Lakala\\OpenAPISDK\\V3\\": "v3/src/"
+                }
+            },
+            "autoload-dev": {
+                "psr-4": {
+                    "Lakala\\OpenAPISDK\\Test\\": "v3/test/"
+                }
+            },
+            "license": [
+                "unlicense"
+            ],
+            "authors": [
+                {
+                    "name": "拉卡拉开放平台",
+                    "homepage": "https://o.lakala.com"
+                }
+            ],
+            "description": "拉卡拉开放平台v3协议文档",
+            "homepage": "https://o.lakala.com",
+            "keywords": [
+                "api",
+                "lakala",
+                "openapi",
+                "php",
+                "rest",
+                "sdk"
+            ],
+            "time": "2026-06-10T02:30:22+00:00"
+        },
         {
             "name": "lcobucci/jwt",
             "version": "3.3.0",
@@ -5447,7 +5496,8 @@
         "baidu/aip-sdk": 20,
         "getuilaboratory/getui-pushapi-php-client-v2": 20,
         "overtrue/chinese-calendar": 20,
-        "mikemadisonweb/yii2-rabbitmq": 20
+        "mikemadisonweb/yii2-rabbitmq": 20,
+        "lakalasdk/openapi": 20
     },
     "prefer-stable": false,
     "prefer-lowest": false,

+ 7 - 4
vendor/composer/InstalledVersions.php

@@ -320,6 +320,7 @@ class InstalledVersions
         }
 
         $installed = array();
+        $copiedLocalDir = false;
 
         if (self::$canGetVendors) {
             foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
@@ -328,9 +329,11 @@ class InstalledVersions
                 } elseif (is_file($vendorDir.'/composer/installed.php')) {
                     /** @var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $required */
                     $required = require $vendorDir.'/composer/installed.php';
-                    $installed[] = self::$installedByVendor[$vendorDir] = $required;
-                    if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
-                        self::$installed = $installed[count($installed) - 1];
+                    self::$installedByVendor[$vendorDir] = $required;
+                    $installed[] = $required;
+                    if (strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
+                        self::$installed = $required;
+                        $copiedLocalDir = true;
                     }
                 }
             }
@@ -348,7 +351,7 @@ class InstalledVersions
             }
         }
 
-        if (self::$installed !== array()) {
+        if (self::$installed !== array() && !$copiedLocalDir) {
             $installed[] = self::$installed;
         }
 

+ 2 - 0
vendor/composer/autoload_psr4.php

@@ -42,6 +42,8 @@ return array(
     'Overtrue\\ChineseCalendar\\' => array($vendorDir . '/overtrue/chinese-calendar/src'),
     'OSS\\' => array($vendorDir . '/aliyuncs/oss-sdk-php/src/OSS'),
     'Lcobucci\\JWT\\' => array($vendorDir . '/lcobucci/jwt/src'),
+    'Lakala\\OpenAPISDK\\V3\\' => array($vendorDir . '/lakalasdk/openapi/v3/src'),
+    'Lakala\\OpenAPISDK\\V2\\' => array($vendorDir . '/lakalasdk/openapi/v2/src'),
     'JmesPath\\' => array($vendorDir . '/mtdowling/jmespath.php/src'),
     'Imagine\\' => array($vendorDir . '/imagine/imagine/src'),
     'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'),

+ 10 - 0
vendor/composer/autoload_static.php

@@ -108,6 +108,8 @@ class ComposerStaticInit1bf592390398b3f4608da27e3f630485
         'L' => 
         array (
             'Lcobucci\\JWT\\' => 13,
+            'Lakala\\OpenAPISDK\\V3\\' => 21,
+            'Lakala\\OpenAPISDK\\V2\\' => 21,
         ),
         'J' => 
         array (
@@ -288,6 +290,14 @@ class ComposerStaticInit1bf592390398b3f4608da27e3f630485
         array (
             0 => __DIR__ . '/..' . '/lcobucci/jwt/src',
         ),
+        'Lakala\\OpenAPISDK\\V3\\' => 
+        array (
+            0 => __DIR__ . '/..' . '/lakalasdk/openapi/v3/src',
+        ),
+        'Lakala\\OpenAPISDK\\V2\\' => 
+        array (
+            0 => __DIR__ . '/..' . '/lakalasdk/openapi/v2/src',
+        ),
         'JmesPath\\' => 
         array (
             0 => __DIR__ . '/..' . '/mtdowling/jmespath.php/src',

+ 52 - 0
vendor/composer/installed.json

@@ -1389,6 +1389,58 @@
             ],
             "install-path": "../imagine/imagine"
         },
+        {
+            "name": "lakalasdk/openapi",
+            "version": "dev-master",
+            "version_normalized": "dev-master",
+            "source": {
+                "type": "git",
+                "url": "git@git.huaml.com:shizhongqi/lakalasdk.git",
+                "reference": "2b6223de6c184be975cccac8cfda55eefeaa5c7d"
+            },
+            "require": {
+                "php": "^7.0 || ^8.0"
+            },
+            "require-dev": {
+                "friendsofphp/php-cs-fixer": "^3.5",
+                "phpunit/phpunit": "^9.6"
+            },
+            "time": "2026-06-10T02:30:22+00:00",
+            "default-branch": true,
+            "type": "library",
+            "installation-source": "source",
+            "autoload": {
+                "psr-4": {
+                    "Lakala\\OpenAPISDK\\V2\\": "v2/src/",
+                    "Lakala\\OpenAPISDK\\V3\\": "v3/src/"
+                }
+            },
+            "autoload-dev": {
+                "psr-4": {
+                    "Lakala\\OpenAPISDK\\Test\\": "v3/test/"
+                }
+            },
+            "license": [
+                "unlicense"
+            ],
+            "authors": [
+                {
+                    "name": "拉卡拉开放平台",
+                    "homepage": "https://o.lakala.com"
+                }
+            ],
+            "description": "拉卡拉开放平台v3协议文档",
+            "homepage": "https://o.lakala.com",
+            "keywords": [
+                "api",
+                "lakala",
+                "openapi",
+                "php",
+                "rest",
+                "sdk"
+            ],
+            "install-path": "../lakalasdk/openapi"
+        },
         {
             "name": "lcobucci/jwt",
             "version": "3.3.0",

+ 13 - 2
vendor/composer/installed.php

@@ -5,7 +5,7 @@
         'type' => 'project',
         'install_path' => __DIR__ . '/../../',
         'aliases' => array(),
-        'reference' => '5b432efc8c8761c962e9497c6f4b54d102d41374',
+        'reference' => 'ec2e404102afbb2ed97182ad2acceea34381e752',
         'name' => 'yiisoft/yii2-app-advanced',
         'dev' => true,
     ),
@@ -216,6 +216,17 @@
             'reference' => 'cb2361e5bb4410b681462d8e4f912bc5dabf84ab',
             'dev_requirement' => false,
         ),
+        'lakalasdk/openapi' => array(
+            'pretty_version' => 'dev-master',
+            'version' => 'dev-master',
+            'type' => 'library',
+            'install_path' => __DIR__ . '/../lakalasdk/openapi',
+            'aliases' => array(
+                0 => '9999999-dev',
+            ),
+            'reference' => '2b6223de6c184be975cccac8cfda55eefeaa5c7d',
+            'dev_requirement' => false,
+        ),
         'lcobucci/jwt' => array(
             'pretty_version' => '3.3.0',
             'version' => '3.3.0.0',
@@ -742,7 +753,7 @@
             'type' => 'project',
             'install_path' => __DIR__ . '/../../',
             'aliases' => array(),
-            'reference' => '5b432efc8c8761c962e9497c6f4b54d102d41374',
+            'reference' => 'ec2e404102afbb2ed97182ad2acceea34381e752',
             'dev_requirement' => false,
         ),
         'yiisoft/yii2-bootstrap' => array(

+ 1 - 0
vendor/lakalasdk/openapi

@@ -0,0 +1 @@
+Subproject commit 2b6223de6c184be975cccac8cfda55eefeaa5c7d