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
3ff47aa1
Commit
3ff47aa1
authored
Jun 01, 2018
by
BANice
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
0b命令
parent
1733bb7f
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
492 additions
and
231 deletions
+492
-231
.idea/workspace.xml
+172
-168
Application/Controller/AccessController.php
+16
-6
Application/Controller/CapacityController.php
+4
-0
Application/Controller/HeartController.php
+38
-0
Application/Controller/PortController.php
+16
-0
Application/Controller/PowerController.php
+119
-15
Application/Events.php
+40
-25
Application/Model/OrderModel.php
+12
-1
Application/Model/PortModel.php
+1
-1
Lib/Response.php
+1
-1
Lib/port/Port.php
+61
-14
Lib/redis/RedisKey.php
+4
-0
Route/Api.php
+8
-0
No files found.
.idea/workspace.xml
View file @
3ff47aa1
...
@@ -5,20 +5,19 @@
...
@@ -5,20 +5,19 @@
</component>
</component>
<component
name=
"ChangeListManager"
>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"00edf348-0453-4317-8d2b-bf5eb8ea4b7a"
name=
"Default"
comment=
""
>
<list
default=
"true"
id=
"00edf348-0453-4317-8d2b-bf5eb8ea4b7a"
name=
"Default"
comment=
""
>
<change
afterPath=
"$PROJECT_DIR$/Application/Middleware.php"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/Application/Controller/HeartController.php"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/Application/Middleware/AuthMiddleware.php"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/Application/Middleware/HasMacMiddleware.php"
afterDir=
"false"
/>
<change
afterPath=
"$PROJECT_DIR$/Lib/Gateway.php"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/.idea/deployment.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/deployment.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/.idea/workspace.xml"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/.idea/workspace.xml"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/Application/Controller.php"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/Application/Controller.php"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/Application/Controller/AccessController.php"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/Application/Controller/AccessController.php"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/Application/Controller/AccessController.php"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/Application/Controller/AccessController.php"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/Application/Controller/CapacityController.php"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/Application/Controller/CapacityController.php"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/Application/Controller/PortController.php"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/Application/Controller/PortController.php"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/Application/Controller/PortController.php"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/Application/Controller/PortController.php"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/Application/Controller/PowerController.php"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/Application/Controller/PowerController.php"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/Application/Controller/PowerController.php"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/Application/Controller/PowerController.php"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/Application/Events.php"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/Application/Events.php"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/Application/Events.php"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/Application/Events.php"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/Application/Model/OrderModel.php"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/Application/Model/OrderModel.php"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/Application/Model/PortModel.php"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/Application/Model/PortModel.php"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/Lib/Response.php"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/Lib/Response.php"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/Lib/port/Port.php"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/Lib/port/Port.php"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/Lib/port/Port.php"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/Lib/port/Port.php"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/Lib/redis/RedisKey.php"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/Lib/redis/RedisKey.php"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/Route/Api.php"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/Route/Api.php"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/Route/Api.php"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/Route/Api.php"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/vendor/workerman/workerman/Protocols/Bintohex.php"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/vendor/workerman/workerman/Protocols/Bintohex.php"
afterDir=
"false"
/>
</list>
</list>
<option
name=
"EXCLUDED_CONVERTED_TO_IGNORED"
value=
"true"
/>
<option
name=
"EXCLUDED_CONVERTED_TO_IGNORED"
value=
"true"
/>
<option
name=
"TRACKING_ENABLED"
value=
"true"
/>
<option
name=
"TRACKING_ENABLED"
value=
"true"
/>
...
@@ -38,8 +37,8 @@
...
@@ -38,8 +37,8 @@
<file
leaf-file-name=
"Api.php"
pinned=
"false"
current-in-tab=
"false"
>
<file
leaf-file-name=
"Api.php"
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/Route/Api.php"
>
<entry
file=
"file://$PROJECT_DIR$/Route/Api.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
5
"
>
<state
relative-caret-position=
"
300
"
>
<caret
line=
"
18"
column=
"31"
lean-forward=
"true"
selection-start-line=
"18"
selection-start-column=
"31"
selection-end-line=
"18"
selection-end-column=
"31
"
/>
<caret
line=
"
25"
column=
"54"
lean-forward=
"true"
selection-start-line=
"25"
selection-start-column=
"54"
selection-end-line=
"25"
selection-end-column=
"54
"
/>
<folding>
<folding>
<element
signature=
"e#113#155#0#PHP"
expanded=
"true"
/>
<element
signature=
"e#113#155#0#PHP"
expanded=
"true"
/>
</folding>
</folding>
...
@@ -47,35 +46,32 @@
...
@@ -47,35 +46,32 @@
</provider>
</provider>
</entry>
</entry>
</file>
</file>
<file
leaf-file-name=
"Controller.php"
pinned=
"false"
current-in-tab=
"false"
>
<file
leaf-file-name=
"
Heart
Controller.php"
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/Application/Controller.php"
>
<entry
file=
"file://$PROJECT_DIR$/Application/Controller
/HeartController
.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"365"
>
<state
relative-caret-position=
"405"
>
<caret
line=
"325"
lean-forward=
"true"
selection-start-line=
"325"
selection-end-line=
"325"
/>
<caret
line=
"32"
lean-forward=
"true"
selection-start-line=
"32"
selection-end-line=
"32"
/>
<folding>
<element
signature=
"e#119#131#0#PHP"
expanded=
"true"
/>
</folding>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
</file>
</file>
<file
leaf-file-name=
"Po
rtController.php"
pinned=
"false"
current-in-tab=
"tru
e"
>
<file
leaf-file-name=
"Po
werController.php"
pinned=
"false"
current-in-tab=
"fals
e"
>
<entry
file=
"file://$PROJECT_DIR$/Application/Controller/Po
rt
Controller.php"
>
<entry
file=
"file://$PROJECT_DIR$/Application/Controller/Po
wer
Controller.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
41
3"
>
<state
relative-caret-position=
"
299
3"
>
<caret
line=
"
103"
column=
"28"
lean-forward=
"true"
selection-start-line=
"103"
selection-start-column=
"28"
selection-end-line=
"103"
selection-end-column=
"28
"
/>
<caret
line=
"
216"
column=
"16"
lean-forward=
"true"
selection-start-line=
"216"
selection-start-column=
"16"
selection-end-line=
"216"
selection-end-column=
"16
"
/>
<folding>
<folding>
<element
signature=
"e#1
31#158
#0#PHP"
expanded=
"true"
/>
<element
signature=
"e#1
26#153
#0#PHP"
expanded=
"true"
/>
</folding>
</folding>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
</file>
</file>
<file
leaf-file-name=
"
RedisKe
y.php"
pinned=
"false"
current-in-tab=
"false"
>
<file
leaf-file-name=
"
Gatewa
y.php"
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/Lib/
redis/RedisKe
y.php"
>
<entry
file=
"file://$PROJECT_DIR$/Lib/
Gatewa
y.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
270
"
>
<state
relative-caret-position=
"
418
"
>
<caret
line=
"
23"
column=
"10"
selection-start-line=
"23"
selection-start-column=
"10"
selection-end-line=
"23"
selection-end-column=
"10
"
/>
<caret
line=
"
36"
column=
"63"
selection-start-line=
"36"
selection-start-column=
"63"
selection-end-line=
"36"
selection-end-column=
"63
"
/>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
...
@@ -83,44 +79,47 @@
...
@@ -83,44 +79,47 @@
<file
leaf-file-name=
"Port.php"
pinned=
"false"
current-in-tab=
"false"
>
<file
leaf-file-name=
"Port.php"
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/Lib/port/Port.php"
>
<entry
file=
"file://$PROJECT_DIR$/Lib/port/Port.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
275
"
>
<state
relative-caret-position=
"
170
"
>
<caret
line=
"
81"
column=
"9"
lean-forward=
"true"
selection-start-line=
"81"
selection-start-column=
"9"
selection-end-line=
"81"
selection-end-column=
"9
"
/>
<caret
line=
"
77"
column=
"20"
selection-start-line=
"77"
selection-start-column=
"20"
selection-end-line=
"77"
selection-end-column=
"20
"
/>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
</file>
</file>
<file
leaf-file-name=
"Model.php"
pinned=
"false"
current-in-tab=
"false"
>
<file
leaf-file-name=
"
Order
Model.php"
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/Application/Model.php"
>
<entry
file=
"file://$PROJECT_DIR$/Application/Model
/OrderModel
.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"2
3
0"
>
<state
relative-caret-position=
"2
4
0"
>
<caret
line=
"
83"
column=
"66"
lean-forward=
"true"
selection-start-line=
"83"
selection-start-column=
"66"
selection-end-line=
"83"
selection-end-column=
"66
"
/>
<caret
line=
"
21"
column=
"21"
lean-forward=
"true"
selection-start-line=
"21"
selection-start-column=
"21"
selection-end-line=
"21"
selection-end-column=
"21
"
/>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
</file>
</file>
<file
leaf-file-name=
"
Access
Controller.php"
pinned=
"false"
current-in-tab=
"false"
>
<file
leaf-file-name=
"
Capacity
Controller.php"
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/Application/Controller/
Access
Controller.php"
>
<entry
file=
"file://$PROJECT_DIR$/Application/Controller/
Capacity
Controller.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
763
"
>
<state
relative-caret-position=
"
420
"
>
<caret
line=
"
125"
lean-forward=
"true"
selection-start-line=
"125"
selection-end-line=
"125
"
/>
<caret
line=
"
33"
selection-start-line=
"33"
selection-end-line=
"33
"
/>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
</file>
</file>
<file
leaf-file-name=
"
Bintohex.php"
pinned=
"false"
current-in-tab=
"fals
e"
>
<file
leaf-file-name=
"
PortController.php"
pinned=
"false"
current-in-tab=
"tru
e"
>
<entry
file=
"file://$PROJECT_DIR$/
vendor/workerman/workerman/Protocols/Bintohex
.php"
>
<entry
file=
"file://$PROJECT_DIR$/
Application/Controller/PortController
.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"390"
>
<state
relative-caret-position=
"585"
>
<caret
line=
"31"
column=
"46"
lean-forward=
"true"
selection-start-line=
"31"
selection-start-column=
"46"
selection-end-line=
"31"
selection-end-column=
"46"
/>
<caret
line=
"130"
column=
"8"
selection-start-line=
"130"
selection-start-column=
"8"
selection-end-line=
"130"
selection-end-column=
"8"
/>
<folding>
<element
signature=
"e#131#158#0#PHP"
expanded=
"true"
/>
</folding>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
</file>
</file>
<file
leaf-file-name=
"
PortModel
.php"
pinned=
"false"
current-in-tab=
"false"
>
<file
leaf-file-name=
"
AccessController
.php"
pinned=
"false"
current-in-tab=
"false"
>
<entry
file=
"file://$PROJECT_DIR$/Application/
Model/PortModel
.php"
>
<entry
file=
"file://$PROJECT_DIR$/Application/
Controller/AccessController
.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
120
"
>
<state
relative-caret-position=
"
554
"
>
<caret
line=
"
13"
column=
"28"
selection-start-line=
"13"
selection-start-column=
"28"
selection-end-line=
"13"
selection-end-column=
"28
"
/>
<caret
line=
"
46"
column=
"36"
lean-forward=
"true"
selection-start-line=
"46"
selection-start-column=
"36"
selection-end-line=
"46"
selection-end-column=
"36
"
/>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
...
@@ -143,6 +142,7 @@
...
@@ -143,6 +142,7 @@
<find>
lenght
</find>
<find>
lenght
</find>
<find>
deb
</find>
<find>
deb
</find>
<find>
outTradeNo
</find>
<find>
outTradeNo
</find>
<find>
we
</find>
</findStrings>
</findStrings>
<replaceStrings>
<replaceStrings>
<replace>
Env
</replace>
<replace>
Env
</replace>
...
@@ -167,30 +167,31 @@
...
@@ -167,30 +167,31 @@
<option
value=
"$PROJECT_DIR$/Lib/log/LogRecord.php"
/>
<option
value=
"$PROJECT_DIR$/Lib/log/LogRecord.php"
/>
<option
value=
"$PROJECT_DIR$/Application/Controller/CertifyController.php"
/>
<option
value=
"$PROJECT_DIR$/Application/Controller/CertifyController.php"
/>
<option
value=
"$PROJECT_DIR$/Application/Model/GatewayModel.php"
/>
<option
value=
"$PROJECT_DIR$/Application/Model/GatewayModel.php"
/>
<option
value=
"$PROJECT_DIR$/Application/Model/PortModel.php"
/>
<option
value=
"$PROJECT_DIR$/Application/Controller/CapacityController.php"
/>
<option
value=
"$PROJECT_DIR$/Lib/redis/RedisKey.php"
/>
<option
value=
"$PROJECT_DIR$/Lib/Response.php"
/>
<option
value=
"$PROJECT_DIR$/Application/Controller/powerController.php"
/>
<option
value=
"$PROJECT_DIR$/Application/Controller/powerController.php"
/>
<option
value=
"$PROJECT_DIR$/.env"
/>
<option
value=
"$PROJECT_DIR$/.env"
/>
<option
value=
"$PROJECT_DIR$/.example"
/>
<option
value=
"$PROJECT_DIR$/.example"
/>
<option
value=
"$PROJECT_DIR$/.gitignore"
/>
<option
value=
"$PROJECT_DIR$/.gitignore"
/>
<option
value=
"$PROJECT_DIR$/Application/Model/OrderModel.php"
/>
<option
value=
"$PROJECT_DIR$/Application/Model.php"
/>
<option
value=
"$PROJECT_DIR$/Application/Model.php"
/>
<option
value=
"$PROJECT_DIR$/start.php"
/>
<option
value=
"$PROJECT_DIR$/start.php"
/>
<option
value=
"$PROJECT_DIR$/Lib/Log.php"
/>
<option
value=
"$PROJECT_DIR$/Lib/Log.php"
/>
<option
value=
"$PROJECT_DIR$/Lib/Gateway.php"
/>
<option
value=
"$PROJECT_DIR$/Lib/Gateway.php"
/>
<option
value=
"$PROJECT_DIR$/Application/Controller/PowerController.php"
/>
<option
value=
"$PROJECT_DIR$/Application/Middleware.php"
/>
<option
value=
"$PROJECT_DIR$/Application/Middleware.php"
/>
<option
value=
"$PROJECT_DIR$/Application/Middleware/AuthMiddleware.php"
/>
<option
value=
"$PROJECT_DIR$/Application/Middleware/AuthMiddleware.php"
/>
<option
value=
"$PROJECT_DIR$/Application/Middleware/hasMacMiddleware.php"
/>
<option
value=
"$PROJECT_DIR$/Application/Middleware/hasMacMiddleware.php"
/>
<option
value=
"$PROJECT_DIR$/Application/Events.php"
/>
<option
value=
"$PROJECT_DIR$/Application/Middleware/HasMacMiddleware.php"
/>
<option
value=
"$PROJECT_DIR$/Application/Middleware/HasMacMiddleware.php"
/>
<option
value=
"$PROJECT_DIR$/Route/Api.php"
/>
<option
value=
"$PROJECT_DIR$/vendor/workerman/workerman/Protocols/Bintohex.php"
/>
<option
value=
"$PROJECT_DIR$/vendor/workerman/workerman/Protocols/Bintohex.php"
/>
<option
value=
"$PROJECT_DIR$/Application/Controller.php"
/>
<option
value=
"$PROJECT_DIR$/Lib/Response.php"
/>
<option
value=
"$PROJECT_DIR$/Application/Events.php"
/>
<option
value=
"$PROJECT_DIR$/Lib/redis/RedisKey.php"
/>
<option
value=
"$PROJECT_DIR$/Lib/port/Port.php"
/>
<option
value=
"$PROJECT_DIR$/Lib/port/Port.php"
/>
<option
value=
"$PROJECT_DIR$/Application/Model/PortModel.php"
/>
<option
value=
"$PROJECT_DIR$/Application/Controller/AccessController.php"
/>
<option
value=
"$PROJECT_DIR$/Application/Controller/AccessController.php"
/>
<option
value=
"$PROJECT_DIR$/Application/Controller.php"
/>
<option
value=
"$PROJECT_DIR$/Application/Model/OrderModel.php"
/>
<option
value=
"$PROJECT_DIR$/Application/Controller/CapacityController.php"
/>
<option
value=
"$PROJECT_DIR$/Application/Controller/HeartController.php"
/>
<option
value=
"$PROJECT_DIR$/Application/Controller/PowerController.php"
/>
<option
value=
"$PROJECT_DIR$/Route/Api.php"
/>
<option
value=
"$PROJECT_DIR$/Application/Controller/PortController.php"
/>
<option
value=
"$PROJECT_DIR$/Application/Controller/PortController.php"
/>
</list>
</list>
</option>
</option>
...
@@ -214,11 +215,9 @@
...
@@ -214,11 +215,9 @@
<path
value=
"$PROJECT_DIR$/vendor/composer"
/>
<path
value=
"$PROJECT_DIR$/vendor/composer"
/>
</include_path>
</include_path>
</component>
</component>
<component
name=
"ProjectFrameBounds"
>
<component
name=
"ProjectFrameBounds"
fullScreen=
"true"
>
<option
name=
"x"
value=
"170"
/>
<option
name=
"width"
value=
"1920"
/>
<option
name=
"y"
value=
"26"
/>
<option
name=
"height"
value=
"1080"
/>
<option
name=
"width"
value=
"1597"
/>
<option
name=
"height"
value=
"1057"
/>
</component>
</component>
<component
name=
"ProjectLevelVcsManager"
settingsEditedManually=
"true"
>
<component
name=
"ProjectLevelVcsManager"
settingsEditedManually=
"true"
>
<ConfirmationsSetting
value=
"2"
id=
"Add"
/>
<ConfirmationsSetting
value=
"2"
id=
"Add"
/>
...
@@ -228,6 +227,7 @@
...
@@ -228,6 +227,7 @@
<foldersAlwaysOnTop
value=
"true"
/>
<foldersAlwaysOnTop
value=
"true"
/>
</navigator>
</navigator>
<panes>
<panes>
<pane
id=
"Scope"
/>
<pane
id=
"ProjectPane"
>
<pane
id=
"ProjectPane"
>
<subPane>
<subPane>
<expand>
<expand>
...
@@ -266,14 +266,13 @@
...
@@ -266,14 +266,13 @@
<select
/>
<select
/>
</subPane>
</subPane>
</pane>
</pane>
<pane
id=
"Scope"
/>
</panes>
</panes>
</component>
</component>
<component
name=
"PropertiesComponent"
>
<component
name=
"PropertiesComponent"
>
<property
name=
"WebServerToolWindowFactoryState"
value=
"false"
/>
<property
name=
"WebServerToolWindowFactoryState"
value=
"false"
/>
<property
name=
"php.override.implement.member.chooser.php.doc"
value=
"NONE"
/>
<property
name=
"php.override.implement.member.chooser.php.doc"
value=
"NONE"
/>
<property
name=
"run.code.analysis.last.selected.profile"
value=
"pProject Default"
/>
<property
name=
"run.code.analysis.last.selected.profile"
value=
"pProject Default"
/>
<property
name=
"settings.editor.selected.configurable"
value=
"
reference.webide.settings.project.settings.php
"
/>
<property
name=
"settings.editor.selected.configurable"
value=
"
web-ide.project.structure
"
/>
</component>
</component>
<component
name=
"RecentsManager"
>
<component
name=
"RecentsManager"
>
<key
name=
"MoveFile.RECENT_KEYS"
>
<key
name=
"MoveFile.RECENT_KEYS"
>
...
@@ -315,12 +314,13 @@
...
@@ -315,12 +314,13 @@
<workItem
from=
"1526831317731"
duration=
"547000"
/>
<workItem
from=
"1526831317731"
duration=
"547000"
/>
<workItem
from=
"1526862727769"
duration=
"6095000"
/>
<workItem
from=
"1526862727769"
duration=
"6095000"
/>
<workItem
from=
"1526871407971"
duration=
"34639000"
/>
<workItem
from=
"1526871407971"
duration=
"34639000"
/>
<workItem
from=
"1527058489501"
duration=
"32851000"
/>
<workItem
from=
"1527058489501"
duration=
"33532000"
/>
<workItem
from=
"1527468499247"
duration=
"36665000"
/>
</task>
</task>
<servers
/>
<servers
/>
</component>
</component>
<component
name=
"TimeTrackingManager"
>
<component
name=
"TimeTrackingManager"
>
<option
name=
"totallyTimeSpent"
value=
"1
17021
000"
/>
<option
name=
"totallyTimeSpent"
value=
"1
54367
000"
/>
</component>
</component>
<component
name=
"TodoView"
>
<component
name=
"TodoView"
>
<todo-panel
id=
"selected-file"
>
<todo-panel
id=
"selected-file"
>
...
@@ -332,7 +332,7 @@
...
@@ -332,7 +332,7 @@
</todo-panel>
</todo-panel>
</component>
</component>
<component
name=
"ToolWindowManager"
>
<component
name=
"ToolWindowManager"
>
<frame
x=
"
170"
y=
"26"
width=
"1597"
height=
"1057
"
extended-state=
"0"
/>
<frame
x=
"
0"
y=
"0"
width=
"1920"
height=
"1080
"
extended-state=
"0"
/>
<editor
active=
"true"
/>
<editor
active=
"true"
/>
<layout>
<layout>
<window_info
anchor=
"bottom"
id=
"TODO"
order=
"6"
weight=
"0.32977587"
/>
<window_info
anchor=
"bottom"
id=
"TODO"
order=
"6"
weight=
"0.32977587"
/>
...
@@ -342,10 +342,9 @@
...
@@ -342,10 +342,9 @@
<window_info
anchor=
"bottom"
id=
"Version Control"
order=
"7"
/>
<window_info
anchor=
"bottom"
id=
"Version Control"
order=
"7"
/>
<window_info
anchor=
"bottom"
id=
"Run"
order=
"2"
/>
<window_info
anchor=
"bottom"
id=
"Run"
order=
"2"
/>
<window_info
anchor=
"bottom"
id=
"Terminal"
order=
"7"
weight=
"0.32017076"
/>
<window_info
anchor=
"bottom"
id=
"Terminal"
order=
"7"
weight=
"0.32017076"
/>
<window_info
active=
"true"
content_ui=
"combo"
id=
"Project"
order=
"0"
sideWeight=
"0.9242262"
visible=
"true"
weight=
"0.2
6495177
"
/>
<window_info
active=
"true"
content_ui=
"combo"
id=
"Project"
order=
"0"
sideWeight=
"0.9242262"
visible=
"true"
weight=
"0.2
2204472
"
/>
<window_info
anchor=
"bottom"
id=
"Docker"
order=
"8"
show_stripe_button=
"false"
/>
<window_info
anchor=
"bottom"
id=
"Docker"
order=
"8"
show_stripe_button=
"false"
/>
<window_info
anchor=
"right"
id=
"Database"
order=
"3"
/>
<window_info
anchor=
"right"
id=
"Database"
order=
"3"
/>
<window_info
anchor=
"bottom"
id=
"Find"
order=
"1"
/>
<window_info
id=
"Structure"
order=
"1"
side_tool=
"true"
weight=
"0.25"
/>
<window_info
id=
"Structure"
order=
"1"
side_tool=
"true"
weight=
"0.25"
/>
<window_info
id=
"Favorites"
order=
"2"
sideWeight=
"0.075773746"
side_tool=
"true"
weight=
"0.26173633"
/>
<window_info
id=
"Favorites"
order=
"2"
sideWeight=
"0.075773746"
side_tool=
"true"
weight=
"0.26173633"
/>
<window_info
anchor=
"bottom"
id=
"Debug"
order=
"3"
weight=
"0.4"
/>
<window_info
anchor=
"bottom"
id=
"Debug"
order=
"3"
weight=
"0.4"
/>
...
@@ -355,6 +354,7 @@
...
@@ -355,6 +354,7 @@
<window_info
anchor=
"right"
id=
"Ant Build"
order=
"1"
weight=
"0.25"
/>
<window_info
anchor=
"right"
id=
"Ant Build"
order=
"1"
weight=
"0.25"
/>
<window_info
anchor=
"bottom"
id=
"Message"
order=
"0"
/>
<window_info
anchor=
"bottom"
id=
"Message"
order=
"0"
/>
<window_info
anchor=
"bottom"
id=
"Cvs"
order=
"4"
weight=
"0.25"
/>
<window_info
anchor=
"bottom"
id=
"Cvs"
order=
"4"
weight=
"0.25"
/>
<window_info
anchor=
"bottom"
id=
"Find"
order=
"1"
/>
</layout>
</layout>
</component>
</component>
<component
name=
"TypeScriptGeneratedFilesManager"
>
<component
name=
"TypeScriptGeneratedFilesManager"
>
...
@@ -369,26 +369,6 @@
...
@@ -369,26 +369,6 @@
</breakpoint-manager>
</breakpoint-manager>
</component>
</component>
<component
name=
"editorHistoryManager"
>
<component
name=
"editorHistoryManager"
>
<entry
file=
"file://$PROJECT_DIR$/Application/Controller.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"1890"
>
<caret
line=
"135"
lean-forward=
"true"
selection-start-line=
"135"
selection-end-line=
"135"
/>
<folding>
<element
signature=
"e#119#131#0#PHP"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/Lib/log/Format.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
/>
</entry>
<entry
file=
"file://$PROJECT_DIR$/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"225"
>
<caret
line=
"22"
column=
"6"
selection-start-line=
"22"
selection-start-column=
"6"
selection-end-line=
"22"
selection-end-column=
"6"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php"
>
<entry
file=
"file://$PROJECT_DIR$/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"570"
>
<state
relative-caret-position=
"570"
>
...
@@ -490,13 +470,6 @@
...
@@ -490,13 +470,6 @@
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/Lib/Response.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"304"
>
<caret
line=
"82"
lean-forward=
"true"
selection-start-line=
"82"
selection-end-line=
"82"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/Lib/Crc.php"
>
<entry
file=
"file://$PROJECT_DIR$/Lib/Crc.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"1140"
>
<state
relative-caret-position=
"1140"
>
...
@@ -511,20 +484,6 @@
...
@@ -511,20 +484,6 @@
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/Application/Controller/CapacityController.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"375"
>
<caret
line=
"30"
column=
"10"
selection-start-line=
"30"
selection-start-column=
"10"
selection-end-line=
"30"
selection-end-column=
"10"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/vendor/workerman/mysql/src/Connection.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"135"
>
<caret
line=
"11"
column=
"6"
selection-start-line=
"11"
selection-start-column=
"6"
selection-end-line=
"11"
selection-end-column=
"6"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/vendor/workerman/mysql/README.md"
>
<entry
file=
"file://$PROJECT_DIR$/vendor/workerman/mysql/README.md"
>
<provider
selected=
"true"
editor-type-id=
"split-provider[text-editor;markdown-preview-editor]"
>
<provider
selected=
"true"
editor-type-id=
"split-provider[text-editor;markdown-preview-editor]"
>
<state
split_layout=
"SPLIT"
>
<state
split_layout=
"SPLIT"
>
...
@@ -533,13 +492,6 @@
...
@@ -533,13 +492,6 @@
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/Application/Model/OrderModel.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"240"
>
<caret
line=
"21"
column=
"1"
selection-start-line=
"21"
selection-start-column=
"1"
selection-end-line=
"21"
selection-end-column=
"1"
/>
</state>
</provider>
</entry>
<entry
file=
"jar://$APPLICATION_HOME_DIR$/plugins/php/lib/php.jar!/stubs/mbstring/mbstring.php"
>
<entry
file=
"jar://$APPLICATION_HOME_DIR$/plugins/php/lib/php.jar!/stubs/mbstring/mbstring.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"525"
>
<state
relative-caret-position=
"525"
>
...
@@ -588,27 +540,48 @@
...
@@ -588,27 +540,48 @@
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/
Lib/Gateway.php
"
>
<entry
file=
"file://$PROJECT_DIR$/
.gitignore
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
273
"
>
<state
relative-caret-position=
"
30
"
>
<caret
line=
"2
8"
column=
"44"
lean-forward=
"true"
selection-start-line=
"28"
selection-start-column=
"44"
selection-end-line=
"28"
selection-end-column=
"44
"
/>
<caret
line=
"2
"
selection-start-line=
"2"
selection-end-line=
"2
"
/>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/Application/
Controller/PowerController
.php"
>
<entry
file=
"file://$PROJECT_DIR$/Application/
Middleware
.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"378"
>
<state
relative-caret-position=
"240"
>
<caret
line=
"73"
selection-start-line=
"73"
selection-end-line=
"73"
/>
<caret
line=
"21"
column=
"1"
lean-forward=
"true"
selection-start-line=
"21"
selection-start-column=
"1"
selection-end-line=
"21"
selection-end-column=
"1"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/Lib/Route.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"1335"
>
<caret
line=
"94"
column=
"20"
selection-start-line=
"94"
selection-start-column=
"20"
selection-end-line=
"94"
selection-end-column=
"20"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/vendor/workerman/workerman/Protocols/Bintohex.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"390"
>
<caret
line=
"31"
column=
"46"
selection-start-line=
"31"
selection-start-column=
"46"
selection-end-line=
"31"
selection-end-column=
"46"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/Application/Controller.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"4740"
>
<caret
line=
"325"
selection-start-line=
"325"
selection-end-line=
"325"
/>
<folding>
<folding>
<element
signature=
"e#1
26#153
#0#PHP"
expanded=
"true"
/>
<element
signature=
"e#1
19#131
#0#PHP"
expanded=
"true"
/>
</folding>
</folding>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/start.php"
>
<entry
file=
"file://$PROJECT_DIR$/start.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
2
30"
>
<state
relative-caret-position=
"
4
30"
>
<caret
line=
"5
6"
column=
"64"
selection-start-line=
"56"
selection-start-column=
"64"
selection-end-line=
"56"
selection-end-column=
"64
"
/>
<caret
line=
"5
2"
selection-start-line=
"52"
selection-end-line=
"52
"
/>
<folding>
<folding>
<element
signature=
"e#94#106#0#PHP"
expanded=
"true"
/>
<element
signature=
"e#94#106#0#PHP"
expanded=
"true"
/>
</folding>
</folding>
...
@@ -617,49 +590,66 @@
...
@@ -617,49 +590,66 @@
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/composer.json"
>
<entry
file=
"file://$PROJECT_DIR$/composer.json"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"1
80
"
>
<state
relative-caret-position=
"1
35
"
>
<caret
line=
"
12"
column=
"3"
lean-forward=
"true"
selection-end-line=
"14
"
/>
<caret
line=
"
9"
column=
"20"
selection-start-line=
"9"
selection-start-column=
"20"
selection-end-line=
"9"
selection-end-column=
"20
"
/>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"
file://$PROJECT_DIR$/.gitignore
"
>
<entry
file=
"
jar://$APPLICATION_HOME_DIR$/plugins/php/lib/php.jar!/stubs/PDO/PDO.php
"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
3
0"
>
<state
relative-caret-position=
"
27
0"
>
<caret
line=
"
2"
selection-start-line=
"2"
selection-end-line=
"2
"
/>
<caret
line=
"
18"
column=
"6"
selection-start-line=
"18"
selection-start-column=
"6"
selection-end-line=
"18"
selection-end-column=
"6
"
/>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/
Application/Middlewar
e.php"
>
<entry
file=
"file://$PROJECT_DIR$/
Lib/Respons
e.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
240
"
>
<state
relative-caret-position=
"
85
"
>
<caret
line=
"
21"
column=
"1"
lean-forward=
"true"
selection-start-line=
"21"
selection-start-column=
"1"
selection-end-line=
"21"
selection-end-column=
"1
"
/>
<caret
line=
"
67"
column=
"20"
selection-start-line=
"67"
selection-start-column=
"20"
selection-end-line=
"67"
selection-end-column=
"20
"
/>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"
file://$PROJECT_DIR$/Application/Middleware/AuthMiddleware
.php"
>
<entry
file=
"
jar://$APPLICATION_HOME_DIR$/plugins/php/lib/php.jar!/stubs/standard/_types
.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
270
"
>
<state
relative-caret-position=
"
741
"
>
<caret
line=
"
23"
column=
"1"
lean-forward=
"true"
selection-start-line=
"23"
selection-start-column=
"1"
selection-end-line=
"23"
selection-end-column=
"1
"
/>
<caret
line=
"
105"
column=
"13"
selection-start-line=
"105"
selection-start-column=
"13"
selection-end-line=
"105"
selection-end-column=
"13
"
/>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/
Lib/Route
.php"
>
<entry
file=
"file://$PROJECT_DIR$/
vendor/workerman/mysql/src/Connection
.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"1335"
>
<state
relative-caret-position=
"153"
>
<caret
line=
"94"
column=
"20"
selection-start-line=
"94"
selection-start-column=
"20"
selection-end-line=
"94"
selection-end-column=
"20"
/>
<caret
line=
"1886"
column=
"20"
selection-start-line=
"1886"
selection-start-column=
"20"
selection-end-line=
"1886"
selection-end-column=
"20"
/>
<folding>
<element
signature=
"e#34#48#0#PHP"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/Application/Model.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"408"
>
<caret
line=
"53"
column=
"20"
selection-start-line=
"53"
selection-start-column=
"20"
selection-end-line=
"53"
selection-end-column=
"20"
/>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/Application/Events.php"
>
<entry
file=
"file://$PROJECT_DIR$/Application/Events.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"2
26
"
>
<state
relative-caret-position=
"2
60
"
>
<caret
line=
"1
02"
lean-forward=
"true"
selection-start-line=
"102"
selection-end-line=
"102
"
/>
<caret
line=
"1
31"
lean-forward=
"true"
selection-start-line=
"131"
selection-end-line=
"131
"
/>
<folding>
<folding>
<element
signature=
"e#94#106#0#PHP"
expanded=
"true"
/>
<element
signature=
"e#94#106#0#PHP"
expanded=
"true"
/>
</folding>
</folding>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/Application/Model/PortModel.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"210"
>
<caret
line=
"19"
lean-forward=
"true"
selection-start-line=
"19"
selection-end-line=
"19"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/Application/Middleware/HasMacMiddleware.php"
>
<entry
file=
"file://$PROJECT_DIR$/Application/Middleware/HasMacMiddleware.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"225"
>
<state
relative-caret-position=
"225"
>
...
@@ -667,79 +657,93 @@
...
@@ -667,79 +657,93 @@
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/
Route/Api
.php"
>
<entry
file=
"file://$PROJECT_DIR$/
Application/Middleware/AuthMiddleware
.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"5"
>
<state
relative-caret-position=
"270"
>
<caret
line=
"18"
column=
"31"
lean-forward=
"true"
selection-start-line=
"18"
selection-start-column=
"31"
selection-end-line=
"18"
selection-end-column=
"31"
/>
<caret
line=
"23"
column=
"1"
lean-forward=
"true"
selection-start-line=
"23"
selection-start-column=
"1"
selection-end-line=
"23"
selection-end-column=
"1"
/>
<folding>
<element
signature=
"e#113#155#0#PHP"
expanded=
"true"
/>
</folding>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/
Application/Controller/CertifyController
.php"
>
<entry
file=
"file://$PROJECT_DIR$/
Lib/redis/RedisKey
.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
40
5"
>
<state
relative-caret-position=
"
31
5"
>
<caret
line=
"
33"
column=
"10"
selection-start-line=
"33"
selection-start-column=
"10"
selection-end-line=
"33"
selection-end-column=
"10
"
/>
<caret
line=
"
26"
lean-forward=
"true"
selection-start-line=
"26"
selection-end-line=
"26
"
/>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/
Lib/redis/RedisKey
.php"
>
<entry
file=
"file://$PROJECT_DIR$/
Application/Model/OrderModel
.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"2
7
0"
>
<state
relative-caret-position=
"2
4
0"
>
<caret
line=
"2
3"
column=
"10"
selection-start-line=
"23"
selection-start-column=
"10"
selection-end-line=
"23"
selection-end-column=
"10
"
/>
<caret
line=
"2
1"
column=
"21"
lean-forward=
"true"
selection-start-line=
"21"
selection-start-column=
"21"
selection-end-line=
"21"
selection-end-column=
"21
"
/>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/
Application/Model/PortModel
.php"
>
<entry
file=
"file://$PROJECT_DIR$/
Lib/Gateway
.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
120
"
>
<state
relative-caret-position=
"
418
"
>
<caret
line=
"
13"
column=
"28"
selection-start-line=
"13"
selection-start-column=
"28"
selection-end-line=
"13"
selection-end-column=
"28
"
/>
<caret
line=
"
36"
column=
"63"
selection-start-line=
"36"
selection-start-column=
"63"
selection-end-line=
"36"
selection-end-column=
"63
"
/>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/Application/
Model
.php"
>
<entry
file=
"file://$PROJECT_DIR$/Application/
Controller/CapacityController
.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
23
0"
>
<state
relative-caret-position=
"
42
0"
>
<caret
line=
"
83"
column=
"66"
lean-forward=
"true"
selection-start-line=
"83"
selection-start-column=
"66"
selection-end-line=
"83"
selection-end-column=
"66
"
/>
<caret
line=
"
33"
selection-start-line=
"33"
selection-end-line=
"33
"
/>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/
vendor/workerman/workerman/Protocols/Bintohex
.php"
>
<entry
file=
"file://$PROJECT_DIR$/
Application/Controller/HeartController
.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
390
"
>
<state
relative-caret-position=
"
405
"
>
<caret
line=
"3
1"
column=
"46"
lean-forward=
"true"
selection-start-line=
"31"
selection-start-column=
"46"
selection-end-line=
"31"
selection-end-column=
"46
"
/>
<caret
line=
"3
2"
lean-forward=
"true"
selection-start-line=
"32"
selection-end-line=
"32
"
/>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/Lib/port/Port.php"
>
<entry
file=
"file://$PROJECT_DIR$/Lib/port/Port.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"275"
>
<state
relative-caret-position=
"170"
>
<caret
line=
"81"
column=
"9"
lean-forward=
"true"
selection-start-line=
"81"
selection-start-column=
"9"
selection-end-line=
"81"
selection-end-column=
"9"
/>
<caret
line=
"77"
column=
"20"
selection-start-line=
"77"
selection-start-column=
"20"
selection-end-line=
"77"
selection-end-column=
"20"
/>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/Application/Controller/CertifyController.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"405"
>
<caret
line=
"33"
column=
"10"
selection-start-line=
"33"
selection-start-column=
"10"
selection-end-line=
"33"
selection-end-column=
"10"
/>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/Application/Controller/AccessController.php"
>
<entry
file=
"file://$PROJECT_DIR$/Application/Controller/AccessController.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
763
"
>
<state
relative-caret-position=
"
554
"
>
<caret
line=
"
125"
lean-forward=
"true"
selection-start-line=
"125"
selection-end-line=
"125
"
/>
<caret
line=
"
46"
column=
"36"
lean-forward=
"true"
selection-start-line=
"46"
selection-start-column=
"36"
selection-end-line=
"46"
selection-end-column=
"36
"
/>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/Application/Controller.php"
>
<entry
file=
"file://$PROJECT_DIR$/Application/Controller
/PowerController
.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
365
"
>
<state
relative-caret-position=
"
2993
"
>
<caret
line=
"
325"
lean-forward=
"true"
selection-start-line=
"325"
selection-end-line=
"325
"
/>
<caret
line=
"
216"
column=
"16"
lean-forward=
"true"
selection-start-line=
"216"
selection-start-column=
"16"
selection-end-line=
"216"
selection-end-column=
"16
"
/>
<folding>
<folding>
<element
signature=
"e#119#131#0#PHP"
expanded=
"true"
/>
<element
signature=
"e#126#153#0#PHP"
expanded=
"true"
/>
</folding>
</state>
</provider>
</entry>
<entry
file=
"file://$PROJECT_DIR$/Route/Api.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"300"
>
<caret
line=
"25"
column=
"54"
lean-forward=
"true"
selection-start-line=
"25"
selection-start-column=
"54"
selection-end-line=
"25"
selection-end-column=
"54"
/>
<folding>
<element
signature=
"e#113#155#0#PHP"
expanded=
"true"
/>
</folding>
</folding>
</state>
</state>
</provider>
</provider>
</entry>
</entry>
<entry
file=
"file://$PROJECT_DIR$/Application/Controller/PortController.php"
>
<entry
file=
"file://$PROJECT_DIR$/Application/Controller/PortController.php"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<provider
selected=
"true"
editor-type-id=
"text-editor"
>
<state
relative-caret-position=
"
413
"
>
<state
relative-caret-position=
"
585
"
>
<caret
line=
"1
03"
column=
"28"
lean-forward=
"true"
selection-start-line=
"103"
selection-start-column=
"28"
selection-end-line=
"103"
selection-end-column=
"2
8"
/>
<caret
line=
"1
30"
column=
"8"
selection-start-line=
"130"
selection-start-column=
"8"
selection-end-line=
"130"
selection-end-column=
"
8"
/>
<folding>
<folding>
<element
signature=
"e#131#158#0#PHP"
expanded=
"true"
/>
<element
signature=
"e#131#158#0#PHP"
expanded=
"true"
/>
</folding>
</folding>
...
...
Application/Controller/AccessController.php
View file @
3ff47aa1
...
@@ -42,25 +42,29 @@ class AccessController extends Controller
...
@@ -42,25 +42,29 @@ class AccessController extends Controller
$mac
=
$this
->
get
(
'mac'
);
$mac
=
$this
->
get
(
'mac'
);
$gateway
Id
=
$gatewayModel
->
getColumn
(
'id'
,
" mac_address = '
$mac
' "
);
$gateway
=
$gatewayModel
->
getColumns
([
'id'
,
'station_id'
]
,
" mac_address = '
$mac
' "
);
if
(
$gatewayId
!=
false
)
{
if
(
count
(
$gateway
)
!==
0
)
{
$gatewayId
=
$gateway
[
'id'
];
Gateway
::
bindUid
(
$this
->
clientId
,
$mac
);
Gateway
::
bindUid
(
$this
->
clientId
,
$mac
);
$_SESSION
[
'gateway_id'
]
=
$gatewayId
;
$_SESSION
[
'gateway_id'
]
=
$gatewayId
;
$_SESSION
[
'station_id'
]
=
$gateway
[
'station_id'
];
$portModel
=
new
PortModel
();
$portModel
=
new
PortModel
();
//网关id下所有的口子mac地址和id
//网关id下所有的口子mac地址和id
$portMacId
=
$portModel
->
getAllColumns
([
'
mac_address
'
,
'id'
],
'gateway_id = '
.
$gatewayId
);
$portMacId
=
$portModel
->
getAllColumns
([
'
device_mac
'
,
'id'
],
'gateway_id = '
.
$gatewayId
);
if
(
count
(
$portMacId
)
!==
0
)
{
//网关下的口子mac和id缓存到session中
if
(
count
(
$portMacId
)
!==
0
)
{
//网关下的口子mac和id缓存到session中
//网关下的端口id和mac注入到session当中,静态缓存
//网关下的端口id和mac注入到session当中,静态缓存
foreach
(
$portMacId
as
$item
)
{
foreach
(
$portMacId
as
$item
)
{
$_SESSION
[
'port_mac_id'
][
$item
[
'
mac_address
'
]]
=
$item
[
'id'
];
$_SESSION
[
'port_mac_id'
][
$item
[
'
device_mac
'
]]
=
$item
[
'id'
];
}
}
}
}
...
@@ -68,10 +72,12 @@ class AccessController extends Controller
...
@@ -68,10 +72,12 @@ class AccessController extends Controller
for
(
$i
=
0
;
$i
<
4
;
$i
++
)
{
for
(
$i
=
0
;
$i
<
4
;
$i
++
)
{
$hex
=
dechex
(
rand
(
0
,
255
));
$hex
=
sprintf
(
'%02x'
,
rand
(
0
,
255
));
$sessionId
.=
$hex
;
$sessionId
.=
$hex
;
}
}
$this
->
response
->
send
(
'02'
,
$sessionId
);
$this
->
response
->
send
(
'02'
,
$sessionId
);
}
else
{
}
else
{
...
@@ -115,6 +121,8 @@ class AccessController extends Controller
...
@@ -115,6 +121,8 @@ class AccessController extends Controller
$portMacId
=
isset
(
$_SESSION
[
'port_mac_id'
])
?
$_SESSION
[
'port_mac_id'
]
:
[];
$portMacId
=
isset
(
$_SESSION
[
'port_mac_id'
])
?
$_SESSION
[
'port_mac_id'
]
:
[];
var_dump
(
$portMacId
);
$port
=
new
port
();
$port
=
new
port
();
$portIdState
=
[];
$portIdState
=
[];
...
@@ -126,7 +134,7 @@ class AccessController extends Controller
...
@@ -126,7 +134,7 @@ class AccessController extends Controller
'state'
=>
$stateArray
[
$i
],
'state'
=>
$stateArray
[
$i
],
'logic_num'
=>
$logic
,
'logic_num'
=>
$logic
,
],
'
mac_address
= '
.
"'
$mac
'"
);
],
'
device_mac
= '
.
"'
$mac
'"
);
if
(
isset
(
$portMacId
[
$mac
]))
if
(
isset
(
$portMacId
[
$mac
]))
{
{
...
@@ -136,6 +144,8 @@ class AccessController extends Controller
...
@@ -136,6 +144,8 @@ class AccessController extends Controller
$i
++
;
$i
++
;
}
}
var_dump
(
$portIdState
);
$port
->
setPortState
(
$portIdState
);
//改变口子状态
$port
->
setPortState
(
$portIdState
);
//改变口子状态
...
...
Application/Controller/CapacityController.php
View file @
3ff47aa1
...
@@ -28,6 +28,10 @@ class CapacityController extends Controller
...
@@ -28,6 +28,10 @@ class CapacityController extends Controller
$capacity
=
$this
->
get
(
'capacity'
);
$capacity
=
$this
->
get
(
'capacity'
);
$gatewayId
=
$_SESSION
[
'gateway_id'
];
//todo 记录用电
//todo 记录用电
}
}
...
...
Application/Controller/HeartController.php
0 → 100644
View file @
3ff47aa1
<?php
/**
* Created by PhpStorm.
* User: banice
* Date: 2018/5/30
* Time: 下午2:53
*/
namespace
Application\Controller
;
use
Application\Controller
;
class
HeartController
extends
Controller
{
protected
$parameterMap
=
[
'00'
=>
[
]
];
public
function
heart
()
{
$time
=
sprintf
(
'%08x'
,
time
());
var_dump
(
$time
);
$this
->
response
->
send
(
'00'
,
$time
);
}
}
\ No newline at end of file
Application/Controller/PortController.php
View file @
3ff47aa1
...
@@ -24,6 +24,12 @@ class PortController extends Controller
...
@@ -24,6 +24,12 @@ class PortController extends Controller
'count'
=>
1
,
'count'
=>
1
,
],
],
'0b'
=>
[
'logic'
=>
1
,
'mac'
=>
8
,
'state'
=>
1
,
]
];
];
...
@@ -112,6 +118,16 @@ class PortController extends Controller
...
@@ -112,6 +118,16 @@ class PortController extends Controller
$port
->
offline
(
$offlinePortId
);
$port
->
offline
(
$offlinePortId
);
}
public
function
portState
()
{
$portMac
=
$this
->
get
(
'mac'
);
$state
=
$this
->
get
(
'state'
);
}
}
...
...
Application/Controller/PowerController.php
View file @
3ff47aa1
...
@@ -11,6 +11,7 @@ namespace Application\Controller;
...
@@ -11,6 +11,7 @@ namespace Application\Controller;
use
Application\Controller
;
use
Application\Controller
;
use
Application\Model\OrderModel
;
use
Application\Model\OrderModel
;
use
Lib\port\Port
;
class
PowerController
extends
Controller
class
PowerController
extends
Controller
{
{
...
@@ -30,14 +31,21 @@ class PowerController extends Controller
...
@@ -30,14 +31,21 @@ class PowerController extends Controller
'orderId'
=>
6
,
'orderId'
=>
6
,
'logic'
=>
1
,
'logic'
=>
1
,
'state'
=>
1
,
'state'
=>
1
,
'capacity'
=>
4
'capacity'
=>
4
,
],
],
'07'
=>
[
'07'
=>
[
'logic'
=>
1
,
'logic'
=>
1
,
'startTime'
=>
4
,
'startTime'
=>
4
,
'intervalTime'
=>
1
,
'intervalTime'
=>
1
,
'count'
=>
1
'count'
=>
1
,
],
'17'
=>
[
'logic'
=>
1
,
'power'
=>
2
,
'capacity'
=>
2
,
'state'
=>
1
,
],
],
];
];
...
@@ -52,29 +60,58 @@ class PowerController extends Controller
...
@@ -52,29 +60,58 @@ class PowerController extends Controller
$orderId
=
$this
->
get
(
'orderId'
);
$orderId
=
$this
->
get
(
'orderId'
);
if
(
$type
==
1
)
if
(
$type
==
1
)
{
{
$logic
=
$this
->
get
(
'logic'
);
$logic
=
$this
->
get
(
'logic'
);
$power
=
$this
->
get
(
'capacity'
);
$power
=
$this
->
get
(
'capacity'
);
$state
=
$this
->
get
(
'state'
);
$state
=
hexdec
(
$this
->
get
(
'state'
)
);
$orderModel
=
new
OrderModel
();
$orderModel
=
new
OrderModel
();
$id
=
hexdec
(
$orderId
);
$id
=
hexdec
(
$orderId
);
$row
=
$orderModel
->
update
([
'is_charger'
=>
$state
,
'start_capacity'
=>
$power
],
'id = '
.
$id
);
$_SESSION
[
'current_order_id'
]
=
$id
;
switch
(
$state
)
{
case
0
:
$state
=
-
1
;
break
;
case
1
:
$state
=
2
;
break
;
case
2
:
$state
=
6
;
break
;
default
:
break
;
}
$_SESSION
[
'current_order_id'
]
=
$id
;
$_SESSION
[
'order_state'
]
=
$state
;
$row
=
$orderModel
->
update
([
'is_charger'
=>
$state
,
'start_capacity'
=>
$power
],
'id = '
.
$id
);
$portId
=
$orderModel
->
getPortId
(
$id
);
$port
=
new
Port
();
if
(
hexdec
(
$state
)
==
2
)
{
$port
->
setPortState
([
$portId
=>
$state
+
2
]);
//todo websocket推送给前段开始充电信息,如果未发现当前订单id连接则存入消息队列当中
//todo websocket推送给前段开始充电信息,如果未发现当前订单id连接则存入消息队列当中
}
}
}
$this
->
response
->
send
(
'14'
,
$orderId
);
$this
->
response
->
send
(
'14'
,
$orderId
);
}
}
...
@@ -99,39 +136,93 @@ class PowerController extends Controller
...
@@ -99,39 +136,93 @@ class PowerController extends Controller
$orderModel
=
new
OrderModel
();
$orderModel
=
new
OrderModel
();
$orderModel
->
update
([
'is_stop'
=>
$state
,
'end_capacity'
=>
$capacity
],
' id = '
.
$id
);
// 存储数据库
$orderModel
->
update
([
'is_stop'
=>
$state
,
'end_capacity'
=>
$capacity
],
' id = '
.
$id
);
//todo 发送微信消息给用户。
//todo 充电结束时删除端口正在使用的hash表中的元素,删除充电用户正在充电订单中的本次订单
//todo 存储数据库
$this
->
response
->
send
(
'15'
,
$orderId
);
$this
->
response
->
send
(
'15'
,
$orderId
);
}
}
/**
/**
*
*
* |0|计时结束|
* |1|远程关闭|
* |2|插头脱落|
* |3|充满自停|
* |4|功率超限|
* |5|关闭失败|
* |6|插头插上,正常充电|
* 上报充电功率
* 上报充电功率
*/
*/
public
function
power
()
public
function
power
()
{
{
//todo 依据状态修改订单中的状态,本地缓存该笔订单的状态,状态不发生改变则不更新数据库
$logic
=
$this
->
get
(
'logic'
);
$logic
=
$this
->
get
(
'logic'
);
$startTime
=
$this
->
get
(
'startTime'
);
$startTime
=
$this
->
get
(
'startTime'
);
$count
=
$this
->
get
(
'count'
);
$count
=
$this
->
get
(
'count'
);
$powerData
=
substr
(
$this
->
message
,
$this
->
plc
,
hexdec
(
$count
)
*
4
);
$powerData
=
substr
(
$this
->
message
,
$this
->
plc
,
hexdec
(
$count
)
*
4
);
$powerData
=
str_split
(
$powerData
,
4
);
$powerData
=
str_split
(
$powerData
,
4
);
$this
->
plc
+=
hexdec
(
$count
)
*
4
;
$this
->
plc
+=
hexdec
(
$count
)
*
4
;
$capacity
=
substr
(
$this
->
message
,
$this
->
plc
);
$capacity
=
substr
(
$this
->
message
,
$this
->
plc
);
$capacity
=
str_split
(
$capacity
,
8
);
$capacity
=
str_split
(
$capacity
,
8
);
var_dump
(
$powerData
);
var_dump
(
$powerData
);
var_dump
(
$capacity
);
var_dump
(
$capacity
);
}
/**
* 上报功率
* command 17
*/
public
function
onePower
()
{
$logicNum
=
$this
->
get
(
'logic'
);
$powerData
=
$this
->
get
(
'power'
);
$capacity
=
$this
->
get
(
'capacity'
);
$state
=
hexdec
(
$this
->
get
(
'state'
));
$orderLastState
=
$_SESSION
[
'order_state'
];
if
(
$orderLastState
!=
$state
)
{
// $orderModel = new OrderModel();
$port
=
new
Port
();
// $port->setPortState([
//
// ])
$orderId
=
$_SESSION
[
'current_order_id'
];
// $row = $orderModel->update(['state' => $state] ,'id = '.$orderId);
}
}
}
...
@@ -172,3 +263,16 @@ class PowerController extends Controller
...
@@ -172,3 +263,16 @@ class PowerController extends Controller
Application/Events.php
View file @
3ff47aa1
...
@@ -15,7 +15,7 @@ use Lib\Route;
...
@@ -15,7 +15,7 @@ use Lib\Route;
use
Lib\Log
;
use
Lib\Log
;
define
(
'APP'
,
'Application\\Controller\\'
);
define
(
'APP'
,
'Application\\Controller\\'
);
class
Events
class
Events
{
{
...
@@ -48,12 +48,11 @@ class Events
...
@@ -48,12 +48,11 @@ class Events
static
::
$redis
->
select
(
4
);
static
::
$redis
->
select
(
4
);
try
{
try
{
static
::
$db
=
new
Connection
(
Env
::
get
(
'DB_HOST'
),
Env
::
get
(
'DB_PORT'
),
Env
::
get
(
'DB_USER'
),
Env
::
get
(
'DB_PASSWORD'
),
Env
::
get
(
'DB_NAME'
));
static
::
$db
=
new
Connection
(
Env
::
get
(
'DB_HOST'
),
Env
::
get
(
'DB_PORT'
),
Env
::
get
(
'DB_USER'
),
Env
::
get
(
'DB_PASSWORD'
),
Env
::
get
(
'DB_NAME'
));
}
catch
(
Exception
$exception
)
}
catch
(
Exception
$exception
)
{
{
var_dump
(
$exception
->
getMessage
());
var_dump
(
$exception
->
getMessage
());
}
}
...
@@ -64,47 +63,43 @@ class Events
...
@@ -64,47 +63,43 @@ class Events
public
static
function
onConnect
(
$clientId
)
public
static
function
onConnect
(
$clientId
)
{
{
Log
::
debug
(
'connect'
,[
Log
::
debug
(
'connect'
,
[
'time'
=>
date
(
'H:i:s'
)
'time'
=>
date
(
'H:i:s'
)
,
]);
]);
}
}
public
static
function
onMessage
(
$clientId
,
$message
)
public
static
function
onMessage
(
$clientId
,
$message
)
{
{
var_dump
(
$message
);
var_dump
(
$message
);
$crc
=
substr
(
$message
,
-
2
);
$crc
=
substr
(
$message
,
-
2
);
$makeCrc
=
sprintf
(
'%08x'
,
(
Crc
::
crc
(
substr
(
$message
,
0
,
-
2
))));
$makeCrc
=
sprintf
(
'%08x'
,
(
Crc
::
crc
(
substr
(
$message
,
0
,
-
2
))));
if
(
$crc
!=
substr
(
$makeCrc
,
0
,
2
))
if
(
$crc
!=
substr
(
$makeCrc
,
0
,
2
))
{
{
Gateway
::
closeClient
(
$clientId
);
Gateway
::
closeClient
(
$clientId
);
}
else
{
}
else
{
$command
=
substr
(
$message
,
6
,
2
);
$command
=
substr
(
$message
,
6
,
2
);
$route
=
Api
::
getRoute
(
$command
);
$route
=
Api
::
getRoute
(
$command
);
if
(
$route
instanceof
Route
)
if
(
$route
instanceof
Route
)
{
{
$controllerName
=
$route
->
getController
();
$controllerName
=
$route
->
getController
();
$method
=
$route
->
getMethod
();
$method
=
$route
->
getMethod
();
$controllerName
=
APP
.
$controllerName
;
$controllerName
=
APP
.
$controllerName
;
//去除crc字节
//去除crc字节
$message
=
substr
(
$message
,
0
,
-
2
);
$message
=
substr
(
$message
,
0
,
-
2
);
$message
=
mb_strtoupper
(
$message
);
$message
=
mb_strtoupper
(
$message
);
...
@@ -113,16 +108,19 @@ class Events
...
@@ -113,16 +108,19 @@ class Events
foreach
(
$middleware
as
$item
)
{
foreach
(
$middleware
as
$item
)
{
if
(
$item
instanceof
\Application\Middleware
)
if
(
$item
instanceof
\Application\Middleware
)
{
{
if
(
$item
->
handle
(
$clientId
,
$message
)
===
false
)
{
if
(
$item
->
handle
(
$clientId
,
$message
)
===
false
)
{
try
{
Gateway
::
closeCurrentClient
();
Gateway
::
closeCurrentClient
();
}
catch
(
Exception
$e
)
{
}
}
}
}
}
}
}
$controller
=
new
$controllerName
(
$clientId
,
$message
,
$command
);
$controller
=
new
$controllerName
(
$clientId
,
$message
,
$command
);
$controller
->
$method
();
$controller
->
$method
();
...
@@ -132,13 +130,30 @@ class Events
...
@@ -132,13 +130,30 @@ class Events
}
}
}
}
/**
*
* @param $clientId
*/
public
static
function
onClose
(
$clientId
)
public
static
function
onClose
(
$clientId
)
{
{
//fixme 网关离线将往下所有的口子全部设置为离线
if
(
!
isset
(
$_SESSION
[
'port_mac_id'
]))
return
;
$portMacIdArray
=
$_SESSION
[
'port_mac_id'
];
if
(
isset
(
$portMacIdArray
))
{
$port
=
new
\Lib\port\Port
();
$port
->
offline
(
array_values
(
$portMacIdArray
));
}
}
}
...
...
Application/Model/OrderModel.php
View file @
3ff47aa1
...
@@ -14,9 +14,19 @@ use Application\Model;
...
@@ -14,9 +14,19 @@ use Application\Model;
class
OrderModel
extends
Model
class
OrderModel
extends
Model
{
{
protected
$table
=
'wx_charger_order'
;
protected
$table
=
'wx_charger_order
s
'
;
/**
* @param int $orderId
* @return string
*/
public
function
getPortId
(
int
$orderId
)
{
return
$this
->
getColumn
(
'port_id'
,
'id = '
.
$orderId
);
}
}
}
\ No newline at end of file
Application/Model/PortModel.php
View file @
3ff47aa1
...
@@ -14,7 +14,7 @@ use Application\Model;
...
@@ -14,7 +14,7 @@ use Application\Model;
class
PortModel
extends
Model
class
PortModel
extends
Model
{
{
protected
$table
=
'
port
s'
;
protected
$table
=
'
device
s'
;
...
...
Lib/Response.php
View file @
3ff47aa1
...
@@ -96,7 +96,7 @@ class Response
...
@@ -96,7 +96,7 @@ class Response
$crc
=
substr
(
sprintf
(
'%08x'
,
Crc
::
crc
(
$exceptCrc
)),
0
,
2
);
$crc
=
substr
(
sprintf
(
'%08x'
,
Crc
::
crc
(
$exceptCrc
)),
0
,
2
);
var_dump
(
$exceptCrc
.
$crc
);
var_dump
(
'message:'
.
PHP_EOL
.
$exceptCrc
.
$crc
);
return
$exceptCrc
.
$crc
;
return
$exceptCrc
.
$crc
;
...
...
Lib/port/Port.php
View file @
3ff47aa1
...
@@ -14,6 +14,7 @@ use Lib\redis\RedisKey;
...
@@ -14,6 +14,7 @@ use Lib\redis\RedisKey;
class
Port
class
Port
{
{
private
$mac
;
private
$mac
;
private
$id
;
private
$id
;
...
@@ -38,13 +39,13 @@ class Port
...
@@ -38,13 +39,13 @@ class Port
* @param array $idLogic
* @param array $idLogic
* @param int $gatewayId
* @param int $gatewayId
*/
*/
public
function
register
(
array
$idLogic
,
int
$gatewayId
)
public
function
register
(
array
$idLogic
,
int
$gatewayId
)
{
{
$this
->
redis
->
hMset
(
RedisKey
::
PORT_ID_LOGIC_HASH
,
$idLogic
);
$this
->
redis
->
hMset
(
RedisKey
::
PORT_ID_LOGIC_HASH
,
$idLogic
);
$this
->
redis
->
hMset
(
'gateway_id_'
.
":
$gatewayId
"
.
RedisKey
::
GATEWAY_PORT_LOGIC_ID_HASH
,
array_flip
(
$idLogic
));
$this
->
redis
->
hMset
(
'gateway_id_'
.
":
$gatewayId
"
.
RedisKey
::
GATEWAY_PORT_LOGIC_ID_HASH
,
array_flip
(
$idLogic
));
}
}
...
@@ -61,29 +62,49 @@ class Port
...
@@ -61,29 +62,49 @@ class Port
* @param $gatewayId
* @param $gatewayId
* @return array
* @return array
*/
*/
public
function
getPortId
(
array
$logicId
,
$gatewayId
)
public
function
getPortId
(
array
$logicId
,
$gatewayId
)
{
{
return
$this
->
redis
->
hMGet
(
'gateway_id_'
.
"
$gatewayId
"
.
RedisKey
::
GATEWAY_PORT_LOGIC_ID_HASH
,
$logicId
);
return
$this
->
redis
->
hMGet
(
'gateway_id_'
.
"
$gatewayId
"
.
RedisKey
::
GATEWAY_PORT_LOGIC_ID_HASH
,
$logicId
);
}
}
/**
* 设置端口的状态
* 端口zset中,gateway的端口zset
* @param array $portIdState
*/
public
function
setPortState
(
array
$portIdState
)
public
function
setPortState
(
array
$portIdState
)
{
{
$tmp
=
[
RedisKey
::
PORT_STATE_ZSET
];
$tmp
=
[
RedisKey
::
PORT_STATE_ZSET
];
foreach
(
$portIdState
as
$id
=>
$state
)
{
foreach
(
$portIdState
as
$id
=>
$state
)
{
array_push
(
$tmp
,
$state
);
array_push
(
$tmp
,
$state
);
array_push
(
$tmp
,
$id
);
array_push
(
$tmp
,
$id
);
}
}
call_user_func_array
([
$this
->
redis
,
'zAdd'
],
$tmp
);
$this
->
pipe
();
call_user_func_array
([
$this
->
redis
,
'zAdd'
],
$tmp
);
$tmp
[
0
]
=
RedisKey
::
GATEWAY_PORT_STATE
.
$_SESSION
[
'gateway_id'
];
call_user_func_array
([
$this
->
redis
,
'zAdd'
],
$tmp
);
$tmp
[
0
]
=
RedisKey
::
STATION_PORT_STATE
.
$_SESSION
[
'station_id'
];
call_user_func_array
([
$this
->
redis
,
'zAdd'
],
$tmp
);
$this
->
exec
();
}
}
/**
/**
* 端口id在线
* 端口id在线
* @param array $portId
* @param array $portId
...
@@ -94,13 +115,27 @@ class Port
...
@@ -94,13 +115,27 @@ class Port
foreach
(
$portId
as
$item
)
{
foreach
(
$portId
as
$item
)
{
array_push
(
$tmp
,
1
);
array_push
(
$tmp
,
1
);
array_push
(
$tmp
,
$item
);
array_push
(
$tmp
,
$item
);
}
}
call_user_func_array
([
$this
->
redis
,
'zAdd'
],
$tmp
);
$this
->
pipe
();
call_user_func_array
([
$this
->
redis
,
'zAdd'
],
$tmp
);
$tmp
[
0
]
=
RedisKey
::
GATEWAY_PORT_STATE
.
$_SESSION
[
'gateway_id'
];
call_user_func_array
([
$this
->
redis
,
'zAdd'
],
$tmp
);
$tmp
[
0
]
=
RedisKey
::
STATION_PORT_STATE
.
$_SESSION
[
'station_id'
];
call_user_func_array
([
$this
->
redis
,
'zAdd'
],
$tmp
);
$this
->
exec
();
}
}
...
@@ -112,16 +147,28 @@ class Port
...
@@ -112,16 +147,28 @@ class Port
{
{
$tmp
=
[
RedisKey
::
PORT_STATE_ZSET
];
$tmp
=
[
RedisKey
::
PORT_STATE_ZSET
];
foreach
(
$portId
as
$item
)
{
foreach
(
$portId
as
$item
)
{
array_push
(
$tmp
,
0
);
array_push
(
$tmp
,
0
);
array_push
(
$tmp
,
$item
);
array_push
(
$tmp
,
$item
);
}
}
call_user_func_array
([
$this
->
redis
,
'zAdd'
],
$tmp
);
$this
->
pipe
();
call_user_func_array
([
$this
->
redis
,
'zAdd'
],
$tmp
);
$tmp
[
0
]
=
RedisKey
::
GATEWAY_PORT_STATE
.
$_SESSION
[
'gateway_id'
];
call_user_func_array
([
$this
->
redis
,
'zAdd'
],
$tmp
);
$tmp
[
0
]
=
RedisKey
::
STATION_PORT_STATE
.
$_SESSION
[
'station_id'
];
call_user_func_array
([
$this
->
redis
,
'zAdd'
],
$tmp
);
$this
->
exec
();
}
}
public
function
exec
()
public
function
exec
()
...
...
Lib/redis/RedisKey.php
View file @
3ff47aa1
...
@@ -30,6 +30,9 @@ class RedisKey
...
@@ -30,6 +30,9 @@ class RedisKey
//端口状态有续集合
//端口状态有续集合
const
PORT_STATE_ZSET
=
'port:id_state:zset'
;
const
PORT_STATE_ZSET
=
'port:id_state:zset'
;
const
GATEWAY_PORT_STATE
=
'gateway:port:state:'
;
const
STATION_PORT_STATE
=
'station:port:state:'
;
}
}
\ No newline at end of file
Route/Api.php
View file @
3ff47aa1
...
@@ -21,6 +21,8 @@ class Api
...
@@ -21,6 +21,8 @@ class Api
public
static
function
boot
()
public
static
function
boot
()
{
{
static
::
add
(
'00'
,
'HeartController@heart'
);
static
::
add
(
'01'
,
'CertifyController@certify'
);
static
::
add
(
'01'
,
'CertifyController@certify'
);
static
::
add
(
'02'
,
'AccessController@access'
);
static
::
add
(
'02'
,
'AccessController@access'
);
...
@@ -33,6 +35,12 @@ class Api
...
@@ -33,6 +35,12 @@ class Api
static
::
add
(
'09'
,
'PortController@offline'
,[
new
AuthMiddleware
(),
new
HasMacMiddleware
()]);
static
::
add
(
'09'
,
'PortController@offline'
,[
new
AuthMiddleware
(),
new
HasMacMiddleware
()]);
static
::
add
(
'07'
,
'PowerController@power'
,[
new
AuthMiddleware
(),
new
HasMacMiddleware
()]);
static
::
add
(
'17'
,
'PowerController@onePower'
,[
new
AuthMiddleware
(),
new
HasMacMiddleware
()]);
static
::
add
(
'0b'
,
'PortController@portState'
,[
new
AuthMiddleware
(),
new
HasMacMiddleware
()]);
}
}
public
static
function
add
(
string
$command
,
string
$controllerAction
,
array
$middleware
=
[])
public
static
function
add
(
string
$command
,
string
$controllerAction
,
array
$middleware
=
[])
...
...
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