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

填写发票信息

@@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
3 <component name="ChangeListManager"> 3 <component name="ChangeListManager">
4 <list default="true" id="e93f11c2-a7d9-4d35-8b1c-8dd18e7f5fef" name="Default" comment=""> 4 <list default="true" id="e93f11c2-a7d9-4d35-8b1c-8dd18e7f5fef" name="Default" comment="">
5 <change type="MODIFICATION" beforePath="$PROJECT_DIR$/application/api/controller/User.php" afterPath="$PROJECT_DIR$/application/api/controller/User.php" /> 5 <change type="MODIFICATION" beforePath="$PROJECT_DIR$/application/api/controller/User.php" afterPath="$PROJECT_DIR$/application/api/controller/User.php" />
  6 + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/public/api.html" afterPath="$PROJECT_DIR$/public/api.html" />
6 </list> 7 </list>
7 <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> 8 <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
8 <option name="TRACKING_ENABLED" value="true" /> 9 <option name="TRACKING_ENABLED" value="true" />
@@ -16,8 +17,8 @@ @@ -16,8 +17,8 @@
16 <file leaf-file-name="User.php" pinned="false" current-in-tab="true"> 17 <file leaf-file-name="User.php" pinned="false" current-in-tab="true">
17 <entry file="file://$PROJECT_DIR$/application/api/controller/User.php"> 18 <entry file="file://$PROJECT_DIR$/application/api/controller/User.php">
18 <provider selected="true" editor-type-id="text-editor"> 19 <provider selected="true" editor-type-id="text-editor">
19 - <state relative-caret-position="503">  
20 - <caret line="646" column="61" lean-forward="true" selection-start-line="646" selection-start-column="61" selection-end-line="646" selection-end-column="61" /> 20 + <state relative-caret-position="458">
  21 + <caret line="1790" column="7" lean-forward="true" selection-start-line="1790" selection-start-column="7" selection-end-line="1790" selection-end-column="7" />
21 <folding> 22 <folding>
22 <element signature="e#365#484#0#PHP" expanded="false" /> 23 <element signature="e#365#484#0#PHP" expanded="false" />
23 <element signature="e#490#1228#0#PHP" expanded="false" /> 24 <element signature="e#490#1228#0#PHP" expanded="false" />
@@ -40,7 +41,9 @@ @@ -40,7 +41,9 @@
40 <element signature="e#14758#15334#0#PHP" expanded="false" /> 41 <element signature="e#14758#15334#0#PHP" expanded="false" />
41 <element signature="e#15339#15900#0#PHP" expanded="false" /> 42 <element signature="e#15339#15900#0#PHP" expanded="false" />
42 <element signature="e#15906#16622#0#PHP" expanded="false" /> 43 <element signature="e#15906#16622#0#PHP" expanded="false" />
  44 + <element signature="e#16627#19053#0#PHP" expanded="false" />
43 <element signature="e#19059#19961#0#PHP" expanded="false" /> 45 <element signature="e#19059#19961#0#PHP" expanded="false" />
  46 + <element signature="e#19966#22792#0#PHP" expanded="false" />
44 <element signature="e#22798#23175#0#PHP" expanded="false" /> 47 <element signature="e#22798#23175#0#PHP" expanded="false" />
45 <element signature="e#23180#23501#0#PHP" expanded="false" /> 48 <element signature="e#23180#23501#0#PHP" expanded="false" />
46 <element signature="e#23507#24012#0#PHP" expanded="false" /> 49 <element signature="e#23507#24012#0#PHP" expanded="false" />
@@ -82,6 +85,8 @@ @@ -82,6 +85,8 @@
82 <element signature="e#59104#59818#0#PHP" expanded="false" /> 85 <element signature="e#59104#59818#0#PHP" expanded="false" />
83 <element signature="e#59824#60251#0#PHP" expanded="false" /> 86 <element signature="e#59824#60251#0#PHP" expanded="false" />
84 <element signature="e#60256#60725#0#PHP" expanded="false" /> 87 <element signature="e#60256#60725#0#PHP" expanded="false" />
  88 + <element signature="e#60732#61768#0#PHP" expanded="false" />
  89 + <element signature="e#61773#62130#0#PHP" expanded="false" />
