Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cdz_gateway_v2
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_v2
Commits
0b01c7ed
Commit
0b01c7ed
authored
Nov 16, 2018
by
banice
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新开始充,用电量错误
parent
93410bf8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
287 additions
and
181 deletions
+287
-181
.idea/workspace.xml
+0
-0
application/Events.php
+13
-14
application/controller/accept/AccessController.php
+119
-90
application/controller/business/charger/OverController.php
+13
-11
application/controller/business/charger/StartController.php
+0
-5
application/controller/business/port/OfflineController.php
+11
-8
application/controller/business/port/OnlineController.php
+4
-1
application/controller/business/port/StateController.php
+7
-2
application/controller/card/BalanceController.php
+8
-4
application/controller/card/PayRuleController.php
+0
-5
application/controller/card/charger/RequestController.php
+17
-17
application/controller/update/QueryController.php
+15
-5
application/model/CardModel.php
+2
-1
application/model/UserModel.php
+19
-0
lib/cdz/order/Order.php
+19
-0
lib/cdz/order/save/OrderSaveRedis.php
+0
-2
lib/cdz/order/state/WaitingState.php
+23
-14
lib/log/Log.php
+0
-1
lib/station/gateway/port/Port.php
+17
-1
No files found.
.idea/workspace.xml
View file @
0b01c7ed
This diff is collapsed.
Click to expand it.
application/Events.php
View file @
0b01c7ed
...
@@ -134,10 +134,11 @@ class Events
...
@@ -134,10 +134,11 @@ class Events
$exceptionModel
=
new
\Application\model\ExceptionModel
();
$exceptionModel
=
new
\Application\model\ExceptionModel
();
if
(
isset
(
$_SESSION
[
'station_id'
])
&&
isset
(
$_SESSION
[
'gateway_id'
]))
{
if
(
isset
(
$_SESSION
[
'station_id'
])
&&
isset
(
$_SESSION
[
'gateway_id'
]))
{
$exceptionModel
->
insertRow
([
$exceptionModel
->
insertRow
([
'message'
=>
'网关离线'
,
'message'
=>
'网关离线'
,
'gateway_id'
=>
$gatewayId
,
'gateway_id'
=>
$gatewayId
,
'station_id'
=>
$stationId
,
'station_id'
=>
$stationId
,
'type'
=>
1
,
'type'
=>
1
,
'created_at'
=>
date
(
'Y-m-d H:i:s'
),
]);
]);
}
}
...
@@ -163,8 +164,6 @@ class Events
...
@@ -163,8 +164,6 @@ class Events
$orderExceptionModel
=
new
\Application\model\OrderExceptionModel
();
$orderExceptionModel
=
new
\Application\model\OrderExceptionModel
();
$date
=
date
(
'Y-m-d H:i:s'
);
$date
=
date
(
'Y-m-d H:i:s'
);
foreach
(
$portsId
as
$portId
)
{
foreach
(
$portsId
as
$portId
)
{
//所有端口状态设置为离线
//所有端口状态设置为离线
...
@@ -177,10 +176,10 @@ class Events
...
@@ -177,10 +176,10 @@ class Events
$exceptionModel
->
insertRow
([
$exceptionModel
->
insertRow
([
'gateway_id'
=>
$gatewayId
,
'gateway_id'
=>
$gatewayId
,
'station_id'
=>
$stationId
,
'station_id'
=>
$stationId
,
'port_id'
=>
$portId
,
'port_id'
=>
$portId
,
'message'
=>
'口子离线'
,
'message'
=>
'口子离线'
,
'created_at'
=>
$date
,
'created_at'
=>
$date
,
'type'
=>
1
,
'type'
=>
1
,
]);
]);
$portUsingOrderId
=
$port
->
getPortUsingOrderId
();
$portUsingOrderId
=
$port
->
getPortUsingOrderId
();
...
@@ -197,10 +196,10 @@ class Events
...
@@ -197,10 +196,10 @@ class Events
$orderExceptionModel
->
insertRow
([
$orderExceptionModel
->
insertRow
([
'order_id'
=>
$order
->
getId
(),
'order_id'
=>
$order
->
getId
(),
'state'
=>
\Lib\StateCode
::
PORT_OFFLINE
,
'state'
=>
\Lib\StateCode
::
PORT_OFFLINE
,
'created_at'
=>
date
(
'Y-m-d H:i:s'
),
'created_at'
=>
date
(
'Y-m-d H:i:s'
),
'desc'
=>
'网关离线,订单离线'
,
'desc'
=>
'网关离线,订单离线'
,
]);
]);
...
@@ -213,10 +212,10 @@ class Events
...
@@ -213,10 +212,10 @@ class Events
$broadcastToAgent
->
broadcast
([
$broadcastToAgent
->
broadcast
([
'notice_exception_code'
=>
15
,
'notice_exception_code'
=>
15
,
'gateway_id'
=>
$gatewayId
,
'gateway_id'
=>
$gatewayId
,
'station_id'
=>
$stationId
,
'station_id'
=>
$stationId
,
'station_name'
=>
$stationName
,
'station_name'
=>
$stationName
,
'gateway_mac'
=>
isset
(
$_SESSION
[
'gateway_mac'
])
?
$_SESSION
[
'gateway_mac'
]
:
''
,
'gateway_mac'
=>
isset
(
$_SESSION
[
'gateway_mac'
])
?
$_SESSION
[
'gateway_mac'
]
:
''
,
]);
]);
...
...
application/controller/accept/AccessController.php
View file @
0b01c7ed
...
@@ -11,7 +11,9 @@ namespace Application\controller\accept;
...
@@ -11,7 +11,9 @@ namespace Application\controller\accept;
use
Application\controller\Controller
;
use
Application\controller\Controller
;
use
Application\model\DeviceModel
;
use
Application\model\DeviceModel
;
use
Application\model\GatewayLogModel
;
use
Application\model\GatewayModel
;
use
Application\model\GatewayModel
;
use
Application\model\OrderExceptionModel
;
use
Application\model\ParkModel
;
use
Application\model\ParkModel
;
use
Application\model\StationModel
;
use
Application\model\StationModel
;
use
Lib\cdz\order\Order
;
use
Lib\cdz\order\Order
;
...
@@ -48,93 +50,95 @@ class AccessController extends Controller
...
@@ -48,93 +50,95 @@ class AccessController extends Controller
}
}
private
function
test
(
$mac
)
// private function test($mac)
{
// {
//
//
Gateway
::
bindUid
(
$this
->
clientId
,
$mac
);
// Gateway::bindUid($this->clientId, $mac);
//
$_SESSION
[
'gateway_mac'
]
=
$mac
;
// $_SESSION['gateway_mac'] = $mac;
$gatewayModel
=
new
GatewayModel
();
// $gatewayModel = new GatewayModel();
//
//
if
(
isset
(
$_SESSION
[
'gateway_mac'
]))
{
// if (isset($_SESSION['gateway_mac'])) {
if
(
$_SESSION
[
'gateway_mac'
]
!=
$mac
)
{
// if ($_SESSION['gateway_mac'] != $mac) {
Gateway
::
closeClient
(
$this
->
clientId
);
// Gateway::closeClient($this->clientId);
//
}
// }
//
$gatewayModelResult
=
$gatewayModel
->
getColumns
([
// $gatewayModelResult = $gatewayModel->getColumns([
'station_id'
,
// 'station_id',
'id'
,
// 'id',
'name'
,
// 'name',
'type_id'
// 'type_id'
],
'mac_address = '
.
"'
$mac
'"
);
// ], 'mac_address = ' . "'$mac'");
//
if
(
$gatewayModelResult
==
false
)
{
// if ($gatewayModelResult == false) {
Gateway
::
closeClient
(
$this
->
clientId
);
// Gateway::closeClient($this->clientId);
return
;
// return;
}
// }
$stationId
=
$gatewayModelResult
[
'station_id'
];
// $stationId = $gatewayModelResult['station_id'];
//
$gatewayId
=
$gatewayModelResult
[
'id'
];
// $gatewayId = $gatewayModelResult['id'];
//
$_SESSION
[
'gateway_name'
]
=
$gatewayModelResult
[
'name'
];
// $_SESSION['gateway_name'] = $gatewayModelResult['name'];
//
$_SESSION
[
'gateway_id'
]
=
$gatewayModelResult
[
'id'
];
// $_SESSION['gateway_id'] = $gatewayModelResult['id'];
//
$_SESSION
[
'gateway_type'
]
=
$gatewayModelResult
[
'type_id'
];
// $_SESSION['gateway_type'] = $gatewayModelResult['type_id'];
//
$stationModel
=
new
StationModel
();
// $stationModel = new StationModel();
$stationData
=
$stationModel
->
getColumns
([
// $stationData = $stationModel->getColumns([
'park_id'
,
// 'park_id',
'name'
,
// 'name',
],
'id = '
.
$stationId
);
// ], 'id = ' . $stationId);
//
if
(
isset
(
$stationData
[
'park_id'
])
&&
isset
(
$stationData
[
'name'
]))
{
// if (isset($stationData['park_id']) && isset($stationData['name'])) {
$parkId
=
$stationData
[
'park_id'
];
// $parkId = $stationData['park_id'];
$_SESSION
[
'station_name'
]
=
$stationData
[
'name'
];
// $_SESSION['station_name'] = $stationData['name'];
if
(
isset
(
$parkId
))
{
// if (isset($parkId)) {
$parkModel
=
new
ParkModel
();
// $parkModel = new ParkModel();
$_SESSION
[
'park_id'
]
=
$parkId
;
// $_SESSION['park_id'] = $parkId;
$agentId
=
$parkModel
->
getColumn
(
'agent_id'
,
'id = '
.
$parkId
);
// $agentId = $parkModel->getColumn('agent_id', 'id = ' . $parkId);
if
(
isset
(
$agentId
))
{
// if (isset($agentId)) {
$_SESSION
[
'agent_id'
]
=
$agentId
;
// $_SESSION['agent_id'] = $agentId;
}
// }
//
}
// }
//
}
// }
//
//
$deviceModel
=
new
DeviceModel
();
// $deviceModel = new DeviceModel();
//
$deviceModelResult
=
$deviceModel
->
getAllColumns
([
// $deviceModelResult = $deviceModel->getAllColumns([
//
'id'
,
// 'id',
'device_mac'
,
// 'device_mac',
'name'
,
// 'name',
],
'gateway_id = '
.
$gatewayId
);
// 'status_id',
// ], 'gateway_id = ' . $gatewayId);
$tmp
=
[];
//
$portsIdName
=
[];
// $tmp = [];
// $portsIdName = [];
foreach
(
$deviceModelResult
as
$item
)
{
// $portsStatus = [];
// foreach ($deviceModelResult as $item) {
$tmp
[
$item
[
'device_mac'
]]
=
$item
[
'id'
];
//
$portsIdName
[
$item
[
'id'
]]
=
$item
[
'name'
];
// $tmp[$item['device_mac']] = $item['id'];
// $portsIdName[$item['id']] = $item['name'];
}
// $portsStatus[$item['id']] = $item['status_id'];
$_SESSION
[
'port_id_name'
]
=
$portsIdName
;
// }
$_SESSION
[
'port_mac_id'
]
=
$tmp
;
// $_SESSION['port_id_status'] = $portsStatus;
$_SESSION
[
'port_id_mac'
]
=
array_flip
(
$tmp
);
// $_SESSION['port_id_name'] = $portsIdName;
// $_SESSION['port_mac_id'] = $tmp;
$_SESSION
[
'station_id'
]
=
$stationId
;
// $_SESSION['port_id_mac'] = array_flip($tmp);
$_SESSION
[
'gateway_id'
]
=
$gatewayId
;
//
$_SESSION
[
'client_id'
]
=
$this
->
clientId
;
// $_SESSION['station_id'] = $stationId;
// $_SESSION['gateway_id'] = $gatewayId;
}
// $_SESSION['client_id'] = $this->clientId;
}
//
// }
// }
/**
/**
* 请求入网
* 请求入网
...
@@ -212,19 +216,22 @@ class AccessController extends Controller
...
@@ -212,19 +216,22 @@ class AccessController extends Controller
'id'
,
'id'
,
'device_mac'
,
'device_mac'
,
'name'
,
'name'
,
'status_id'
],
'gateway_id = '
.
$gatewayId
);
],
'gateway_id = '
.
$gatewayId
);
$tmp
=
[];
$tmp
=
[];
$portsIdName
=
[];
$portsIdName
=
[];
$portsStatus
=
[];
foreach
(
$deviceModelResult
as
$item
)
{
foreach
(
$deviceModelResult
as
$item
)
{
$tmp
[
$item
[
'device_mac'
]]
=
$item
[
'id'
];
$tmp
[
$item
[
'device_mac'
]]
=
$item
[
'id'
];
$portsIdName
[
$item
[
'id'
]]
=
$item
[
'name'
];
$portsIdName
[
$item
[
'id'
]]
=
$item
[
'name'
];
$portsStatus
[
$item
[
'id'
]]
=
$item
[
'status_id'
];
}
}
$_SESSION
[
'port_id_name'
]
=
$portsIdName
;
$_SESSION
[
'port_id_name'
]
=
$portsIdName
;
$_SESSION
[
'port_mac_id'
]
=
$tmp
;
$_SESSION
[
'port_mac_id'
]
=
$tmp
;
$_SESSION
[
'port_id_status'
]
=
$portsStatus
;
$_SESSION
[
'port_id_mac'
]
=
array_flip
(
$tmp
);
$_SESSION
[
'port_id_mac'
]
=
array_flip
(
$tmp
);
$_SESSION
[
'station_id'
]
=
$stationId
;
$_SESSION
[
'station_id'
]
=
$stationId
;
...
@@ -300,6 +307,8 @@ class AccessController extends Controller
...
@@ -300,6 +307,8 @@ class AccessController extends Controller
}
}
$logicStartTmp
=
$logicStart
;
$logicStartTmp
=
$logicStart
;
$portsIdStatus
=
$_SESSION
[
'port_id_status'
];
foreach
(
$portMacState
as
$mac
=>
$state
)
{
foreach
(
$portMacState
as
$mac
=>
$state
)
{
$portId
=
isset
(
$portsMacId
[
$mac
])
?
$portsMacId
[
$mac
]
:
false
;
$portId
=
isset
(
$portsMacId
[
$mac
])
?
$portsMacId
[
$mac
]
:
false
;
...
@@ -307,9 +316,14 @@ class AccessController extends Controller
...
@@ -307,9 +316,14 @@ class AccessController extends Controller
continue
;
continue
;
}
}
$port
->
setPortId
(
$portId
);
$port
->
setPortId
(
$portId
);
if
(
isset
(
$portsIdStatus
[
$portId
]))
{
if
(
$portsIdStatus
[
$portId
]
===
8
)
{
$state
=
8
;
}
}
//设置端口状态
//设置端口状态
$port
->
setState
(
$state
);
$port
->
setState
(
$state
);
$port
->
setGatewayId
(
$_SESSION
[
'gateway_id'
]);
$port
->
setGatewayId
(
$_SESSION
[
'gateway_id'
]);
...
@@ -339,6 +353,9 @@ class AccessController extends Controller
...
@@ -339,6 +353,9 @@ class AccessController extends Controller
$orderCount
=
'00'
;
$orderCount
=
'00'
;
$orderExceptionModel
=
new
OrderExceptionModel
();
$gatewayLod
=
new
GatewayLogModel
();
foreach
(
$portsId
as
$portId
)
{
foreach
(
$portsId
as
$portId
)
{
$order
=
new
Order
();
$order
=
new
Order
();
...
@@ -370,13 +387,25 @@ class AccessController extends Controller
...
@@ -370,13 +387,25 @@ class AccessController extends Controller
$orderId
=
sprintf
(
'%012x'
,
$order
->
getId
());
$orderId
=
sprintf
(
'%012x'
,
$order
->
getId
());
$time
=
sprintf
(
'%04x'
,
$remainTime
);
$time
=
sprintf
(
'%04x'
,
$remainTime
);
$orderExceptionModel
->
insertRow
([
'order_id'
=>
$orderId
,
'state'
=>
'1011'
,
'created_at'
=>
date
(
'Y-m-d H:i:s'
),
'desc'
=>
'口子离线或断网后重新上线'
,
'data'
=>
json_encode
([
'remain_time'
=>
$time
,
'offline_reason'
=>
$offlineReason
,
])
]);
array_push
(
$responseOrder
,
$logicNum
.
$orderId
.
$time
);
array_push
(
$responseOrder
,
$logicNum
.
$orderId
.
$time
);
}
}
$port
->
setPortId
(
$portId
);
$port
->
setPortId
(
$portId
);
$port
->
setGatewayId
(
$_SESSION
[
'gateway_id'
]);
$port
->
setGatewayId
(
$_SESSION
[
'gateway_id'
]);
$port
->
setStationId
(
$_SESSION
[
'station_id'
]);
$port
->
setStationId
(
$_SESSION
[
'station_id'
]);
$port
->
setState
(
StateCode
::
PORT_CHARGER
);
// $port->setState(StateCode::PORT_CHARGER);
$port
->
setState
(
$order
->
getStateCode
());
$port
->
updatePortState
();
$port
->
updatePortState
();
...
...
application/controller/business/charger/OverController.php
View file @
0b01c7ed
...
@@ -27,9 +27,9 @@ class OverController extends Controller
...
@@ -27,9 +27,9 @@ class OverController extends Controller
protected
$parameterMap
=
[
protected
$parameterMap
=
[
'05'
=>
[
'05'
=>
[
'type'
=>
1
,
'type'
=>
1
,
'logic_id'
=>
1
,
'logic_id'
=>
1
,
'state'
=>
1
,
'state'
=>
1
,
'order_id'
=>
6
,
'order_id'
=>
6
,
'capacity'
=>
4
,
'capacity'
=>
4
,
]
]
...
@@ -67,10 +67,12 @@ class OverController extends Controller
...
@@ -67,10 +67,12 @@ class OverController extends Controller
if
(
$portId
!==
0
)
{
if
(
$portId
!==
0
)
{
$this
->
logRecord
->
setPortId
(
$portId
);
$this
->
logRecord
->
setPortId
(
$portId
);
}
}
// 逻辑地址不相同则认为已经更换过口子
// 逻辑地址不相同则认为已经更换过口子
// if ($logicId != $order->getPortLogicId()) {
if
(
$logicId
!=
$order
->
getPortLogicId
())
{
// $this->response->send('15', sprintf('%02x', $logicId) . sprintf('%012x', $orderId));
$this
->
response
->
send
(
'15'
,
sprintf
(
'%02x'
,
$logicId
)
.
sprintf
(
'%012x'
,
$orderId
));
// }
return
;
}
if
(
Gateway
::
isUidOnline
(
$order
->
getUserId
())
===
1
)
{
if
(
Gateway
::
isUidOnline
(
$order
->
getUserId
())
===
1
)
{
...
@@ -105,9 +107,9 @@ class OverController extends Controller
...
@@ -105,9 +107,9 @@ class OverController extends Controller
$orderModel
=
new
OrderModel
();
$orderModel
=
new
OrderModel
();
$orderModel
->
update
([
$orderModel
->
update
([
'is_stop'
=>
StateCode
::
FINISH_REFUND
,
'is_stop'
=>
StateCode
::
FINISH_REFUND
,
'end_capacity'
=>
$order
->
getEndCapacity
(),
'end_capacity'
=>
$order
->
getEndCapacity
(),
'end_time'
=>
date
(
'Y-m-d H:i:s'
),
'end_time'
=>
date
(
'Y-m-d H:i:s'
),
],
'id = '
.
$order
->
getId
());
],
'id = '
.
$order
->
getId
());
break
;
break
;
...
@@ -149,10 +151,10 @@ class OverController extends Controller
...
@@ -149,10 +151,10 @@ class OverController extends Controller
$orderExceptionModel
=
new
OrderExceptionModel
();
$orderExceptionModel
=
new
OrderExceptionModel
();
$orderExceptionModel
->
insertRow
([
$orderExceptionModel
->
insertRow
([
'order_id'
=>
$orderId
,
'order_id'
=>
$orderId
,
'created_at'
=>
date
(
'Y-m-d H:i:s'
),
'created_at'
=>
date
(
'Y-m-d H:i:s'
),
'state'
=>
'-1'
.
StateCode
::
CHANGE_PORT
,
'state'
=>
'-1'
.
StateCode
::
CHANGE_PORT
,
'desc'
=>
'更换口子,'
.
$portId
.
'关闭成功'
,
'desc'
=>
'更换口子,'
.
$portId
.
'关闭成功'
,
]);
]);
$this
->
logRecord
->
setDesc
(
'更换口子,'
.
$portId
.
'关闭成功'
);
$this
->
logRecord
->
setDesc
(
'更换口子,'
.
$portId
.
'关闭成功'
);
...
...
application/controller/business/charger/StartController.php
View file @
0b01c7ed
...
@@ -46,14 +46,9 @@ class StartController extends Controller
...
@@ -46,14 +46,9 @@ class StartController extends Controller
$logic
=
$this
->
getRequest
()
->
get
(
'logic_id'
);
$logic
=
$this
->
getRequest
()
->
get
(
'logic_id'
);
$state
=
hexdec
(
$this
->
getRequest
()
->
get
(
'state'
));
$state
=
hexdec
(
$this
->
getRequest
()
->
get
(
'state'
));
$orderId
=
hexdec
(
$this
->
getRequest
()
->
get
(
'order_id'
));
$orderId
=
hexdec
(
$this
->
getRequest
()
->
get
(
'order_id'
));
$this
->
logRecord
->
setOrderId
(
$orderId
);
$this
->
logRecord
->
setOrderId
(
$orderId
);
$capacity
=
hexdec
(
$this
->
getRequest
()
->
get
(
'capacity'
));
$capacity
=
hexdec
(
$this
->
getRequest
()
->
get
(
'capacity'
));
Log
::
debug
(
'order_id-->'
.
$orderId
);
Log
::
debug
(
'capacity-->'
.
$capacity
);
if
(
$type
==
1
)
{
if
(
$type
==
1
)
{
$order
=
new
Order
(
$orderId
);
$order
=
new
Order
(
$orderId
);
if
(
$order
->
getOrderCache
(
\Events
::
getRedis
())
==
false
)
{
if
(
$order
->
getOrderCache
(
\Events
::
getRedis
())
==
false
)
{
$this
->
response
->
send
(
'14'
,
sprintf
(
'%012x'
,
$orderId
));
$this
->
response
->
send
(
'14'
,
sprintf
(
'%012x'
,
$orderId
));
...
...
application/controller/business/port/OfflineController.php
View file @
0b01c7ed
...
@@ -85,18 +85,21 @@ class OfflineController extends Controller
...
@@ -85,18 +85,21 @@ class OfflineController extends Controller
Log
::
debug
(
'offline port_id'
.
$portId
);
Log
::
debug
(
'offline port_id'
.
$portId
);
$port
->
setPortId
(
$portId
);
$port
->
setPortId
(
$portId
);
if
(
$port
->
isPortBan
()
===
true
)
{
continue
;
}
$port
->
setStationId
(
$_SESSION
[
'station_id'
]);
$port
->
setStationId
(
$_SESSION
[
'station_id'
]);
$port
->
setGatewayId
(
$_SESSION
[
'gateway_id'
]);
$port
->
setGatewayId
(
$_SESSION
[
'gateway_id'
]);
$port
->
setState
(
StateCode
::
PORT_OFFLINE
);
$port
->
setState
(
StateCode
::
PORT_OFFLINE
);
$port
->
updatePortState
();
$port
->
updatePortState
();
// 记录口子离线
// 记录口子离线
$exceptionModel
->
insertRow
([
$exceptionModel
->
insertRow
([
'message'
=>
'口子离线'
,
'message'
=>
'口子离线'
,
'gateway_id'
=>
isset
(
$_SESSION
[
'gateway_id'
])
?
$_SESSION
[
'gateway_id'
]
:
''
,
'gateway_id'
=>
isset
(
$_SESSION
[
'gateway_id'
])
?
$_SESSION
[
'gateway_id'
]
:
''
,
'station_id'
=>
isset
(
$_SESSION
[
'station_id'
])
?
$_SESSION
[
'station_id'
]
:
''
,
'station_id'
=>
isset
(
$_SESSION
[
'station_id'
])
?
$_SESSION
[
'station_id'
]
:
''
,
'port_id'
=>
$portId
,
'port_id'
=>
$portId
,
'created_at'
=>
date
(
'Y-m-d H:i:s'
),
'created_at'
=>
date
(
'Y-m-d H:i:s'
),
'type'
=>
1
,
'type'
=>
1
,
]);
]);
}
}
...
@@ -105,11 +108,11 @@ class OfflineController extends Controller
...
@@ -105,11 +108,11 @@ class OfflineController extends Controller
$broadcastToAgent
->
broadcast
([
$broadcastToAgent
->
broadcast
([
'notice_exception_code'
=>
StateCode
::
PORT_OFFLINE
,
'notice_exception_code'
=>
StateCode
::
PORT_OFFLINE
,
'ports'
=>
$offlinePorts
,
'ports'
=>
$offlinePorts
,
'station_name'
=>
$_SESSION
[
'station_name'
],
'station_name'
=>
$_SESSION
[
'station_name'
],
'gateway_name'
=>
$_SESSION
[
'gateway_name'
],
'gateway_name'
=>
$_SESSION
[
'gateway_name'
],
'station_id'
=>
$_SESSION
[
'station_id'
],
'station_id'
=>
$_SESSION
[
'station_id'
],
'gateway_id'
=>
$_SESSION
[
'gateway_id'
],
'gateway_id'
=>
$_SESSION
[
'gateway_id'
],
]);
]);
}
}
...
...
application/controller/business/port/OnlineController.php
View file @
0b01c7ed
...
@@ -72,6 +72,9 @@ class OnlineController extends Controller
...
@@ -72,6 +72,9 @@ class OnlineController extends Controller
if
(
isset
(
$portsMacId
[
$portMac
]))
{
if
(
isset
(
$portsMacId
[
$portMac
]))
{
$portId
=
$portsMacId
[
$portMac
];
$portId
=
$portsMacId
[
$portMac
];
if
(
$port
->
isPortBan
()
===
true
)
{
continue
;
}
$port
->
setPortId
(
$portId
);
$port
->
setPortId
(
$portId
);
$port
->
setStationId
(
$_SESSION
[
'station_id'
]);
$port
->
setStationId
(
$_SESSION
[
'station_id'
]);
$port
->
setGatewayId
(
$_SESSION
[
'gateway_id'
]);
$port
->
setGatewayId
(
$_SESSION
[
'gateway_id'
]);
...
@@ -80,7 +83,7 @@ class OnlineController extends Controller
...
@@ -80,7 +83,7 @@ class OnlineController extends Controller
// 记录口子上线
// 记录口子上线
$exceptionModel
->
insertRow
([
$exceptionModel
->
insertRow
([
'port_id'
=>
$portId
,
'port_id'
=>
$portId
,
'gateway_id'
=>
isset
(
$_SESSION
[
'gateway_id'
])
?
$_SESSION
[
'gateway_id'
]
:
''
,
'gateway_id'
=>
isset
(
$_SESSION
[
'gateway_id'
])
?
$_SESSION
[
'gateway_id'
]
:
''
,
'station_id'
=>
isset
(
$_SESSION
[
'station_id'
])
?
$_SESSION
[
'station_id'
]
:
''
,
'station_id'
=>
isset
(
$_SESSION
[
'station_id'
])
?
$_SESSION
[
'station_id'
]
:
''
,
'created_at'
=>
date
(
'Y-m-d H:i:s'
),
'created_at'
=>
date
(
'Y-m-d H:i:s'
),
...
...
application/controller/business/port/StateController.php
View file @
0b01c7ed
...
@@ -29,8 +29,8 @@ class StateController extends Controller
...
@@ -29,8 +29,8 @@ class StateController extends Controller
'0B'
=>
[
'0B'
=>
[
'port_logic'
=>
1
,
'port_logic'
=>
1
,
'mac'
=>
8
,
'mac'
=>
8
,
'state'
=>
1
,
'state'
=>
1
,
]
]
];
];
...
@@ -68,7 +68,10 @@ class StateController extends Controller
...
@@ -68,7 +68,10 @@ class StateController extends Controller
$port
=
new
Port
(
$portId
);
$port
=
new
Port
(
$portId
);
if
(
$port
->
isPortBan
()
===
true
)
{
return
;
}
$usingOrderId
=
$port
->
getPortUsingOrderId
();
$usingOrderId
=
$port
->
getPortUsingOrderId
();
if
(
$usingOrderId
==
false
||
$usingOrderId
==
''
)
{
if
(
$usingOrderId
==
false
||
$usingOrderId
==
''
)
{
...
@@ -83,6 +86,8 @@ class StateController extends Controller
...
@@ -83,6 +86,8 @@ class StateController extends Controller
$order
=
new
Order
((
int
)
$usingOrderId
);
$order
=
new
Order
((
int
)
$usingOrderId
);
$order
->
setIsChangeState
(
true
);
if
(
$order
->
getOrderCache
(
\Events
::
getRedis
())
==
false
)
{
if
(
$order
->
getOrderCache
(
\Events
::
getRedis
())
==
false
)
{
$port
->
setState
(
$state
);
$port
->
setState
(
$state
);
...
...
application/controller/card/BalanceController.php
View file @
0b01c7ed
...
@@ -11,6 +11,7 @@ namespace Application\controller\card;
...
@@ -11,6 +11,7 @@ namespace Application\controller\card;
use
Application\controller\Controller
;
use
Application\controller\Controller
;
use
Application\model\CardModel
;
use
Application\model\CardModel
;
use
Application\model\UserModel
;
class
BalanceController
extends
Controller
class
BalanceController
extends
Controller
{
{
...
@@ -18,7 +19,7 @@ class BalanceController extends Controller
...
@@ -18,7 +19,7 @@ class BalanceController extends Controller
'32'
=>
[
'32'
=>
[
'card_id'
=>
3
'card_id'
=>
4
]
]
];
];
...
@@ -32,14 +33,17 @@ class BalanceController extends Controller
...
@@ -32,14 +33,17 @@ class BalanceController extends Controller
$cardModel
=
new
CardModel
();
$cardModel
=
new
CardModel
();
$balance
=
$cardModel
->
getColumn
(
'balance'
,
'card_number = '
.
$cardId
);
$userId
=
$cardModel
->
getColumn
(
'user_id'
,
'card_number = '
.
$cardId
);
if
(
isset
(
$userId
))
{
$userModel
=
new
UserModel
();
$balance
=
$userModel
->
getColumn
(
'balance'
,
'id = '
.
$userId
);
}
$balance
=
isset
(
$balance
)
?
$balance
:
0
;
$balance
=
isset
(
$balance
)
?
$balance
:
0
;
$balance
=
sprintf
(
'%08x'
,
$balance
);
$balance
=
sprintf
(
'%08x'
,
$balance
);
var_dump
(
$balance
);
$this
->
response
->
send
(
'32'
,
$cardId
.
$balance
);
$this
->
response
->
send
(
'32'
,
$cardId
.
$balance
);
}
}
...
...
application/controller/card/PayRuleController.php
View file @
0b01c7ed
...
@@ -37,12 +37,7 @@ class PayRuleController extends Controller
...
@@ -37,12 +37,7 @@ class PayRuleController extends Controller
Gateway
::
closeClient
(
$this
->
clientId
);
Gateway
::
closeClient
(
$this
->
clientId
);
}
}
Log
::
debug
(
$_SESSION
[
'station_id'
]);
$rule
=
$billingTmp
->
getColumn
(
'context'
,
'id = '
.
$_SESSION
[
'station_id'
]);
$rule
=
$billingTmp
->
getColumn
(
'context'
,
'id = '
.
$_SESSION
[
'station_id'
]);
Log
::
debug
(
$rule
);
if
(
isset
(
$rule
))
{
if
(
isset
(
$rule
))
{
$rule
=
json_decode
(
$rule
,
true
);
$rule
=
json_decode
(
$rule
,
true
);
...
...
application/controller/card/charger/RequestController.php
View file @
0b01c7ed
...
@@ -12,6 +12,7 @@ namespace Application\controller\card\charger;
...
@@ -12,6 +12,7 @@ namespace Application\controller\card\charger;
use
Application\controller\Controller
;
use
Application\controller\Controller
;
use
Application\model\CardModel
;
use
Application\model\CardModel
;
use
Application\model\OrderModel
;
use
Application\model\OrderModel
;
use
Application\model\UserModel
;
use
Lib\cdz\order\Order
;
use
Lib\cdz\order\Order
;
use
Lib\cdz\order\save\OrderSaveRedis
;
use
Lib\cdz\order\save\OrderSaveRedis
;
use
Lib\log\Log
;
use
Lib\log\Log
;
...
@@ -22,11 +23,11 @@ class RequestController extends Controller
...
@@ -22,11 +23,11 @@ class RequestController extends Controller
protected
$parameterMap
=
[
protected
$parameterMap
=
[
'33'
=>
[
'33'
=>
[
'type'
=>
1
,
'type'
=>
1
,
'logic_id'
=>
1
,
'logic_id'
=>
1
,
'card_id'
=>
3
,
'card_id'
=>
4
,
'time'
=>
2
,
'time'
=>
2
,
'price'
=>
2
,
'price'
=>
2
,
],
],
];
];
...
@@ -61,14 +62,13 @@ class RequestController extends Controller
...
@@ -61,14 +62,13 @@ class RequestController extends Controller
$cardModel
=
new
CardModel
();
$cardModel
=
new
CardModel
();
$
balance
=
$cardModel
->
getColumn
(
'balance
'
,
'card_number = '
.
$cardId
);
$
userId
=
$cardModel
->
getColumn
(
'user_id
'
,
'card_number = '
.
$cardId
);
Log
::
debug
(
$balance
);
if
(
isset
(
$userId
))
{
$userModel
=
new
UserModel
();
if
(
isset
(
$balance
)
===
false
||
$balance
==
''
)
{
$balance
=
$userModel
->
getColumn
(
'balance'
,
'id = '
.
$userId
);
return
;
}
}
$balance
=
isset
(
$balance
)
?
$balance
:
0
;
if
((
int
)
$balance
<
(
int
)
$price
)
{
if
((
int
)
$balance
<
(
int
)
$price
)
{
$orderId
=
0
;
$orderId
=
0
;
...
@@ -84,15 +84,15 @@ class RequestController extends Controller
...
@@ -84,15 +84,15 @@ class RequestController extends Controller
$orderModel
=
new
OrderModel
();
$orderModel
=
new
OrderModel
();
$outTradeNo
=
'3'
.
time
()
.
$stationId
.
$portId
.
$gatewayId
;
$outTradeNo
=
'3'
.
time
()
.
$stationId
.
$portId
.
$gatewayId
;
$orderModel
->
insertRow
([
$orderModel
->
insertRow
([
'gateway_id'
=>
$gatewayId
,
'gateway_id'
=>
$gatewayId
,
'station_id'
=>
$stationId
,
'station_id'
=>
$stationId
,
'port_id'
=>
$portId
,
'port_id'
=>
$portId
,
'out_trade_no'
=>
$outTradeNo
,
'out_trade_no'
=>
$outTradeNo
,
'pay_amount'
=>
$price
,
'pay_amount'
=>
$price
,
'charger_time'
=>
$time
,
'charger_time'
=>
$time
,
'created_at'
=>
$date
,
'created_at'
=>
$date
,
'logic_num'
=>
$logicId
,
'logic_num'
=>
$logicId
,
'pay_type'
=>
3
,
'pay_type'
=>
3
,
'station_name'
=>
$stationName
,
'station_name'
=>
$stationName
,
]);
]);
$orderId
=
$orderModel
->
getColumn
(
'id'
,
'out_trade_no = '
.
$outTradeNo
);
$orderId
=
$orderModel
->
getColumn
(
'id'
,
'out_trade_no = '
.
$outTradeNo
);
...
...
application/controller/update/QueryController.php
View file @
0b01c7ed
...
@@ -62,7 +62,6 @@ class QueryController extends Controller
...
@@ -62,7 +62,6 @@ class QueryController extends Controller
$hardwareVersion
=
$this
->
request
->
get
(
'hardware_version'
);
$hardwareVersion
=
$this
->
request
->
get
(
'hardware_version'
);
$softwareVersion
=
$this
->
request
->
get
(
'software_version'
);
$softwareVersion
=
$this
->
request
->
get
(
'software_version'
);
$response
=
''
;
$response
=
''
;
Log
::
debug
(
'session'
,
Gateway
::
getSession
(
$this
->
clientId
));
$gatewayType
=
isset
(
$_SESSION
[
'gateway_type'
])
?
$_SESSION
[
'gateway_type'
]
:
false
;
$gatewayType
=
isset
(
$_SESSION
[
'gateway_type'
])
?
$_SESSION
[
'gateway_type'
]
:
false
;
...
@@ -74,14 +73,23 @@ class QueryController extends Controller
...
@@ -74,14 +73,23 @@ class QueryController extends Controller
$gatewayUpdateModel
=
new
GatewayUpdateModel
();
$gatewayUpdateModel
=
new
GatewayUpdateModel
();
$updateInfo
=
$gatewayUpdateModel
->
getColumns
([
'hardware_version'
,
'software_version'
,
'sign'
],
'gateway_type = '
.
$gatewayType
);
$updateInfo
=
$gatewayUpdateModel
->
getColumns
([
'hardware_version'
,
'software_version'
,
'sign'
],
'gateway_type = '
.
$gatewayType
);
if
(
count
(
$updateInfo
)
!==
0
)
{
$returnCode
=
'10'
;
if
(
$gatewayType
==
4
&&
$hardwareVersion
==
'01010201'
)
{
$returnCode
=
'10'
;
}
else
if
(
$updateInfo
==
false
)
{
$returnCode
=
'10'
;
}
else
if
(
count
(
$updateInfo
)
!==
0
)
{
$updateHardwareVersion
=
$updateInfo
[
'hardware_version'
];
$updateHardwareVersion
=
$updateInfo
[
'hardware_version'
];
$sign
=
$updateInfo
[
'sign'
];
$sign
=
$updateInfo
[
'sign'
];
// $updateSoftwareVersion = sprintf('%08x', $updateInfo['software_version']);
// $updateSoftwareVersion = sprintf('%08x', $updateInfo['software_version']);
$updateSoftwareVersion
=
sprintf
(
$updateInfo
[
'software_version'
]);
$updateSoftwareVersion
=
sprintf
(
$updateInfo
[
'software_version'
]);
if
(
$updateHardwareVersion
==
$hardwareVersion
&&
$updateSoftwareVersion
==
$softwareVersion
)
{
if
(
$updateHardwareVersion
===
null
||
$updateSoftwareVersion
===
null
)
{
$returnCode
=
'10'
;
}
else
if
(
$updateHardwareVersion
==
$hardwareVersion
&&
$updateSoftwareVersion
==
$softwareVersion
)
{
$returnCode
=
'10'
;
$returnCode
=
'10'
;
}
else
{
}
else
{
...
@@ -93,7 +101,9 @@ class QueryController extends Controller
...
@@ -93,7 +101,9 @@ class QueryController extends Controller
if
(
$host
===
false
)
{
if
(
$host
===
false
)
{
throw
new
\Exception
(
'can not find download host'
);
throw
new
\Exception
(
'can not find download host'
);
}
}
$downloadUrl
=
$host
.
'/update/'
.
$updateHardwareVersion
.
$updateSoftwareVersion
.
'.bin'
;
$downloadUrl
=
$host
.
'/gateway/'
.
$updateHardwareVersion
.
'_'
.
$updateSoftwareVersion
.
'.bin'
;
Log
::
debug
(
$downloadUrl
);
$urlHex
=
''
;
$urlHex
=
''
;
for
(
$i
=
0
;
$i
<
strlen
(
$downloadUrl
);
$i
++
)
{
for
(
$i
=
0
;
$i
<
strlen
(
$downloadUrl
);
$i
++
)
{
...
@@ -115,7 +125,7 @@ class QueryController extends Controller
...
@@ -115,7 +125,7 @@ class QueryController extends Controller
$this
->
response
->
send
(
'd1'
,
$returnCode
);
$this
->
response
->
send
(
'd1'
,
$returnCode
);
return
;
return
;
}
}
$this
->
response
->
send
(
'd1'
,
'11'
);
$this
->
response
->
send
(
'd1'
,
$returnCode
);
return
;
return
;
...
...
application/model/CardModel.php
View file @
0b01c7ed
...
@@ -12,5 +12,5 @@ namespace Application\model;
...
@@ -12,5 +12,5 @@ namespace Application\model;
class
CardModel
extends
Model
class
CardModel
extends
Model
{
{
protected
$table
=
'cards'
;
protected
$table
=
'
unreal_
cards'
;
}
}
\ No newline at end of file
application/model/UserModel.php
0 → 100644
View file @
0b01c7ed
<?php
/**
* Created by PhpStorm.
* User: banice
* Date: 2018/11/14
* Time: 下午2:20
*/
namespace
Application\model
;
class
UserModel
extends
Model
{
protected
$table
=
'wx_users'
;
}
\ No newline at end of file
lib/cdz/order/Order.php
View file @
0b01c7ed
...
@@ -18,6 +18,8 @@ class Order
...
@@ -18,6 +18,8 @@ class Order
const
ORDER_HASH_PREFIX
=
'cdz:order:state:'
;
const
ORDER_HASH_PREFIX
=
'cdz:order:state:'
;
private
$isChangeState
=
false
;
/**
/**
* @var int
* @var int
*/
*/
...
@@ -650,5 +652,21 @@ class Order
...
@@ -650,5 +652,21 @@ class Order
$this
->
cardId
=
$cardId
;
$this
->
cardId
=
$cardId
;
}
}
/**
* @return bool
*/
public
function
isChangeState
()
:
bool
{
return
$this
->
isChangeState
;
}
/**
* @param bool $isChangeState
*/
public
function
setIsChangeState
(
bool
$isChangeState
)
:
void
{
$this
->
isChangeState
=
$isChangeState
;
}
}
}
\ No newline at end of file
lib/cdz/order/save/OrderSaveRedis.php
View file @
0b01c7ed
...
@@ -45,8 +45,6 @@ class OrderSaveRedis
...
@@ -45,8 +45,6 @@ class OrderSaveRedis
}
}
}
}
Log
::
debug
(
'update'
,
$update
);
$this
->
redis
->
hMset
(
$this
->
order
->
getCacheKeyName
(),
$update
);
$this
->
redis
->
hMset
(
$this
->
order
->
getCacheKeyName
(),
$update
);
$this
->
redis
->
expire
(
$this
->
order
->
getCacheKeyName
(),
60
*
60
*
24
);
$this
->
redis
->
expire
(
$this
->
order
->
getCacheKeyName
(),
60
*
60
*
24
);
...
...
lib/cdz/order/state/WaitingState.php
View file @
0b01c7ed
...
@@ -107,7 +107,11 @@ class WaitingState extends State
...
@@ -107,7 +107,11 @@ class WaitingState extends State
$this
->
order
->
setStateCode
(
12
);
$this
->
order
->
setStateCode
(
12
);
\Events
::
pipe
();
\Events
::
pipe
();
$orderSaveRedis
=
new
OrderSaveRedis
(
$this
->
order
);
$orderSaveRedis
=
new
OrderSaveRedis
(
$this
->
order
);
$orderSaveRedis
->
save
([
'stateCode'
,
'startTime'
,
'startCapacity'
]);
if
(
$this
->
order
->
isChangeState
()
===
false
)
{
$orderSaveRedis
->
save
([
'stateCode'
,
'startTime'
,
'startCapacity'
]);
}
else
{
$orderSaveRedis
->
save
([
'stateCode'
,
'startTime'
]);
}
//更新口子状态
//更新口子状态
$port
=
new
Port
();
$port
=
new
Port
();
...
@@ -137,11 +141,12 @@ class WaitingState extends State
...
@@ -137,11 +141,12 @@ class WaitingState extends State
'start_time'
=>
date
(
'Y-m-d H:i:s'
,
$this
->
order
->
getStartTime
()),
'start_time'
=>
date
(
'Y-m-d H:i:s'
,
$this
->
order
->
getStartTime
()),
];
];
//更新订单状态
//更新订单状态
if
(
$this
->
order
->
getStartCapacity
()
!==
-
2
)
{
$startCapacity
=
$this
->
order
->
getStartCapacity
();
if
(
$startCapacity
!==
-
2
&&
$startCapacity
>
0
)
{
$update
[
'start_capacity'
]
=
(
int
)
$this
->
order
->
getStartCapacity
();
$update
[
'start_capacity'
]
=
(
int
)
$this
->
order
->
getStartCapacity
();
}
}
$orderModel
=
new
OrderModel
();
$orderModel
=
new
OrderModel
();
Log
::
debug
(
'update_order_state -> '
.
$this
->
order
->
getId
(),
$update
);
$orderModel
->
update
(
$update
,
'id = '
.
$this
->
order
->
getId
());
$orderModel
->
update
(
$update
,
'id = '
.
$this
->
order
->
getId
());
...
@@ -168,7 +173,8 @@ class WaitingState extends State
...
@@ -168,7 +173,8 @@ class WaitingState extends State
$orderModel
=
new
OrderModel
();
$orderModel
=
new
OrderModel
();
$orderModel
->
update
([
$orderModel
->
update
([
'is_charger'
=>
StateCode
::
PORT_EXCEPTION
,
'is_charger'
=>
StateCode
::
PORT_EXCEPTION
,
'start_capacity'
=>
$this
->
order
->
getStartCapacity
(),
],
'id = '
.
$this
->
order
->
getId
());
],
'id = '
.
$this
->
order
->
getId
());
//添加订单异常
//添加订单异常
...
@@ -227,22 +233,25 @@ class WaitingState extends State
...
@@ -227,22 +233,25 @@ class WaitingState extends State
public
function
toShedState
()
public
function
toShedState
()
{
{
$
this
->
order
->
setStateCode
(
-
1
);
$
orderModel
=
new
OrderModel
(
);
$orderSave
=
new
OrderSaveRedis
(
$this
->
order
);
Log
::
debug
(
'waiting to shed ->start_capacity'
.
$this
->
order
->
getStartCapacity
()
);
$orderSave
->
save
([
'stateCode'
]);
if
(
$this
->
order
->
getStartCapacity
()
>=
0
)
{
$orderSave
->
deleteHashKey
([
'startTime'
,
'startCapacity'
]);
$orderModel
->
update
([
'start_capacity'
=>
(
int
)
$this
->
order
->
getStartCapacity
(),
],
'id = '
.
$this
->
order
->
getId
());
$orderModel
=
new
OrderModel
();
}
Log
::
debug
(
'update shed start_capacity'
.
$this
->
order
->
getId
());
Log
::
debug
(
'waiting to shed'
.
$this
->
order
->
getStartCapacity
()
);
$this
->
order
->
setStateCode
(
-
1
);
$orderModel
->
update
([
$orderSave
=
new
OrderSaveRedis
(
$this
->
order
);
'start_capacity'
=>
(
int
)
$this
->
order
->
getStartCapacity
(),
],
'id = '
.
$this
->
order
->
getId
());
$orderSave
->
save
([
'stateCode'
]);
// $orderSave->deleteHashKey(['startTime', 'startCapacity']);
Log
::
debug
(
'update shed start_capacity'
.
$this
->
order
->
getId
());
}
}
...
...
lib/log/Log.php
View file @
0b01c7ed
...
@@ -9,7 +9,6 @@
...
@@ -9,7 +9,6 @@
namespace
Lib\log
;
namespace
Lib\log
;
use
Monolog\Formatter\LineFormatter
;
use
Monolog\Handler\RotatingFileHandler
;
use
Monolog\Handler\RotatingFileHandler
;
use
Monolog\Logger
;
use
Monolog\Logger
;
...
...
lib/station/gateway/port/Port.php
View file @
0b01c7ed
...
@@ -73,6 +73,22 @@ class Port
...
@@ -73,6 +73,22 @@ class Port
}
}
public
function
isPortBan
()
{
if
(
isset
(
$_SESSION
[
'port_id_status'
]))
{
$portIdStatus
=
$_SESSION
[
'port_id_status'
];
if
(
isset
(
$portIdStatus
[
$this
->
portId
]))
{
if
(
$portIdStatus
[
$this
->
portId
]
===
8
)
{
return
true
;
}
}
}
return
false
;
}
/**
/**
* 更新端口状态
* 更新端口状态
* @param int $orderId
* @param int $orderId
...
@@ -98,7 +114,7 @@ class Port
...
@@ -98,7 +114,7 @@ class Port
$portModel
=
new
DeviceModel
();
$portModel
=
new
DeviceModel
();
$portModel
->
update
([
$portModel
->
update
([
'state'
=>
$this
->
state
,
'state'
=>
$this
->
state
,
'updated_at'
=>
date
(
'Y-m-d H:i:s'
)
'updated_at'
=>
date
(
'Y-m-d H:i:s'
)
],
'id = '
.
$this
->
portId
);
],
'id = '
.
$this
->
portId
);
...
...
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