feat : sts
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -15,3 +15,4 @@ vendor/
|
|||||||
/phpstan.neon
|
/phpstan.neon
|
||||||
/phpunit.xml
|
/phpunit.xml
|
||||||
/composer.lock
|
/composer.lock
|
||||||
|
uploads/
|
||||||
@@ -19,10 +19,18 @@
|
|||||||
|
|
||||||
## 安装和使用
|
## 安装和使用
|
||||||
|
|
||||||
|
- 安装 swoole 和 xlswriter 扩展
|
||||||
|
|
||||||
|
```
|
||||||
|
自行搜索安装教程
|
||||||
|
```
|
||||||
|
|
||||||
- 获取代码
|
- 获取代码
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://codeup.aliyun.com/67039465d8d1ada68263f984/hhl/rewrite/hyperf_service.git
|
git clone https://codeup.aliyun.com/67039465d8d1ada68263f984/hhl/rewrite/hyperf_service.git
|
||||||
|
|
||||||
|
mkdir uploads
|
||||||
```
|
```
|
||||||
|
|
||||||
- vendor
|
- vendor
|
||||||
|
|||||||
@@ -45,6 +45,12 @@ class PurchaseService extends BaseService
|
|||||||
#[Inject]
|
#[Inject]
|
||||||
protected GoodCache $goodCache;
|
protected GoodCache $goodCache;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var Purchase
|
||||||
|
*/
|
||||||
|
#[Inject]
|
||||||
|
protected Purchase $purchaseModel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
@@ -55,7 +61,7 @@ class PurchaseService extends BaseService
|
|||||||
$kitchenId = (int)$this->request->input('search_kitchen_id');
|
$kitchenId = (int)$this->request->input('search_kitchen_id');
|
||||||
$cityId = (int)$this->request->input('search_city_id');
|
$cityId = (int)$this->request->input('search_city_id');
|
||||||
|
|
||||||
$list = $this->spuModel
|
$list = $this->purchaseModel
|
||||||
->where('cycle_id',$cycleId)
|
->where('cycle_id',$cycleId)
|
||||||
->where('city_id',$cityId)
|
->where('city_id',$cityId)
|
||||||
->where('kitchen_id',$kitchenId)
|
->where('kitchen_id',$kitchenId)
|
||||||
@@ -162,12 +168,6 @@ class PurchaseService extends BaseService
|
|||||||
if ($occupiedOne >= (9 - 2 * $occupiedTwo)) throw new ErrException('不符合目前盒子的规则02,添加失败');
|
if ($occupiedOne >= (9 - 2 * $occupiedTwo)) throw new ErrException('不符合目前盒子的规则02,添加失败');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @var Purchase
|
|
||||||
*/
|
|
||||||
#[Inject]
|
|
||||||
protected Purchase $purchaseModel;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return array
|
||||||
* @throws ContainerExceptionInterface
|
* @throws ContainerExceptionInterface
|
||||||
|
|||||||
@@ -52,7 +52,8 @@
|
|||||||
"ext-json": "Required to use JSON.",
|
"ext-json": "Required to use JSON.",
|
||||||
"ext-pdo": "Required to use MySQL Client.",
|
"ext-pdo": "Required to use MySQL Client.",
|
||||||
"ext-pdo_mysql": "Required to use MySQL Client.",
|
"ext-pdo_mysql": "Required to use MySQL Client.",
|
||||||
"ext-redis": "Required to use Redis Client."
|
"ext-redis": "Required to use Redis Client.",
|
||||||
|
"ext-xlswriter": "*"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
|
|||||||
@@ -27,4 +27,6 @@ return [
|
|||||||
'wx_secret' => env('WX_SECRET','5d89ebae17d836625f0e155216d71f2d'),
|
'wx_secret' => env('WX_SECRET','5d89ebae17d836625f0e155216d71f2d'),
|
||||||
//api_url
|
//api_url
|
||||||
'api_url' => env('DEFAULT_API_URL','http://127.0.0.1:9501'),
|
'api_url' => env('DEFAULT_API_URL','http://127.0.0.1:9501'),
|
||||||
|
// upload_dir
|
||||||
|
'upload_dir' => BASE_PATH.'/uploads/',
|
||||||
];
|
];
|
||||||
Reference in New Issue
Block a user