Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cdz_gateway
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨苏杭
cdz_gateway
Commits
53b82674
Commit
53b82674
authored
Jul 30, 2018
by
BANice
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改环境变量
parent
2bd9d258
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
84 additions
and
70 deletions
+84
-70
.env
+6
-0
.idea/workspace.xml
+64
-55
Lib/rabbitmq/MyRabbitMq.php
+14
-15
No files found.
.env
View file @
53b82674
...
...
@@ -13,3 +13,8 @@ DB_NAME=cdzpay
DB_PASSWORD=senthink123
DB_PORT=3306
DB_HOST=127.0.0.1
RABBIT_HOST=rabbitmq.default.svc.cluster.local
RABBIT_PORT=5672
RABBIT_LOGIN=rabbitmq
RABBIT_PASSWORD=senthink123!
RABBIT_VHOST=cdz_gateway
\ No newline at end of file
.idea/workspace.xml
View file @
53b82674
...
...
@@ -5,7 +5,8 @@
</component>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"00edf348-0453-4317-8d2b-bf5eb8ea4b7a"
name=
"Default"
comment=
""
>
<change
beforePath=
"$PROJECT_DIR$/Application/start_gateway.php"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/Application/start_gateway.php"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/.env"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.env"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/Lib/rabbitmq/MyRabbitMq.php"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/Lib/rabbitmq/MyRabbitMq.php"
afterDir=
"false"
/>
</list>
<option
name=
"EXCLUDED_CONVERTED_TO_IGNORED"
value=
"true"
/>
<option
name=
"TRACKING_ENABLED"
value=
"true"
/>
...
...
@@ -34,16 +35,16 @@
</provider>
</entry>
</file>
<file
leaf-file-name=
".env"
pinned=
"false"
current-in-tab=
"
fals
e"
>
<file
leaf-file-name=
".env"
pinned=
"false"
current-in-tab=
"
tru
e"
>
<entry
file=
"file://$PROJECT_DIR$/.env"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"2
10
"
>
<caret
line=
"1
4"
column=
"17"
selection-start-line=
"14"
selection-start-column=
"17"
selection-end-line=
"14"
selection-end-column=
"17
"
/>
<state
relative-caret-position=
"2
85
"
>
<caret
line=
"1
9"
column=
"24"
selection-start-line=
"19"
selection-start-column=
"24"
selection-end-line=
"19"
selection-end-column=
"24
"
/>
</state>
</provider>
</entry>
</file>
<file
leaf-file-name=
"start_gateway.php"
pinned=
"false"
current-in-tab=
"
tru
e"
>
<file
leaf-file-name=
"start_gateway.php"
pinned=
"false"
current-in-tab=
"
fals
e"
>
<entry
file=
"file://$PROJECT_DIR$/Application/start_gateway.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"420"
>
...
...
@@ -52,6 +53,13 @@
</provider>
</entry>
</file>
<file
leaf-file-name=
"Bintohex.php"
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/vendor/workerman/workerman/Protocols/Bintohex.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"-689"
/>
</provider>
</entry>
</file>
<file
leaf-file-name=
"start_register.php"
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/Application/start_register.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
/>
...
...
@@ -64,25 +72,20 @@
</file>
<file
leaf-file-name=
".gitignore"
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/.gitignore"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
/>
</entry>
</file>
<file
leaf-file-name=
"PublishPortShed.php"
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/Lib/rabbitmq/PublishPortShed.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
255
"
>
<caret
line=
"2
2"
column=
"20"
selection-start-line=
"22"
selection-start-column=
"20"
selection-end-line=
"22"
selection-end-column=
"20
"
/>
<state
relative-caret-position=
"
30
"
>
<caret
line=
"2
"
column=
"5"
selection-start-line=
"2"
selection-start-column=
"5"
selection-end-line=
"2"
selection-end-column=
"5
"
/>
</state>
</provider>
</entry>
</file>
<file
leaf-file-name=
"
Charger
.php"
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/Lib/
cdz_order/state/Charger
.php"
>
<file
leaf-file-name=
"
MyRabbitMq
.php"
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/Lib/
rabbitmq/MyRabbitMq
.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
889
"
>
<caret
line=
"
143"
column=
"51"
selection-start-line=
"143"
selection-start-column=
"51"
selection-end-line=
"143"
selection-end-column=
"51
"
/>
<state
relative-caret-position=
"
460
"
>
<caret
line=
"
60"
column=
"48"
selection-start-line=
"60"
selection-start-column=
"48"
selection-end-line=
"60"
selection-end-column=
"48
"
/>
<folding>
<element
signature=
"e#1
23#156
#0#PHP"
expanded=
"true"
/>
<element
signature=
"e#1
18#130
#0#PHP"
expanded=
"true"
/>
</folding>
</state>
</provider>
...
...
@@ -91,7 +94,7 @@
<file
leaf-file-name=
"Events.php"
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/Application/Events.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
41
7"
>
<state
relative-caret-position=
"
68
7"
>
<caret
line=
"65"
column=
"17"
selection-start-line=
"65"
selection-start-column=
"17"
selection-end-line=
"65"
selection-end-column=
"17"
/>
</state>
</provider>
...
...
@@ -152,8 +155,6 @@
<component
name=
"IdeDocumentHistory"
>
<option
name=
"CHANGED_PATHS"
>
<list>
<option
value=
"$PROJECT_DIR$/Application/Model/OrderCapacityModel.php"
/>
<option
value=
"$PROJECT_DIR$/Lib/rabbitmq/MyRabbitMq.php"
/>
<option
value=
"$PROJECT_DIR$/Lib/api/message/PortShedMessage.php"
/>
<option
value=
"$PROJECT_DIR$/Lib/rabbitmq/Publish.php"
/>
<option
value=
"$PROJECT_DIR$/Lib/rabbitmq/PublishPortShed.php"
/>
...
...
@@ -203,6 +204,8 @@
<option
value=
"$PROJECT_DIR$/Application/Controller/PowerOffController.php"
/>
<option
value=
"$PROJECT_DIR$/Application/Controller/AccessController.php"
/>
<option
value=
"$PROJECT_DIR$/Application/start_gateway.php"
/>
<option
value=
"$PROJECT_DIR$/Lib/rabbitmq/MyRabbitMq.php"
/>
<option
value=
"$PROJECT_DIR$/.env"
/>
</list>
</option>
</component>
...
...
@@ -263,7 +266,8 @@
<path>
<item
name=
"cdz_gateway"
type=
"b2602c69:ProjectViewProjectNode"
/>
<item
name=
"cdz_gateway"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"vendor"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"Lib"
type=
"462c0819:PsiDirectoryNode"
/>
<item
name=
"rabbitmq"
type=
"462c0819:PsiDirectoryNode"
/>
</path>
</expand>
<select
/>
...
...
@@ -332,12 +336,12 @@
<workItem
from=
"1530496499150"
duration=
"45852000"
/>
<workItem
from=
"1531129252870"
duration=
"18903000"
/>
<workItem
from=
"1531278957060"
duration=
"18725000"
/>
<workItem
from=
"1531467678517"
duration=
"14
3916
000"
/>
<workItem
from=
"1531467678517"
duration=
"14
7143
000"
/>
</task>
<servers
/>
</component>
<component
name=
"TimeTrackingManager"
>
<option
name=
"totallyTimeSpent"
value=
"5
07510
000"
/>
<option
name=
"totallyTimeSpent"
value=
"5
10737
000"
/>
</component>
<component
name=
"TodoView"
>
<todo-panel
id=
"selected-file"
>
...
...
@@ -358,8 +362,8 @@
<window_info
anchor=
"bottom"
id=
"File Transfer"
order=
"8"
weight=
"0.041751526"
/>
<window_info
anchor=
"bottom"
id=
"Version Control"
order=
"7"
/>
<window_info
anchor=
"bottom"
id=
"Run"
order=
"2"
/>
<window_info
a
ctive=
"true"
a
nchor=
"bottom"
id=
"Terminal"
order=
"7"
visible=
"true"
weight=
"0.31873727"
/>
<window_info
content_ui=
"combo"
id=
"Project"
order=
"0"
sideWeight=
"0.9242262"
visible=
"true"
weight=
"0.16932908"
/>
<window_info
anchor=
"bottom"
id=
"Terminal"
order=
"7"
visible=
"true"
weight=
"0.31873727"
/>
<window_info
active=
"true"
content_ui=
"combo"
id=
"Project"
order=
"0"
sideWeight=
"0.9242262"
visible=
"true"
weight=
"0.16932908"
/>
<window_info
anchor=
"bottom"
id=
"Docker"
order=
"8"
show_stripe_button=
"false"
/>
<window_info
anchor=
"right"
id=
"Database"
order=
"3"
/>
<window_info
anchor=
"bottom"
id=
"Find"
order=
"1"
/>
...
...
@@ -386,20 +390,6 @@
</breakpoint-manager>
</component>
<component
name=
"editorHistoryManager"
>
<entry
file=
"file://$PROJECT_DIR$/Lib/state/StateCode.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"300"
>
<caret
line=
"25"
column=
"10"
selection-start-line=
"25"
selection-start-column=
"10"
selection-end-line=
"25"
selection-end-column=
"10"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/Lib/order_exception/Exception.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"150"
>
<caret
line=
"15"
column=
"25"
selection-start-line=
"15"
selection-start-column=
"25"
selection-end-line=
"15"
selection-end-column=
"25"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/Application/Model/OrderCapacityModel.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"120"
>
...
...
@@ -720,38 +710,57 @@
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/.gitignore"
>
<entry
file=
"file://$PROJECT_DIR$/Lib/Log.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"-256"
/>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/Application/start_register.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
/>
</entry>
<entry
file=
"file://$PROJECT_DIR$/Application/Events.php"
>
<entry
file=
"file://$PROJECT_DIR$/Application/start_businessworker.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
/>
</entry>
<entry
file=
"file://$PROJECT_DIR$/Application/start_gateway.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"4
17
"
>
<caret
line=
"
65"
column=
"17"
selection-start-line=
"65"
selection-start-column=
"17"
selection-end-line=
"65"
selection-end-column=
"17
"
/>
<state
relative-caret-position=
"4
20
"
>
<caret
line=
"
41"
lean-forward=
"true"
selection-start-line=
"41"
selection-end-line=
"41
"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/
Lib/Log
.php"
>
<entry
file=
"file://$PROJECT_DIR$/
vendor/workerman/workerman/Protocols/Bintohex
.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"-
256
"
/>
<state
relative-caret-position=
"-
689
"
/>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/.
env
"
>
<entry
file=
"file://$PROJECT_DIR$/.
gitignore
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
21
0"
>
<caret
line=
"
14"
column=
"17"
selection-start-line=
"14"
selection-start-column=
"17"
selection-end-line=
"14"
selection-end-column=
"17
"
/>
<state
relative-caret-position=
"
3
0"
>
<caret
line=
"
2"
column=
"5"
selection-start-line=
"2"
selection-start-column=
"5"
selection-end-line=
"2"
selection-end-column=
"5
"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/Application/start_register.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
/>
<entry
file=
"file://$PROJECT_DIR$/Application/Events.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"687"
>
<caret
line=
"65"
column=
"17"
selection-start-line=
"65"
selection-start-column=
"17"
selection-end-line=
"65"
selection-end-column=
"17"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/Application/start_businessworker.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
/>
<entry
file=
"file://$PROJECT_DIR$/Lib/rabbitmq/MyRabbitMq.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"460"
>
<caret
line=
"60"
column=
"48"
selection-start-line=
"60"
selection-start-column=
"48"
selection-end-line=
"60"
selection-end-column=
"48"
/>
<folding>
<element
signature=
"e#118#130#0#PHP"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/
Application/start_gateway.php
"
>
<entry
file=
"file://$PROJECT_DIR$/
.env
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
420
"
>
<caret
line=
"
41"
lean-forward=
"true"
selection-start-line=
"41"
selection-end-line=
"41
"
/>
<state
relative-caret-position=
"
285
"
>
<caret
line=
"
19"
column=
"24"
selection-start-line=
"19"
selection-start-column=
"24"
selection-end-line=
"19"
selection-end-column=
"24
"
/>
</state>
</provider>
</entry>
...
...
Lib/rabbitmq/MyRabbitMq.php
View file @
53b82674
...
...
@@ -8,25 +8,13 @@
namespace
Lib\rabbitmq
;
use
Lib\Env
;
use
Log
;
class
MyRabbitMq
{
const
CONNECTION
=
[
'host'
=>
'rabbitmq.default.svc.cluster.local'
,
'port'
=>
'5672'
,
'login'
=>
'rabbitmq'
,
'password'
=>
'senthink123!'
,
'vhost'
=>
'cdz_gateway'
,
];
/**
* @var \AMQPConnection
...
...
@@ -60,7 +48,18 @@ class MyRabbitMq
*/
public
function
__construct
()
{
$this
->
connection
=
new
\AMQPConnection
(
self
::
CONNECTION
);
$this
->
connection
=
new
\AMQPConnection
([
'host'
=>
Env
::
get
(
'RABBIT_HOST'
),
'port'
=>
Env
::
get
(
'RABBIT_PORT'
),
'login'
=>
Env
::
get
(
'RABBIT_LOGIN'
),
'password'
=>
Env
::
get
(
'RABBIT_PASSWORD'
),
'vhost'
=>
Env
::
get
(
'RABBIT_VHOST'
),
]);
if
(
!
$this
->
connection
->
connect
())
{
...
...
@@ -83,7 +82,7 @@ class MyRabbitMq
* @return \AMQPChannel
* @throws \AMQPConnectionException
*/
public
function
getChannel
()
:
\AMQPChannel
public
function
getChannel
()
:
\AMQPChannel
{
return
$this
->
channel
=
new
\AMQPChannel
(
$this
->
connection
);
...
...
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