85 </folding> 90 </folding>
86 </state> 91 </state>
87 </provider> 92 </provider>
@@ -175,8 +180,8 @@ @@ -175,8 +180,8 @@
175 </component> 180 </component>
176 <component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" /> 181 <component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" />
177 <component name="ProjectFrameBounds" extendedState="1"> 182 <component name="ProjectFrameBounds" extendedState="1">
178 - <option name="x" value="311" />  
179 - <option name="y" value="48" /> 183 + <option name="x" value="347" />
  184 + <option name="y" value="60" />
180 <option name="width" value="1430" /> 185 <option name="width" value="1430" />
181 <option name="height" value="920" /> 186 <option name="height" value="920" />
182 </component> 187 </component>
@@ -312,7 +317,7 @@ @@ -312,7 +317,7 @@
312 <workItem from="1575773423431" duration="694000" /> 317 <workItem from="1575773423431" duration="694000" />
313 <workItem from="1575776183372" duration="2267000" /> 318 <workItem from="1575776183372" duration="2267000" />
314 <workItem from="1575790089275" duration="377000" /> 319 <workItem from="1575790089275" duration="377000" />
315 - <workItem from="1575851041026" duration="2810000" /> 320 + <workItem from="1575851041026" duration="4123000" />
316 </task> 321 </task>
317 <task id="LOCAL-00001" summary="调试"> 322 <task id="LOCAL-00001" summary="调试">
318 <created>1574145133364</created> 323 <created>1574145133364</created>
@@ -325,7 +330,7 @@ @@ -325,7 +330,7 @@
325 <servers /> 330 <servers />
326 </component> 331 </component>
327 <component name="TimeTrackingManager"> 332 <component name="TimeTrackingManager">
328 - <option name="totallyTimeSpent" value="343277000" /> 333 + <option name="totallyTimeSpent" value="344590000" />
329 </component> 334 </component>
330 <component name="TodoView"> 335 <component name="TodoView">
331 <todo-panel id="selected-file"> 336 <todo-panel id="selected-file">
@@ -337,7 +342,8 @@ @@ -337,7 +342,8 @@
337 </todo-panel> 342 </todo-panel>
338 </component> 343 </component>
339 <component name="ToolWindowManager"> 344 <component name="ToolWindowManager">
340 - <frame x="311" y="48" width="1430" height="920" extended-state="1" /> 345 + <frame x="347" y="60" width="1430" height="920" extended-state="1" />
  346 + <editor active="true" />
341 <layout> 347 <layout>
342 <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" /> 348 <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" />
343 <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" /> 349 <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 @@ @@ -346,7 +352,7 @@
346 <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" /> 352 <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" />
347 <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" /> 353 <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" />
348 <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" /> 354 <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" />
349 - <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" /> 355 + <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" />
350 <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" /> 356 <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" />
351 <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" /> 357 <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" />
352 <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" /> 358 <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 @@ @@ -757,8 +763,8 @@
757 </entry> 763 </entry>
758 <entry file="file://$PROJECT_DIR$/application/api/controller/User.php"> 764 <entry file="file://$PROJECT_DIR$/application/api/controller/User.php">
759 <provider selected="true" editor-type-id="text-editor"> 765 <provider selected="true" editor-type-id="text-editor">
760 - <state relative-caret-position="503">  
761 - <caret line="646" column="61" lean-forward="true" selection-start-line="646" selection-start-column="61" selection-end-line="646" selection-end-column="61" /> 766 + <state relative-caret-position="458">
  767 + <caret line="1790" column="7" lean-forward="true" selection-start-line="1790" selection-start-column="7" selection-end-line="1790" selection-end-column="7" />
