Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
liexin_supplier
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
c17d3849
authored
Jun 04, 2021
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix
parent
a3b5b54c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
1 deletions
.env
app/Http/Controllers/Api/SupplierAccountApiController.php
config/database.php
.env
View file @
c17d3849
...
...
@@ -63,6 +63,10 @@ REDIS_HOST=192.168.1.235
REDIS_PASSWORD=icDb29mLy2s
REDIS_PORT=6379
REDIS_USER_HOST=192.168.1.235
REDIS_USER_PASSWORD=icDb29mLy2s
REDIS_USER_PORT=6379
REDIS_READ_HOST=192.168.1.237
REDIS_READ_PASSWORD=icDb29mLy2s
REDIS_READ_PORT=6379
...
...
app/Http/Controllers/Api/SupplierAccountApiController.php
View file @
c17d3849
...
...
@@ -14,6 +14,7 @@ use App\Model\SupplierChannelModel;
use
App\Model\SupplierLogModel
;
use
Illuminate\Http\Request
;
use
Illuminate\Support\Facades\Hash
;
use
Illuminate\Support\Facades\Redis
;
use
PhpAmqpLib\Connection\AMQPStreamConnection
;
use
PhpAmqpLib\Message\AMQPMessage
;
...
...
@@ -58,7 +59,8 @@ class SupplierAccountApiController extends Controller
$id
=
$model
->
insertGetId
(
$data
);
if
(
$id
)
{
//还要插入一个redis
$redis
=
new
RedisModel
();
// $redis = new RedisModel();
$redis
=
Redis
::
connection
(
'user'
);
$redis
->
hset
(
'yunxin_api_user_mobile'
,
$data
[
'mobile'
],
$id
);
$accountService
=
new
SupplierAccountService
();
$accountService
->
pushToInitData
(
$data
[
'supplier_code'
]);
...
...
config/database.php
View file @
c17d3849
...
...
@@ -236,6 +236,13 @@ return [
'port'
=>
env
(
'REDIS_READ_PORT'
,
6379
),
'database'
=>
0
,
'read_write_timeout'
=>
0
,
//new
],
'user'
=>
[
'host'
=>
env
(
'REDIS_USER_HOST'
,
''
),
'password'
=>
env
(
'REDIS_USER_PASSWORD'
,
null
),
'port'
=>
env
(
'REDIS_USER_PORT'
,
6379
),
'database'
=>
0
,
'read_write_timeout'
=>
0
,
//new
]
],
...
...
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