作者 郭盛
1 个管道 的构建 通过 耗费 1 秒

填写发票信息

... ... @@ -3,6 +3,7 @@
<component name="ChangeListManager">
<list default="true" id="e93f11c2-a7d9-4d35-8b1c-8dd18e7f5fef" name="Default" comment="">
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/application/api/controller/User.php" afterPath="$PROJECT_DIR$/application/api/controller/User.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/public/api.html" afterPath="$PROJECT_DIR$/public/api.html" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
... ... @@ -16,8 +17,8 @@
<file leaf-file-name="User.php" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/application/api/controller/User.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="503">
<caret line="646" column="61" lean-forward="true" selection-start-line="646" selection-start-column="61" selection-end-line="646" selection-end-column="61" />
<state relative-caret-position="458">
<caret line="1790" column="7" lean-forward="true" selection-start-line="1790" selection-start-column="7" selection-end-line="1790" selection-end-column="7" />
<folding>
<element signature="e#365#484#0#PHP" expanded="false" />
<element signature="e#490#1228#0#PHP" expanded="false" />
... ... @@ -40,7 +41,9 @@
<element signature="e#14758#15334#0#PHP" expanded="false" />
<element signature="e#15339#15900#0#PHP" expanded="false" />
<element signature="e#15906#16622#0#PHP" expanded="false" />
<element signature="e#16627#19053#0#PHP" expanded="false" />
<element signature="e#19059#19961#0#PHP" expanded="false" />
<element signature="e#19966#22792#0#PHP" expanded="false" />
<element signature="e#22798#23175#0#PHP" expanded="false" />
<element signature="e#23180#23501#0#PHP" expanded="false" />
<element signature="e#23507#24012#0#PHP" expanded="false" />
... ... @@ -82,6 +85,8 @@
<element signature="e#59104#59818#0#PHP" expanded="false" />
<element signature="e#59824#60251#0#PHP" expanded="false" />
<element signature="e#60256#60725#0#PHP" expanded="false" />
<element signature="e#60732#61768#0#PHP" expanded="false" />
<element signature="e#61773#62130#0#PHP" expanded="false" />
</folding>
</state>
</provider>
... ... @@ -175,8 +180,8 @@
</component>
<component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" />
<component name="ProjectFrameBounds" extendedState="1">
<option name="x" value="311" />
<option name="y" value="48" />
<option name="x" value="347" />
<option name="y" value="60" />
<option name="width" value="1430" />
<option name="height" value="920" />
</component>
... ... @@ -312,7 +317,7 @@
<workItem from="1575773423431" duration="694000" />
<workItem from="1575776183372" duration="2267000" />
<workItem from="1575790089275" duration="377000" />
<workItem from="1575851041026" duration="2810000" />
<workItem from="1575851041026" duration="4123000" />
</task>
<task id="LOCAL-00001" summary="调试">
<created>1574145133364</created>
... ... @@ -325,7 +330,7 @@
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="343277000" />
<option name="totallyTimeSpent" value="344590000" />
</component>
<component name="TodoView">
<todo-panel id="selected-file">
... ... @@ -337,7 +342,8 @@
</todo-panel>
</component>
<component name="ToolWindowManager">
<frame x="311" y="48" width="1430" height="920" extended-state="1" />
<frame x="347" y="60" width="1430" height="920" extended-state="1" />
<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.17518248" sideWeight="0.5" order="1" 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.32912987" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
... ... @@ -346,7 +352,7 @@
<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="5" 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.33" sideWeight="0.5" order="1" 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="2" side_tool="false" content_ui="tabs" />
<window_info id="Terminal" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.16985951" sideWeight="0.5" order="2" side_tool="false" 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.16985951" sideWeight="0.5" order="2" 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="6" 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="0" 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="7" side_tool="false" content_ui="tabs" />
... ... @@ -757,8 +763,8 @@
</entry>
<entry file="file://$PROJECT_DIR$/application/api/controller/User.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="503">
<caret line="646" column="61" lean-forward="true" selection-start-line="646" selection-start-column="61" selection-end-line="646" selection-end-column="61" />
<state relative-caret-position="458">
<caret line="1790" column="7" lean-forward="true" selection-start-line="1790" selection-start-column="7" selection-end-line="1790" selection-end-column="7" />
<folding>
<element signature="e#365#484#0#PHP" expanded="false" />
<element signature="e#490#1228#0#PHP" expanded="false" />
... ... @@ -781,7 +787,9 @@
<element signature="e#14758#15334#0#PHP" expanded="false" />
<element signature="e#15339#15900#0#PHP" expanded="false" />
<element signature="e#15906#16622#0#PHP" expanded="false" />
<element signature="e#16627#19053#0#PHP" expanded="false" />
<element signature="e#19059#19961#0#PHP" expanded="false" />
<element signature="e#19966#22792#0#PHP" expanded="false" />
<element signature="e#22798#23175#0#PHP" expanded="false" />
<element signature="e#23180#23501#0#PHP" expanded="false" />
<element signature="e#23507#24012#0#PHP" expanded="false" />
... ... @@ -823,6 +831,8 @@
<element signature="e#59104#59818#0#PHP" expanded="false" />
<element signature="e#59824#60251#0#PHP" expanded="false" />
<element signature="e#60256#60725#0#PHP" expanded="false" />
<element signature="e#60732#61768#0#PHP" expanded="false" />
<element signature="e#61773#62130#0#PHP" expanded="false" />
</folding>
</state>
</provider>
... ...
... ... @@ -1764,4 +1764,44 @@ class User extends Api
$this->error(['code'=>2,'msg'=>'sql运行失败']);
}
}
/**
* @ApiTitle (填写发票信息)
* @ApiSummary (填写发票信息)
* @ApiMethod (POST)
* @ApiRoute (/api/user/invoice)
*
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
*
* @ApiParams (name="order_id", type="inter", required=true, description="订单ID")
* @ApiParams (name="name", type="string", required=true, description="公司名称")
* @ApiParams (name="duty", type="string", required=true, description="纳税人识别号")
* @ApiParams (name="bank", type="string", required=true, description="银行名称")
* @ApiParams (name="card", type="string", required=true, description="银行账号")
* @ApiParams (name="linkname", type="string", required=true, description="收件人名字")
* @ApiParams (name="linktel", type="string", required=true, description="收件人电话")
* @ApiParams (name="linkadress", type="string", required=true, description="收件人地址")
*
* @ApiReturn({
"code": 1,
"msg": "成功",
"time": "1571492001",
})
*/
public function invoice()
{
$param['user_id'] = $this->uid;
$param = $this->request->param();
$param['createtime'] = time();
$data = Db::name('invoice')
->insertGetId($param);
if(!empty($data)){
$this->success('success');
}else{
$this->error('sql运行失败');
}
}
}
... ...
此 diff 太大无法显示。