762 <folding> 768 <folding>
763 <element signature="e#365#484#0#PHP" expanded="false" /> 769 <element signature="e#365#484#0#PHP" expanded="false" />
764 <element signature="e#490#1228#0#PHP" expanded="false" /> 770 <element signature="e#490#1228#0#PHP" expanded="false" />
@@ -781,7 +787,9 @@ @@ -781,7 +787,9 @@
781 <element signature="e#14758#15334#0#PHP" expanded="false" /> 787 <element signature="e#14758#15334#0#PHP" expanded="false" />
782 <element signature="e#15339#15900#0#PHP" expanded="false" /> 788 <element signature="e#15339#15900#0#PHP" expanded="false" />
783 <element signature="e#15906#16622#0#PHP" expanded="false" /> 789 <element signature="e#15906#16622#0#PHP" expanded="false" />
  790 + <element signature="e#16627#19053#0#PHP" expanded="false" />
784 <element signature="e#19059#19961#0#PHP" expanded="false" /> 791 <element signature="e#19059#19961#0#PHP" expanded="false" />
  792 + <element signature="e#19966#22792#0#PHP" expanded="false" />
785 <element signature="e#22798#23175#0#PHP" expanded="false" /> 793 <element signature="e#22798#23175#0#PHP" expanded="false" />
786 <element signature="e#23180#23501#0#PHP" expanded="false" /> 794 <element signature="e#23180#23501#0#PHP" expanded="false" />
787 <element signature="e#23507#24012#0#PHP" expanded="false" /> 795 <element signature="e#23507#24012#0#PHP" expanded="false" />
@@ -823,6 +831,8 @@ @@ -823,6 +831,8 @@
823 <element signature="e#59104#59818#0#PHP" expanded="false" /> 831 <element signature="e#59104#59818#0#PHP" expanded="false" />
824 <element signature="e#59824#60251#0#PHP" expanded="false" /> 832 <element signature="e#59824#60251#0#PHP" expanded="false" />
825 <element signature="e#60256#60725#0#PHP" expanded="false" /> 833 <element signature="e#60256#60725#0#PHP" expanded="false" />
  834 + <element signature="e#60732#61768#0#PHP" expanded="false" />
  835 + <element signature="e#61773#62130#0#PHP" expanded="false" />
826 </folding> 836 </folding>
827 </state> 837 </state>
828 </provider> 838 </provider>
@@ -1764,4 +1764,44 @@ class User extends Api @@ -1764,4 +1764,44 @@ class User extends Api
1764 $this->error(['code'=>2,'msg'=>'sql运行失败']); 1764 $this->error(['code'=>2,'msg'=>'sql运行失败']);
1765 } 1765 }
1766 } 1766 }
  1767 +
  1768 +
  1769 + /**
  1770 + * @ApiTitle (填写发票信息)
  1771 + * @ApiSummary (填写发票信息)
  1772 + * @ApiMethod (POST)
  1773 + * @ApiRoute (/api/user/invoice)
  1774 + *
  1775 + * @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
  1776 + *
  1777 + * @ApiParams (name="order_id", type="inter", required=true, description="订单ID")
  1778 + * @ApiParams (name="name", type="string", required=true, description="公司名称")
  1779 + * @ApiParams (name="duty", type="string", required=true, description="纳税人识别号")
  1780 + * @ApiParams (name="bank", type="string", required=true, description="银行名称")
  1781 + * @ApiParams (name="card", type="string", required=true, description="银行账号")
  1782 + * @ApiParams (name="linkname", type="string", required=true, description="收件人名字")
  1783 + * @ApiParams (name="linktel", type="string", required=true, description="收件人电话")
  1784 + * @ApiParams (name="linkadress", type="string", required=true, description="收件人地址")
  1785 + *
  1786 + * @ApiReturn({
  1787 + "code": 1,
  1788 + "msg": "成功",
  1789 + "time": "1571492001",
  1790 + })
  1791 + */
  1792 + public function invoice()
  1793 + {
  1794 + $param['user_id'] = $this->uid;
  1795 + $param = $this->request->param();
  1796 + $param['createtime'] = time();
  1797 + $data = Db::name('invoice')
  1798 + ->insertGetId($param);
  1799 + if(!empty($data)){
  1800 + $this->success('success');
  1801 + }else{
  1802 + $this->error('sql运行失败');
  1803 + }
  1804 + }
  1805 +
  1806 +
1767 } 1807 }
此 diff 太大无法显示。