feat: 更新日志处理方式及修复支付索引错误
This commit is contained in:
parent
f1179ececf
commit
86557181d3
@ -66,7 +66,7 @@ class StoreBranchProductLists extends BaseAdminDataLists implements ListsSearchI
|
||||
->order(['sort' => 'desc', 'id' => 'desc'])
|
||||
->select()
|
||||
->each(function ($item) {
|
||||
$item['store_name']=SystemStore::where('id',$item['store_id'])->value('name');
|
||||
$item['system_store_name']=SystemStore::where('id',$item['store_id'])->value('name');
|
||||
$item['unit_name'] = StoreProductUnit::where('id', $item['unit'])->value('name');
|
||||
$item['cate_name'] = StoreCategory::where('id', $item['cate_id'])->value('name');
|
||||
return $item;
|
||||
|
@ -12,8 +12,9 @@ use support\Cache;
|
||||
use think\facade\Db;
|
||||
use Webman\Config;
|
||||
use hg\apidoc\annotation as ApiDoc;
|
||||
use support\Log;
|
||||
use Yansongda\Pay\Exception\InvalidSignException;
|
||||
|
||||
use Monolog\Handler\RotatingFileHandler;
|
||||
#[ApiDoc\NotParse()]
|
||||
|
||||
class IndexController extends BaseApiController
|
||||
@ -22,6 +23,8 @@ class IndexController extends BaseApiController
|
||||
|
||||
public function index()
|
||||
{
|
||||
Log::error(222);
|
||||
d(2);
|
||||
|
||||
try {
|
||||
$wechat = new PayService(1);
|
||||
|
@ -16,9 +16,9 @@ return [
|
||||
'default' => [
|
||||
'handlers' => [
|
||||
[
|
||||
'class' => \support\log\MonologExtendHandler::class,
|
||||
'class' => Monolog\Handler\RotatingFileHandler::class,
|
||||
'constructor' => [
|
||||
null,
|
||||
runtime_path() . '/logs/'.date('Ym').'/.log',
|
||||
2048,
|
||||
Monolog\Logger::DEBUG,
|
||||
true,
|
||||
|
@ -18,7 +18,7 @@ return [
|
||||
[
|
||||
'class' => \support\log\MonologExtendHandler::class,
|
||||
'constructor' => [
|
||||
runtime_path() . '/logs/redis-queue/queue.log',
|
||||
'/logs/redis-queue/queue.log',
|
||||
7, //$maxFiles
|
||||
Monolog\Logger::DEBUG,
|
||||
],
|
||||
|
@ -1,15 +1,11 @@
|
||||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: hjl
|
||||
* Date: 2023/6/21
|
||||
* Time: 07:25
|
||||
*/
|
||||
|
||||
namespace support\log;
|
||||
|
||||
use Monolog\Handler\StreamHandler;
|
||||
use Monolog\Logger;
|
||||
use Monolog\DateFormatter;
|
||||
use DateTime;
|
||||
|
||||
class MonologExtendHandler extends StreamHandler
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user