Commit 6118513a by 杨苏杭

刷卡协议请求充电不返回卡id

parent 0b69f017
......@@ -3,13 +3,7 @@
<component name="ChangeListManager">
<list default="true" id="a4269ceb-5bf6-49dc-9b41-8690287f228c" name="Default" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change beforePath="$PROJECT_DIR$/application/Events.php" afterPath="$PROJECT_DIR$/application/Events.php" />
<change beforePath="$PROJECT_DIR$/application/controller/business/charger/OverController.php" afterPath="$PROJECT_DIR$/application/controller/business/charger/OverController.php" />
<change beforePath="$PROJECT_DIR$/application/controller/business/power/PowerController.php" afterPath="$PROJECT_DIR$/application/controller/business/power/PowerController.php" />
<change beforePath="$PROJECT_DIR$/application/controller/card/BalanceController.php" afterPath="$PROJECT_DIR$/application/controller/card/BalanceController.php" />
<change beforePath="$PROJECT_DIR$/application/controller/card/charger/RequestController.php" afterPath="$PROJECT_DIR$/application/controller/card/charger/RequestController.php" />
<change beforePath="$PROJECT_DIR$/lib/Gateway.php" afterPath="$PROJECT_DIR$/lib/Gateway.php" />
<change beforePath="$PROJECT_DIR$/lib/remote/api/message/StartMessage.php" afterPath="$PROJECT_DIR$/lib/remote/api/message/StartMessage.php" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
......@@ -29,8 +23,8 @@
<file leaf-file-name="OverController.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/application/controller/business/charger/OverController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="710">
<caret line="166" column="27" lean-forward="true" selection-start-line="166" selection-start-column="27" selection-end-line="166" selection-end-column="27" />
<state relative-caret-position="2400">
<caret line="166" column="27" lean-forward="false" selection-start-line="166" selection-start-column="27" selection-end-line="166" selection-end-column="27" />
<folding />
</state>
</provider>
......@@ -46,21 +40,21 @@
</provider>
</entry>
</file>
<file leaf-file-name="BalanceController.php" pinned="false" current-in-tab="true">
<file leaf-file-name="BalanceController.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/application/controller/card/BalanceController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="592">
<caret line="45" column="53" lean-forward="false" selection-start-line="45" selection-start-column="53" selection-end-line="45" selection-end-column="53" />
<state relative-caret-position="272">
<caret line="25" column="0" lean-forward="false" selection-start-line="25" selection-start-column="0" selection-end-line="25" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="RequestController.php" pinned="false" current-in-tab="false">
<file leaf-file-name="RequestController.php" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/application/controller/card/charger/RequestController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="928">
<caret line="70" column="53" lean-forward="false" selection-start-line="70" selection-start-column="53" selection-end-line="70" selection-end-column="53" />
<state relative-caret-position="541">
<caret line="76" column="16" lean-forward="false" selection-start-line="76" selection-start-column="16" selection-end-line="76" selection-end-column="16" />
<folding />
</state>
</provider>
......@@ -79,8 +73,8 @@
<file leaf-file-name="StartController.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/application/controller/card/charger/StartController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="340">
<caret line="54" column="18" lean-forward="true" selection-start-line="54" selection-start-column="18" selection-end-line="54" selection-end-column="18" />
<state relative-caret-position="720">
<caret line="54" column="18" lean-forward="false" selection-start-line="54" selection-start-column="18" selection-end-line="54" selection-end-column="18" />
<folding />
</state>
</provider>
......@@ -99,7 +93,7 @@
<file leaf-file-name="PowerController.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/application/controller/card/charger/PowerController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-476">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
......@@ -254,7 +248,7 @@
<path value="$PROJECT_DIR$/vendor/guzzlehttp/promises" />
</include_path>
</component>
<component name="ProjectFrameBounds" extendedState="6" fullScreen="true">
<component name="ProjectFrameBounds" fullScreen="true">
<option name="x" value="1920" />
<option name="width" value="1920" />
<option name="height" value="1080" />
......@@ -278,7 +272,6 @@
</navigator>
<panes>
<pane id="Scope" />
<pane id="Scratches" />
<pane id="ProjectPane">
<subPane>
<expand>
......@@ -375,6 +368,7 @@
<select />
</subPane>
</pane>
<pane id="Scratches" />
</panes>
</component>
<component name="PropertiesComponent">
......@@ -494,33 +488,34 @@
<workItem from="1546852603214" duration="437000" />
<workItem from="1546829526654" duration="1960000" />
<workItem from="1546846912642" duration="675000" />
<workItem from="1546909384307" duration="2244000" />
<workItem from="1546909384307" duration="2321000" />
<workItem from="1546952375215" duration="84000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="483299000" />
<option name="totallyTimeSpent" value="483460000" />
</component>
<component name="ToolWindowManager">
<frame x="1920" y="0" width="1920" height="1080" extended-state="6" />
<frame x="1920" y="0" width="1920" height="1080" extended-state="0" />
<editor active="true" />
<layout>
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.20447284" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.20607029" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
<window_info id="Docker" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="File Transfer" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.040714994" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32969216" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="true" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.16735967" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.16683218" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
<window_info id="File Transfer" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.040714994" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
<window_info id="Database Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Thumbnails" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32969216" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
......@@ -766,7 +761,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="464">
<caret line="51" column="31" lean-forward="false" selection-start-line="51" selection-start-column="31" selection-end-line="51" selection-end-column="31" />
<folding />
</state>
</provider>
</entry>
......@@ -858,8 +852,8 @@
</entry>
<entry file="file://$PROJECT_DIR$/application/controller/business/charger/OverController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="710">
<caret line="166" column="27" lean-forward="true" selection-start-line="166" selection-start-column="27" selection-end-line="166" selection-end-column="27" />
<state relative-caret-position="2400">
<caret line="166" column="27" lean-forward="false" selection-start-line="166" selection-start-column="27" selection-end-line="166" selection-end-column="27" />
<folding />
</state>
</provider>
......@@ -880,17 +874,9 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/controller/card/charger/RequestController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="928">
<caret line="70" column="53" lean-forward="false" selection-start-line="70" selection-start-column="53" selection-end-line="70" selection-end-column="53" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/controller/card/charger/PowerController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-476">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
......@@ -906,16 +892,24 @@
</entry>
<entry file="file://$PROJECT_DIR$/application/controller/card/charger/StartController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="340">
<caret line="54" column="18" lean-forward="true" selection-start-line="54" selection-start-column="18" selection-end-line="54" selection-end-column="18" />
<state relative-caret-position="720">
<caret line="54" column="18" lean-forward="false" selection-start-line="54" selection-start-column="18" selection-end-line="54" selection-end-column="18" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/controller/card/BalanceController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="592">
<caret line="45" column="53" lean-forward="false" selection-start-line="45" selection-start-column="53" selection-end-line="45" selection-end-column="53" />
<state relative-caret-position="272">
<caret line="25" column="0" lean-forward="false" selection-start-line="25" selection-start-column="0" selection-end-line="25" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/controller/card/charger/RequestController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="541">
<caret line="76" column="16" lean-forward="false" selection-start-line="76" selection-start-column="16" selection-end-line="76" selection-end-column="16" />
<folding />
</state>
</provider>
......
......@@ -74,10 +74,7 @@ class RequestController extends Controller
if ((int)$balance < (int)$price) {
$orderId = 0;
} else {
//添加订单记录.
$stationId = $_SESSION['station_id'];
$gatewayId = $_SESSION['gateway_id'];
......@@ -100,7 +97,7 @@ class RequestController extends Controller
$orderId = $orderModel->getColumn('id', 'out_trade_no = ' . $outTradeNo);
}
$this->response->send('33', $type . Tool::padding($logicId, 1) . $cardId . Tool::padding($time, 2) . Tool::padding($price, 2) . Tool::padding($orderId, 6) . Tool::padding($balance, 4));
$this->response->send('33', $type . Tool::padding($logicId, 1) . Tool::padding($time, 2) . Tool::padding($price, 2) . Tool::padding($orderId, 6) . Tool::padding($balance, 4));
if ($orderId != 0) {
//todo 订单缓存存储
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment