From 176695bfa4f5bc38c8bba5a17dfbe20010f84544 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Tue, 30 Apr 2024 16:12:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/lists/order/RetailOrderList.php | 5 + app/common/model/retail/Cashierinfo.php | 2 +- composer.json | 4 +- composer.lock | 165 +++++++++++++++++++++++- 4 files changed, 172 insertions(+), 4 deletions(-) diff --git a/app/api/lists/order/RetailOrderList.php b/app/api/lists/order/RetailOrderList.php index cc26451..c20499d 100644 --- a/app/api/lists/order/RetailOrderList.php +++ b/app/api/lists/order/RetailOrderList.php @@ -5,7 +5,9 @@ namespace app\api\lists\order; use app\admin\lists\BaseAdminDataLists; use app\common\lists\ListsSearchInterface; +use app\common\model\goods\Goods; use app\common\model\retail\Cashierclass; +use app\common\model\retail\Cashierinfo; /** * 零售订单列表 @@ -46,6 +48,9 @@ class RetailOrderList extends BaseAdminDataLists implements ListsSearchInterface ->limit($this->limitOffset, $this->limitLength) ->order(['id' => 'desc']) ->select() + ->each(function($item){ + $item['goods_list']=Cashierinfo::where('pid',$item['id'])->with('goodsName')->field('goods,nums,price sell')->limit(3)->select(); + }) ->toArray(); } diff --git a/app/common/model/retail/Cashierinfo.php b/app/common/model/retail/Cashierinfo.php index ae47ad0..96f176a 100644 --- a/app/common/model/retail/Cashierinfo.php +++ b/app/common/model/retail/Cashierinfo.php @@ -21,6 +21,6 @@ class Cashierinfo extends BaseModel public function goodsName() { - return $this->hasOne(Goods::class,'id','goods')->bind(['class_name'=>'name']); + return $this->hasOne(Goods::class,'id','goods')->bind(['class_name'=>'name','imgs']); } } \ No newline at end of file diff --git a/composer.json b/composer.json index bcaf7f7..4f40e4f 100644 --- a/composer.json +++ b/composer.json @@ -46,8 +46,8 @@ "symfony/cache": "^6.4", "yansongda/pay": "^3.6", "tinywan/jwt": "^1.9", - "overtrue/wechat": "^6.7", - "next/var-dumper": "^0.1.0" + "next/var-dumper": "^0.1.0", + "w7corp/easywechat": "^6.8" }, "suggest": { "ext-event": "For better performance. " diff --git a/composer.lock b/composer.lock index 4c3c40d..ac3e423 100644 --- a/composer.lock +++ b/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": "f2ed4dce154e90b0dc1dac507e163128", + "content-hash": "cb269cd47d94c38e34c51802a740203d", "packages": [ { "name": "aliyuncs/oss-sdk-php", @@ -5886,6 +5886,63 @@ }, "time": "2022-08-27T08:29:08+00:00" }, + { + "name": "thenorthmemory/xml", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/TheNorthMemory/xml.git", + "reference": "6f50c63450a0b098772423f8bdc3c4ad2c4c30bb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/TheNorthMemory/xml/zipball/6f50c63450a0b098772423f8bdc3c4ad2c4c30bb", + "reference": "6f50c63450a0b098772423f8bdc3c4ad2c4c30bb", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-libxml": "*", + "ext-simplexml": "*", + "php": ">=7.1.2" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.89 || ^1.0", + "phpunit/phpunit": "^7.5 || ^8.5.16 || ^9.3.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "TheNorthMemory\\Xml\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "James ZHANG", + "homepage": "https://github.com/TheNorthMemory" + } + ], + "description": "A wrapper of the XML parser and builder", + "homepage": "https://github.com/TheNorthMemory/xml", + "keywords": [ + "xml-builder", + "xml-parser" + ], + "support": { + "issues": "https://github.com/TheNorthMemory/xml/issues", + "source": "https://github.com/TheNorthMemory/xml/tree/1.1.1" + }, + "time": "2023-01-15T06:01:13+00:00" + }, { "name": "tinywan/jwt", "version": "v1.9.1", @@ -6324,6 +6381,112 @@ ], "time": "2022-03-08T17:03:00+00:00" }, + { + "name": "w7corp/easywechat", + "version": "6.8.0", + "source": { + "type": "git", + "url": "https://github.com/w7corp/easywechat.git", + "reference": "60f0b4ba2ac3144df1a2291193daa34beb949d26" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/w7corp/easywechat/zipball/60f0b4ba2ac3144df1a2291193daa34beb949d26", + "reference": "60f0b4ba2ac3144df1a2291193daa34beb949d26", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-curl": "*", + "ext-fileinfo": "*", + "ext-libxml": "*", + "ext-openssl": "*", + "ext-simplexml": "*", + "ext-sodium": "*", + "monolog/monolog": "^2.2", + "nyholm/psr7": "^1.5", + "nyholm/psr7-server": "^1.0", + "overtrue/socialite": "^3.5|^4.0.1", + "php": ">=8.0.2", + "psr/http-client": "^1.0", + "psr/simple-cache": "^1.0|^2.0|^3.0", + "symfony/cache": "^5.4|^6.0", + "symfony/http-client": "^5.4|^6.0", + "symfony/http-foundation": "^5.4|^6.0", + "symfony/mime": "^5.4|^6.0", + "symfony/polyfill-php81": "^1.25", + "symfony/psr-http-message-bridge": "^2.1.2", + "thenorthmemory/xml": "^1.0" + }, + "require-dev": { + "brainmaestro/composer-git-hooks": "^2.8", + "jetbrains/phpstorm-attributes": "^1.0", + "laravel/pint": "^1.2", + "mikey179/vfsstream": "^1.6", + "mockery/mockery": "^1.4.4", + "phpstan/phpstan": "^1.0", + "phpunit/phpunit": "^9.5", + "symfony/var-dumper": "^5.2" + }, + "type": "library", + "extra": { + "hooks": { + "pre-commit": [ + "composer check-style", + "composer phpstan", + "composer test" + ], + "pre-push": [ + "composer check-style" + ], + "config": { + "stop-on-failure": [ + "pre-commit", + "pre-push" + ] + } + } + }, + "autoload": { + "psr-4": { + "EasyWeChat\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "overtrue", + "email": "anzhengchao@gmail.com" + } + ], + "description": "微信SDK", + "keywords": [ + "easywechat", + "sdk", + "wechat", + "weixin", + "weixin-sdk" + ], + "support": { + "issues": "https://github.com/w7corp/easywechat/issues", + "source": "https://github.com/w7corp/easywechat/tree/6.8.0" + }, + "funding": [ + { + "url": "https://github.com/overtrue", + "type": "github" + } + ], + "time": "2022-09-25T13:05:18+00:00" + }, { "name": "webman/console", "version": "v1.3.4",