Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
ic_server_welfare
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
d2f95f4a
authored
Aug 23, 2019
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
根据前端接口更改对应的红包获取列表服务,加上redis缓存操作
parent
c966fb3b
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
267 additions
and
19 deletions
.env
app/Http/Controllers/IntegralsController.php
app/Http/Controllers/UserIntegralsController.php
app/Models/Integral.php
app/Models/RedisModel.php
config/database.php
storage/laravels.json
storage/laravels.pid
.env
View file @
d2f95f4a
...
...
@@ -24,9 +24,13 @@ SYSTEM_NAME=IC业务助手福利中心服务
//laravels监听IP和端口
LARAVELS_LISTEN_IP=0.0.0.0
LARAVELS_LISTEN_PORT=61009
<<<<<<< HEAD
REDIS_HOST=192.168.1.235
REDIS_PASSWORD=icDb29mLy2s
REDIS_PORT=6379
REDIS_READ_HOST=192.168.1.235
REDIS_READ_PASSWORD=icDb29mLy2s
REDIS_READ_PORT=6379
app/Http/Controllers/IntegralsController.php
View file @
d2f95f4a
...
...
@@ -42,7 +42,11 @@ class IntegralsController extends Controller
$page
=
$request
->
has
(
'page'
)
?
$request
->
page
:
self
::
DEFAULT_PAGE
;
$pageSize
=
$request
->
has
(
'page_size'
)
?
$request
->
page_size
:
self
::
DEFAULT_PAGE_SIZE
;
if
(
$request
->
has
(
'is_api'
)
&&
$request
->
is_api
)
{
$result
=
$integral
->
getIntegralListForApi
();
}
else
{
$result
=
$integral
->
getIntegralList
(
$page
,
$pageSize
,
$filter
);
}
return
$this
->
Export
(
0
,
'ok'
,
$result
);
}
...
...
@@ -147,9 +151,10 @@ class IntegralsController extends Controller
*/
public
function
batchUpdateStatus
(
Request
$request
,
Integral
$integral
)
{
$ids
=
$request
->
ids
;
$ids
=
$request
->
get
(
'ids'
)
;
if
(
!
is_array
(
$ids
))
{
return
Log
::
Info
(
'批量修改参数不是数组'
);
Log
::
Info
(
'批量修改参数不是数组'
);
return
$this
->
Export
(
44
,
'批量修改参数不是数组'
);
}
$status
=
$request
->
status
;
$data
=
[
'status'
=>
$status
,
'update_time'
=>
time
()];
...
...
app/Http/Controllers/UserIntegralsController.php
View file @
d2f95f4a
...
...
@@ -24,8 +24,8 @@ class UserIntegralsController extends Controller
*/
public
function
show
(
Request
$request
)
{
$
id
=
$request
->
id
;
$integral
=
UserIntegral
::
where
(
'user_id'
,
$
i
d
)
->
first
();
$
userId
=
$request
->
get
(
'id'
)
;
$integral
=
UserIntegral
::
where
(
'user_id'
,
$
userI
d
)
->
first
();
$integral
=
$integral
?:
[];
return
$this
->
Export
(
0
,
'ok'
,
[
'data'
=>
$integral
]);
...
...
app/Models/Integral.php
View file @
d2f95f4a
...
...
@@ -7,7 +7,9 @@ namespace App\Models;
use
App\Http\Filters\QueryFilter
;
use
Illuminate\Database\Eloquent\Model
;
use
Illuminate\Support\Facades\DB
;
use
phpDocumentor\Reflection\DocBlock\Tags\Reference\Fqsen
;
//活动红包模型
class
Integral
extends
Model
{
public
$timestamps
=
false
;
...
...
@@ -24,37 +26,195 @@ class Integral extends Model
return
$filters
->
apply
(
$query
);
}
//获取活动红包列表
public
function
getIntegralList
(
$page
,
$pageSize
,
$filter
)
{
$integrals
=
Integral
::
filter
(
$filter
)
->
page
(
$page
,
$pageSize
)
->
orderBy
(
'id'
,
'desc'
)
->
get
()
->
toArray
();
$count
=
Integral
::
count
();
$count
=
Integral
::
filter
(
$filter
)
->
count
();
return
[
'data'
=>
$integrals
,
'count'
=>
$count
];
}
//获取红包活动列表,给API使用
public
function
getIntegralListForApi
()
{
//先从redis里面查询是否有列表,没有的话从MySQL里面取出并且放入redis
$redis
=
new
RedisModel
();
$integrals
=
$this
->
getIntegralListFromRedis
();
$count
=
0
;
if
(
!
$integrals
)
{
$result
=
$this
->
addIntegralListToRedis
();
if
(
!
$result
)
{
ErrorLog
(
ErrorCode
(
18
,
'5'
),
'写入红包活动列表到Redis失败'
);
$count
=
Integral
::
where
(
'status'
,
1
)
->
count
();
}
}
else
{
$count
=
$redis
->
hlen
(
'ic_welfare_integrals'
);
}
$integrals
=
arraySequence
(
$integrals
,
'id'
,
'SORT_ASC'
);
return
[
'data'
=>
array_values
(
$integrals
),
'count'
=>
$count
];
}
//从redis查询出红包列表
public
function
getIntegralListFromRedis
()
{
$redis
=
new
RedisModel
();
$integrals
=
$redis
->
hgetall
(
'ic_welfare_integrals'
);
$integrals
=
array_map
(
function
(
$value
)
{
return
json_decode
(
$value
,
true
);
},
$integrals
);
return
$integrals
;
}
//添加红包列表到Redis
public
function
addIntegralListToRedis
()
{
$integrals
=
Integral
::
where
(
'status'
,
1
)
->
get
()
->
toArray
();
$redis
=
new
RedisModel
();
//转换数据存储到Redis的哈希类型
$data
=
[];
foreach
(
$integrals
as
$key
=>
$integral
)
{
$data
[
$integral
[
'id'
]]
=
json_encode
(
$integral
);
}
//这里如果没有数据放到缓存了,直接删除key
if
(
$data
)
{
$result
=
$redis
->
hmset
(
'ic_welfare_integrals'
,
$data
);
}
else
{
$result
=
$redis
->
del
(
'ic_welfare_integrals'
);
}
return
$result
;
}
//添加单个红包
public
function
addIntegral
(
$data
=
[])
{
$res
=
DB
::
table
(
'integrals'
)
->
insert
(
$data
);
$result
=
DB
::
transaction
(
function
()
use
(
$data
)
{
$id
=
DB
::
table
(
'integrals'
)
->
insertGetId
(
$data
);
$data
[
'update_time'
]
=
0
;
$data
[
'id'
]
=
$id
;
if
(
!
$id
)
{
return
false
;
}
$result
=
$this
->
addIntegralToRedis
(
$id
,
$data
);
if
(
$result
===
false
)
{
throw
new
\Exception
(
'新增红包活动缓存数据失败'
,
ErrorCode
(
19
,
5
));
}
return
$res
;
return
true
;
},
5
);
return
$result
;
}
//添加单个红包活动到redis
public
function
addIntegralToRedis
(
$id
,
$data
)
{
$redis
=
new
RedisModel
();
$result
=
$redis
->
hset
(
'ic_welfare_integrals'
,
$id
,
json_encode
(
$data
));
return
$result
;
}
//更新单个红包活动
public
function
updateIntegral
(
$id
,
$data
=
[])
{
$res
=
DB
::
table
(
'integrals'
)
->
where
(
'id'
,
$id
)
$result
=
DB
::
transaction
(
function
()
use
(
$id
,
$data
)
{
$result
=
DB
::
table
(
'integrals'
)
->
where
(
'id'
,
$id
)
->
update
(
$data
);
if
(
!
$result
)
{
return
false
;
}
return
$res
;
if
(
$result
)
{
$result
=
$this
->
changeIntegralsFromRedis
([
$id
]);
if
(
$result
===
false
)
{
throw
new
\Exception
(
'更新红包活动缓存数据失败'
,
ErrorCode
(
20
,
5
));
}
}
return
$result
?
true
:
false
;
},
5
);
return
$result
;
}
//更新Redis的单个红包活动
public
function
updateIntegralFromRedis
(
$id
,
$data
)
{
$redis
=
new
RedisModel
();
$integral
=
$redis
->
hget
(
'ic_welfare_integrals'
,
$id
);
$result
=
false
;
if
(
$integral
)
{
//为什么用array_merge,因为右边的数组的键值会覆盖左边的对应值
$data
=
array_merge
(
json_decode
(
$integral
,
true
),
$data
);
$result
=
$redis
->
hset
(
'ic_welfare_integrals'
,
$id
,
json_encode
(
$data
));
}
return
$result
;
}
//更新可使用状态,要将redis的列表也更新
public
function
batchUpdateStatus
(
$ids
=
[],
$data
=
[])
{
$res
=
DB
::
table
(
'integrals'
)
->
whereIn
(
'id'
,
$ids
)
->
update
(
$data
);
$result
=
DB
::
transaction
(
function
()
use
(
$ids
,
$data
)
{
$result
=
DB
::
table
(
'integrals'
)
->
whereIn
(
'id'
,
$ids
)
->
update
(
$data
);
if
(
!
$result
)
{
return
false
;
}
$result
=
$this
->
changeIntegralsFromRedis
(
$ids
);
if
(
$result
===
false
)
{
throw
new
\Exception
(
'更新部分红包信息到redis失败'
,
ErrorCode
(
21
,
5
));
}
return
$res
;
return
true
;
},
5
);
return
$result
;
}
//因为修改状态会涉及到不少信息的更变,所以直接重新更新有变化的数据(根据ids)
public
function
changeIntegralsFromRedis
(
$ids
=
[])
{
if
(
$ids
)
{
$changedIntegrals
=
DB
::
table
(
'integrals'
)
->
whereIn
(
'id'
,
$ids
)
->
get
()
->
toArray
();
$needDelete
=
$needUpdate
=
[];
foreach
(
$changedIntegrals
as
$key
=>
$value
)
{
//判断是不是禁用,如果是禁用,就从redis里面删除
if
(
!
$value
->
status
)
{
$needDelete
[]
=
$value
->
id
;
}
else
{
$needUpdate
[
$value
->
id
]
=
json_encode
(
$value
);
}
}
$redis
=
new
RedisModel
();
if
(
$needDelete
)
{
$result
=
$redis
->
hdel
(
'ic_welfare_integrals'
,
$needDelete
);
if
(
$result
===
false
)
{
return
false
;
}
}
if
(
$needUpdate
)
{
$result
=
$redis
->
hmset
(
'ic_welfare_integrals'
,
$needUpdate
);
if
(
$result
===
false
)
{
return
false
;
}
}
return
true
;
}
return
true
;
}
public
function
deleteIntegral
(
$ids
=
[])
...
...
app/Models/RedisModel.php
0 → 100644
View file @
d2f95f4a
<?php
namespace
App\Models
;
use
Illuminate\Database\Eloquent\Model
;
use
Illuminate\Support\Facades\Redis
;
class
RedisModel
extends
Model
{
const
WRITE_CONNECT_METHOD
=
[
'set'
,
'del'
,
'rpush'
,
'lpush'
,
'expire'
,
'hset'
,
'hmset'
,
'hdel'
,
'hsetnx'
,
'hincrby'
];
private
$read
=
[];
private
$write
=
[];
public
function
__construct
(
$ConnectWrite
=
'default'
,
$ConnectRead
=
'read'
)
{
parent
::
__construct
();
$this
->
read
=
Redis
::
connection
(
$ConnectRead
);
$this
->
write
=
Redis
::
connection
(
$ConnectWrite
);
}
public
function
__call
(
$method
,
$args
)
{
$cls
=
&
$this
;
$tmp
=
function
(
$method
,
$args
)
use
(
$cls
)
{
if
(
strpos
(
$method
,
'pipeline_'
))
{
//使用管道
$method
=
substr
(
$method
,
9
);
if
(
in_array
(
$method
,
$cls
::
WRITE_CONNECT_METHOD
))
{
return
$cls
->
write
->
pipeline
(
function
(
$pipe
)
use
(
$args
)
{
foreach
(
$args
as
$arg
)
{
$pipe
->
$method
(
...
$arg
);
}
});
}
else
{
try
{
return
$cls
->
read
->
pipeline
(
function
(
$pipe
)
use
(
$args
)
{
foreach
(
$args
as
$arg
)
{
$pipe
->
$method
(
...
$arg
);
}
});
}
catch
(
ConnectionException
$e
)
{
return
$cls
->
write
->
pipeline
(
function
(
$pipe
)
use
(
$args
)
{
foreach
(
$args
as
$arg
)
{
$pipe
->
$method
(
...
$arg
);
}
});
}
}
}
else
{
if
(
in_array
(
$method
,
$cls
::
WRITE_CONNECT_METHOD
))
{
return
$cls
->
write
->
$method
(
...
$args
);
}
else
{
try
{
return
$cls
->
read
->
$method
(
...
$args
);
}
catch
(
ConnectionException
$e
)
{
return
$cls
->
write
->
$method
(
...
$args
);
}
}
}
};
try
{
return
$tmp
(
$method
,
$args
);
}
catch
(
\Exception
$e
)
{
dd
(
$e
);
return
false
;
}
// if (strpos($method, 'catch_') === 0) {
// $method = substr($method, 6);
// try {
// return $tmp($method, $args);
// } catch (\Exception $e) {
// return null;
// }
// } else {
// return $tmp($method, $args);
// }
}
}
config/database.php
View file @
d2f95f4a
...
...
@@ -143,13 +143,13 @@ return [
'host'
=>
env
(
'REDIS_HOST'
,
'127.0.0.1'
),
'password'
=>
env
(
'REDIS_PASSWORD'
,
null
),
'port'
=>
env
(
'REDIS_PORT'
,
6379
),
'database'
=>
0
'database'
=>
2
],
'read'
=>
[
'host'
=>
env
(
'REDIS_READ_HOST'
,
''
),
'password'
=>
env
(
'REDIS_READ_PASSWORD'
,
null
),
'port'
=>
env
(
'REDIS_READ_PORT'
,
6379
),
'database'
=>
0
'database'
=>
2
]
],
...
...
storage/laravels.json
View file @
d2f95f4a
{
"server"
:{
"listen_ip"
:
"0.0.0.0"
,
"listen_port"
:
"61009"
,
"socket_type"
:
1
,
"enable_coroutine_runtime"
:
false
,
"server"
:
"LaravelS"
,
"handle_static"
:
false
,
"laravel_base_path"
:
"/home/vagrant/code/ic_server_welfare"
,
"inotify_reload"
:{
"enable"
:
false
,
"watch_path"
:
"/home/vagrant/code/ic_server_welfare"
,
"file_types"
:[
".php"
],
"excluded_dirs"
:[],
"log"
:
true
},
"event_handlers"
:[],
"websocket"
:{
"enable"
:
false
},
"sockets"
:[],
"processes"
:[],
"timer"
:{
"enable"
:
false
,
"jobs"
:[],
"max_wait_time"
:
5
},
"events"
:[],
"swoole_tables"
:[],
"register_providers"
:[],
"cleaners"
:[],
"destroy_controllers"
:{
"enable"
:
false
,
"excluded_list"
:[]},
"swoole"
:{
"daemonize"
:
true
,
"dispatch_mode"
:
2
,
"reactor_num"
:
2
,
"worker_num"
:
2
,
"task_ipc_mode"
:
1
,
"task_max_request"
:
8000
,
"task_tmpdir"
:
"/dev/shm"
,
"max_request"
:
8000
,
"open_tcp_nodelay"
:
true
,
"pid_file"
:
"/home/vagrant/code/ic_server_welfare/storage/laravels.pid"
,
"log_file"
:
"/home/vagrant/code/ic_server_welfare/storage/logs/swoole-2019-08.log"
,
"log_level"
:
4
,
"document_root"
:
"/home/vagrant/code/ic_server_welfare/public"
,
"buffer_output_size"
:
2097152
,
"socket_buffer_size"
:
134217728
,
"package_max_length"
:
4194304
,
"reload_async"
:
true
,
"max_wait_time"
:
60
,
"enable_reuse_port"
:
true
,
"enable_coroutine"
:
false
,
"http_compression"
:
false
},
"enable_gzip"
:
false
,
"process_prefix"
:
"/home/vagrant/code/ic_server_welfare"
,
"ignore_check_pid"
:
false
},
"laravel"
:{
"root_path"
:
"/home/vagrant/code/ic_server_welfare"
,
"static_path"
:
"/home/vagrant/code/ic_server_welfare/public"
,
"cleaners"
:[],
"register_providers"
:[],
"destroy_controllers"
:{
"enable"
:
false
,
"excluded_list"
:[]},
"is_lumen"
:
true
,
"_SERVER"
:{
"LESSOPEN"
:
"| /usr/bin/lesspipe %s"
,
"MAIL"
:
"/var/mail/vagrant"
,
"USER"
:
"vagrant"
,
"SSH_CLIENT"
:
"10.0.2.2 58910 22"
,
"LANGUAGE"
:
"en_US:"
,
"SHLVL"
:
"1"
,
"HOME"
:
"/home/vagrant"
,
"OLDPWD"
:
"/home/vagrant"
,
"SSH_TTY"
:
"/dev/pts/0"
,
"LOGNAME"
:
"vagrant"
,
"_"
:
"/usr/bin/php"
,
"XDG_SESSION_ID"
:
"245"
,
"TERM"
:
"cygwin"
,
"RBENV_SHELL"
:
"bash"
,
"PATH"
:
"/home/vagrant/.composer/vendor/bin:/usr/local/go/bin:/home/vagrant/.rbenv/plugins/ruby-build/bin:/home/vagrant/.rbenv/shims:/home/vagrant/.rbenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/vagrant/.dotnet/tools"
,
"S_COLORS"
:
"auto"
,
"XDG_RUNTIME_DIR"
:
"/run/user/1000"
,
"LANG"
:
"en_US.UTF-8"
,
"LS_COLORS"
:
"rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:"
,
"SHELL"
:
"/bin/bash"
,
"LESSCLOSE"
:
"/usr/bin/lesspipe %s %s"
,
"LC_ALL"
:
"en_US.UTF-8"
,
"PWD"
:
"/home/vagrant/code/ic_server_welfare"
,
"SSH_CONNECTION"
:
"10.0.2.2 58910 10.0.2.15 22"
,
"XDG_DATA_DIRS"
:
"/usr/local/share:/usr/share:/var/lib/snapd/desktop"
,
"PHP_SELF"
:
"/home/vagrant/code/ic_server_welfare/artisan"
,
"SCRIPT_NAME"
:
"/home/vagrant/code/ic_server_welfare/artisan"
,
"SCRIPT_FILENAME"
:
"/home/vagrant/code/ic_server_welfare/artisan"
,
"PATH_TRANSLATED"
:
"/home/vagrant/code/ic_server_welfare/artisan"
,
"DOCUMENT_ROOT"
:
""
,
"REQUEST_TIME_FLOAT"
:
1566444222.003262
,
"REQUEST_TIME"
:
1566444222
,
"argv"
:[
"/home/vagrant/code/ic_server_welfare/artisan"
,
"laravels"
,
"config"
,
"--daemonize"
],
"argc"
:
4
,
"APP_ENV"
:
"local"
,
"APP_DEBUG"
:
"true"
,
"APP_KEY"
:
"0uUBt7t4fFIttyqkyLxDhLC7gn9361Yt"
,
"APP_TIMEZONE"
:
"PRC"
,
"DB_CONNECTION"
:
"mysql"
,
"DB_HOST"
:
"192.168.2.232"
,
"DB_PORT"
:
"3306"
,
"DB_DATABASE"
:
"ic_welfare"
,
"DB_USERNAME"
:
"ic_welfare"
,
"DB_PASSWORD"
:
"ic_welfare#zsyM"
,
"DB_PREFIX"
:
"ic_"
,
"CACHE_DRIVER"
:
"file"
,
"QUEUE_DRIVER"
:
"sync"
,
"SYSTEM_CODE"
:
"09"
,
"SYSTEM_NAME"
:
"IC业务助手福利中心服务"
,
"LARAVELS_LISTEN_IP"
:
"0.0.0.0"
,
"LARAVELS_LISTEN_PORT"
:
"61009"
,
"SHELL_VERBOSITY"
:
0
},
"_ENV"
:{
"APP_ENV"
:
"local"
,
"APP_DEBUG"
:
"true"
,
"APP_KEY"
:
"0uUBt7t4fFIttyqkyLxDhLC7gn9361Yt"
,
"APP_TIMEZONE"
:
"PRC"
,
"DB_CONNECTION"
:
"mysql"
,
"DB_HOST"
:
"192.168.2.232"
,
"DB_PORT"
:
"3306"
,
"DB_DATABASE"
:
"ic_welfare"
,
"DB_USERNAME"
:
"ic_welfare"
,
"DB_PASSWORD"
:
"ic_welfare#zsyM"
,
"DB_PREFIX"
:
"ic_"
,
"CACHE_DRIVER"
:
"file"
,
"QUEUE_DRIVER"
:
"sync"
,
"SYSTEM_CODE"
:
"09"
,
"SYSTEM_NAME"
:
"IC业务助手福利中心服务"
,
"LARAVELS_LISTEN_IP"
:
"0.0.0.0"
,
"LARAVELS_LISTEN_PORT"
:
"61009"
,
"SHELL_VERBOSITY"
:
0
}}}
\ No newline at end of file
{
"server"
:{
"listen_ip"
:
"0.0.0.0"
,
"listen_port"
:
"61009"
,
"socket_type"
:
1
,
"enable_coroutine_runtime"
:
false
,
"server"
:
"LaravelS"
,
"handle_static"
:
false
,
"laravel_base_path"
:
"/home/vagrant/code/ic_server_welfare"
,
"inotify_reload"
:{
"enable"
:
false
,
"watch_path"
:
"/home/vagrant/code/ic_server_welfare"
,
"file_types"
:[
".php"
],
"excluded_dirs"
:[],
"log"
:
true
},
"event_handlers"
:[],
"websocket"
:{
"enable"
:
false
},
"sockets"
:[],
"processes"
:[],
"timer"
:{
"enable"
:
false
,
"jobs"
:[],
"max_wait_time"
:
5
},
"events"
:[],
"swoole_tables"
:[],
"register_providers"
:[],
"cleaners"
:[],
"destroy_controllers"
:{
"enable"
:
false
,
"excluded_list"
:[]},
"swoole"
:{
"daemonize"
:
true
,
"dispatch_mode"
:
2
,
"reactor_num"
:
2
,
"worker_num"
:
2
,
"task_ipc_mode"
:
1
,
"task_max_request"
:
8000
,
"task_tmpdir"
:
"/dev/shm"
,
"max_request"
:
8000
,
"open_tcp_nodelay"
:
true
,
"pid_file"
:
"/home/vagrant/code/ic_server_welfare/storage/laravels.pid"
,
"log_file"
:
"/home/vagrant/code/ic_server_welfare/storage/logs/swoole-2019-08.log"
,
"log_level"
:
4
,
"document_root"
:
"/home/vagrant/code/ic_server_welfare/public"
,
"buffer_output_size"
:
2097152
,
"socket_buffer_size"
:
134217728
,
"package_max_length"
:
4194304
,
"reload_async"
:
true
,
"max_wait_time"
:
60
,
"enable_reuse_port"
:
true
,
"enable_coroutine"
:
false
,
"http_compression"
:
false
},
"enable_gzip"
:
false
,
"process_prefix"
:
"/home/vagrant/code/ic_server_welfare"
,
"ignore_check_pid"
:
false
},
"laravel"
:{
"root_path"
:
"/home/vagrant/code/ic_server_welfare"
,
"static_path"
:
"/home/vagrant/code/ic_server_welfare/public"
,
"cleaners"
:[],
"register_providers"
:[],
"destroy_controllers"
:{
"enable"
:
false
,
"excluded_list"
:[]},
"is_lumen"
:
true
,
"_SERVER"
:{
"LESSOPEN"
:
"| /usr/bin/lesspipe %s"
,
"MAIL"
:
"/var/mail/vagrant"
,
"USER"
:
"vagrant"
,
"SSH_CLIENT"
:
"10.0.2.2 50246 22"
,
"LANGUAGE"
:
"en_US:"
,
"SHLVL"
:
"1"
,
"HOME"
:
"/home/vagrant"
,
"OLDPWD"
:
"/home/vagrant/code"
,
"SSH_TTY"
:
"/dev/pts/0"
,
"LOGNAME"
:
"vagrant"
,
"_"
:
"/usr/bin/php"
,
"XDG_SESSION_ID"
:
"5"
,
"TERM"
:
"cygwin"
,
"RBENV_SHELL"
:
"bash"
,
"PATH"
:
"/home/vagrant/.composer/vendor/bin:/usr/local/go/bin:/home/vagrant/.rbenv/plugins/ruby-build/bin:/home/vagrant/.rbenv/shims:/home/vagrant/.rbenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/vagrant/.dotnet/tools"
,
"S_COLORS"
:
"auto"
,
"XDG_RUNTIME_DIR"
:
"/run/user/1000"
,
"LANG"
:
"en_US.UTF-8"
,
"LS_COLORS"
:
"rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:"
,
"SHELL"
:
"/bin/bash"
,
"LESSCLOSE"
:
"/usr/bin/lesspipe %s %s"
,
"LC_ALL"
:
"en_US.UTF-8"
,
"PWD"
:
"/home/vagrant/code/ic_server_welfare"
,
"SSH_CONNECTION"
:
"10.0.2.2 50246 10.0.2.15 22"
,
"XDG_DATA_DIRS"
:
"/usr/local/share:/usr/share:/var/lib/snapd/desktop"
,
"PHP_SELF"
:
"/home/vagrant/code/ic_server_welfare/artisan"
,
"SCRIPT_NAME"
:
"/home/vagrant/code/ic_server_welfare/artisan"
,
"SCRIPT_FILENAME"
:
"/home/vagrant/code/ic_server_welfare/artisan"
,
"PATH_TRANSLATED"
:
"/home/vagrant/code/ic_server_welfare/artisan"
,
"DOCUMENT_ROOT"
:
""
,
"REQUEST_TIME_FLOAT"
:
1566525171.051619
,
"REQUEST_TIME"
:
1566525171
,
"argv"
:[
"/home/vagrant/code/ic_server_welfare/artisan"
,
"laravels"
,
"config"
,
"--daemonize"
],
"argc"
:
4
,
"APP_ENV"
:
"local"
,
"APP_DEBUG"
:
"true"
,
"APP_KEY"
:
"0uUBt7t4fFIttyqkyLxDhLC7gn9361Yt"
,
"APP_TIMEZONE"
:
"PRC"
,
"DB_CONNECTION"
:
"mysql"
,
"DB_HOST"
:
"192.168.2.232"
,
"DB_PORT"
:
"3306"
,
"DB_DATABASE"
:
"ic_welfare"
,
"DB_USERNAME"
:
"ic_welfare"
,
"DB_PASSWORD"
:
"ic_welfare#zsyM"
,
"DB_PREFIX"
:
"ic_"
,
"CACHE_DRIVER"
:
"file"
,
"QUEUE_DRIVER"
:
"sync"
,
"SYSTEM_CODE"
:
"09"
,
"SYSTEM_NAME"
:
"IC业务助手福利中心服务"
,
"LARAVELS_LISTEN_IP"
:
"0.0.0.0"
,
"LARAVELS_LISTEN_PORT"
:
"61009"
,
"REDIS_HOST"
:
"192.168.1.235"
,
"REDIS_PASSWORD"
:
"icDb29mLy2s"
,
"REDIS_PORT"
:
"6379"
,
"REDIS_READ_HOST"
:
"192.168.1.235"
,
"REDIS_READ_PASSWORD"
:
"icDb29mLy2s"
,
"REDIS_READ_PORT"
:
"6379"
,
"SHELL_VERBOSITY"
:
0
},
"_ENV"
:{
"APP_ENV"
:
"local"
,
"APP_DEBUG"
:
"true"
,
"APP_KEY"
:
"0uUBt7t4fFIttyqkyLxDhLC7gn9361Yt"
,
"APP_TIMEZONE"
:
"PRC"
,
"DB_CONNECTION"
:
"mysql"
,
"DB_HOST"
:
"192.168.2.232"
,
"DB_PORT"
:
"3306"
,
"DB_DATABASE"
:
"ic_welfare"
,
"DB_USERNAME"
:
"ic_welfare"
,
"DB_PASSWORD"
:
"ic_welfare#zsyM"
,
"DB_PREFIX"
:
"ic_"
,
"CACHE_DRIVER"
:
"file"
,
"QUEUE_DRIVER"
:
"sync"
,
"SYSTEM_CODE"
:
"09"
,
"SYSTEM_NAME"
:
"IC业务助手福利中心服务"
,
"LARAVELS_LISTEN_IP"
:
"0.0.0.0"
,
"LARAVELS_LISTEN_PORT"
:
"61009"
,
"REDIS_HOST"
:
"192.168.1.235"
,
"REDIS_PASSWORD"
:
"icDb29mLy2s"
,
"REDIS_PORT"
:
"6379"
,
"REDIS_READ_HOST"
:
"192.168.1.235"
,
"REDIS_READ_PASSWORD"
:
"icDb29mLy2s"
,
"REDIS_READ_PORT"
:
"6379"
,
"SHELL_VERBOSITY"
:
0
}}}
\ No newline at end of file
storage/laravels.pid
View file @
d2f95f4a
25816
\ No newline at end of file
9058
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment