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

商品订单接口的修改

@@ -25,56 +25,11 @@ @@ -25,56 +25,11 @@
25 </component> 25 </component>
26 <component name="FileEditorManager"> 26 <component name="FileEditorManager">
27 <leaf SIDE_TABS_SIZE_LIMIT_KEY="300"> 27 <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
28 - <file leaf-file-name="UserController.php" pinned="false" current-in-tab="false">  
29 - <entry file="file://$PROJECT_DIR$/api/index/controller/UserController.php">  
30 - <provider selected="true" editor-type-id="text-editor">  
31 - <state relative-caret-position="275">  
32 - <caret line="764" column="9" lean-forward="false" selection-start-line="764" selection-start-column="9" selection-end-line="764" selection-end-column="9" />  
33 - <folding>  
34 - <element signature="e#345#694#0#PHP" expanded="false" />  
35 - <element signature="e#699#1464#0#PHP" expanded="false" />  
36 - <element signature="e#1470#1699#0#PHP" expanded="false" />  
37 - <element signature="e#1704#3337#0#PHP" expanded="false" />  
38 - <element signature="e#3343#3583#0#PHP" expanded="false" />  
39 - <element signature="e#3588#3836#0#PHP" expanded="false" />  
40 - <element signature="e#3842#4189#0#PHP" expanded="false" />  
41 - <element signature="e#4194#4640#0#PHP" expanded="false" />  
42 - <element signature="e#4646#4906#0#PHP" expanded="false" />  
43 - <element signature="e#4911#5112#0#PHP" expanded="false" />  
44 - <element signature="e#5118#5380#0#PHP" expanded="false" />  
45 - <element signature="e#5385#5590#0#PHP" expanded="false" />  
46 - <element signature="e#5596#6038#0#PHP" expanded="false" />  
47 - <element signature="e#6043#7271#0#PHP" expanded="false" />  
48 - <element signature="e#7294#7839#0#PHP" expanded="false" />  
49 - <element signature="e#7845#8126#0#PHP" expanded="false" />  
50 - <element signature="e#8131#8523#0#PHP" expanded="false" />  
51 - <element signature="e#8529#9078#0#PHP" expanded="false" />  
52 - <element signature="e#9083#10282#0#PHP" expanded="false" />  
53 - <element signature="e#10288#10745#0#PHP" expanded="false" />  
54 - <element signature="e#10750#12013#0#PHP" expanded="false" />  
55 - <element signature="e#12036#12388#0#PHP" expanded="false" />  
56 - <element signature="e#12394#13078#0#PHP" expanded="false" />  
57 - <element signature="e#13083#14342#0#PHP" expanded="false" />  
58 - <element signature="e#14348#14810#0#PHP" expanded="false" />  
59 - <element signature="e#14815#17020#0#PHP" expanded="false" />  
60 - <element signature="e#17026#17635#0#PHP" expanded="false" />  
61 - <element signature="e#17640#18973#0#PHP" expanded="false" />  
62 - <element signature="e#18979#19336#0#PHP" expanded="false" />  
63 - <element signature="e#19341#20222#0#PHP" expanded="false" />  
64 - <element signature="e#20228#20580#0#PHP" expanded="false" />  
65 - <element signature="e#20585#21662#0#PHP" expanded="false" />  
66 - <element signature="e#21668#22023#0#PHP" expanded="false" />  
67 - <element signature="e#22028#23108#0#PHP" expanded="false" />  
68 - </folding>  
69 - </state>  
70 - </provider>  
71 - </entry>  
72 - </file>  
73 <file leaf-file-name="ShopgoodsController.php" pinned="false" current-in-tab="true"> 28 <file leaf-file-name="ShopgoodsController.php" pinned="false" current-in-tab="true">
74 <entry file="file://$PROJECT_DIR$/api/index/controller/ShopgoodsController.php"> 29 <entry file="file://$PROJECT_DIR$/api/index/controller/ShopgoodsController.php">
75 <provider selected="true" editor-type-id="text-editor"> 30 <provider selected="true" editor-type-id="text-editor">
76 - <state relative-caret-position="232">  
77 - <caret line="270" column="0" lean-forward="true" selection-start-line="270" selection-start-column="0" selection-end-line="270" selection-end-column="0" /> 31 + <state relative-caret-position="313">
  32 + <caret line="415" column="28" lean-forward="true" selection-start-line="415" selection-start-column="28" selection-end-line="415" selection-end-column="28" />
78 <folding> 33 <folding>
79 <element signature="e#411#604#0#PHP" expanded="false" /> 34 <element signature="e#411#604#0#PHP" expanded="false" />
80 <element signature="e#609#825#0#PHP" expanded="false" /> 35 <element signature="e#609#825#0#PHP" expanded="false" />
@@ -86,6 +41,7 @@ @@ -86,6 +41,7 @@
86 <element signature="e#3057#3575#0#PHP" expanded="false" /> 41 <element signature="e#3057#3575#0#PHP" expanded="false" />
87 <element signature="e#3581#4093#0#PHP" expanded="false" /> 42 <element signature="e#3581#4093#0#PHP" expanded="false" />
88 <element signature="e#4098#4661#0#PHP" expanded="false" /> 43 <element signature="e#4098#4661#0#PHP" expanded="false" />
  44 + <element signature="e#4667#5257#0#PHP" expanded="false" />
89 <element signature="e#5262#6260#0#PHP" expanded="false" /> 45 <element signature="e#5262#6260#0#PHP" expanded="false" />
90 <element signature="e#6266#6584#0#PHP" expanded="false" /> 46 <element signature="e#6266#6584#0#PHP" expanded="false" />
91 <element signature="e#6589#6965#0#PHP" expanded="false" /> 47 <element signature="e#6589#6965#0#PHP" expanded="false" />
@@ -97,38 +53,6 @@ @@ -97,38 +53,6 @@
97 <element signature="e#9264#10115#0#PHP" expanded="false" /> 53 <element signature="e#9264#10115#0#PHP" expanded="false" />
98 <element signature="e#10121#10391#0#PHP" expanded="false" /> 54 <element signature="e#10121#10391#0#PHP" expanded="false" />
99 <element signature="e#10396#10872#0#PHP" expanded="false" /> 55 <element signature="e#10396#10872#0#PHP" expanded="false" />
100 - <element signature="e#10878#11438#0#PHP" expanded="false" />  
101 - <element signature="e#11443#12270#0#PHP" expanded="false" />  
102 - </folding>  
103 - </state>  
104 - </provider>  
105 - </entry>  
106 - </file>  
107 - <file leaf-file-name="RestBaseController.php" pinned="false" current-in-tab="false">  
108 - <entry file="file://$PROJECT_DIR$/simplewind/cmf/controller/RestBaseController.php">  
109 - <provider selected="true" editor-type-id="text-editor">  
110 - <state relative-caret-position="1975">  
111 - <caret line="93" column="57" lean-forward="false" selection-start-line="93" selection-start-column="57" selection-end-line="93" selection-end-column="57" />  
112 - <folding />  
113 - </state>  
114 - </provider>  
115 - </entry>  
116 - </file>  
117 - <file leaf-file-name="SubscribeController.php" pinned="false" current-in-tab="false">  
118 - <entry file="file://$PROJECT_DIR$/api/index/controller/SubscribeController.php">  
119 - <provider selected="true" editor-type-id="text-editor">  
120 - <state relative-caret-position="625">  
121 - <caret line="136" column="0" lean-forward="false" selection-start-line="136" selection-start-column="0" selection-end-line="136" selection-end-column="0" />  
122 - <folding>  
123 - <element signature="e#305#577#0#PHP" expanded="false" />  
124 - <element signature="e#583#854#0#PHP" expanded="false" />  
125 - <element signature="e#859#1113#0#PHP" expanded="false" />  
126 - <element signature="e#1119#1594#0#PHP" expanded="false" />  
127 - <element signature="e#1599#2490#0#PHP" expanded="false" />  
128 - <element signature="e#2497#2911#0#PHP" expanded="false" />  
129 - <element signature="e#2916#3386#0#PHP" expanded="false" />  
130 - <element signature="e#3393#3889#0#PHP" expanded="false" />  
131 - <element signature="e#3894#4897#0#PHP" expanded="false" />  
132 </folding> 56 </folding>
133 </state> 57 </state>
134 </provider> 58 </provider>
@@ -223,8 +147,8 @@ @@ -223,8 +147,8 @@
223 </component> 147 </component>
224 <component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" /> 148 <component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" />
225 <component name="ProjectFrameBounds"> 149 <component name="ProjectFrameBounds">
226 - <option name="x" value="345" />  
227 - <option name="y" value="54" /> 150 + <option name="x" value="414" />
  151 + <option name="y" value="18" />
228 <option name="width" value="1582" /> 152 <option name="width" value="1582" />
229 <option name="height" value="969" /> 153 <option name="height" value="969" />
230 </component> 154 </component>
@@ -366,15 +290,15 @@ @@ -366,15 +290,15 @@
366 <workItem from="1575016153150" duration="3315000" /> 290 <workItem from="1575016153150" duration="3315000" />
367 <workItem from="1575246616478" duration="21722000" /> 291 <workItem from="1575246616478" duration="21722000" />
368 <workItem from="1575278769037" duration="7395000" /> 292 <workItem from="1575278769037" duration="7395000" />
369 - <workItem from="1575332430854" duration="3225000" /> 293 + <workItem from="1575332430854" duration="3632000" />
370 </task> 294 </task>
371 <servers /> 295 <servers />
372 </component> 296 </component>
373 <component name="TimeTrackingManager"> 297 <component name="TimeTrackingManager">
374 - <option name="totallyTimeSpent" value="413683000" /> 298 + <option name="totallyTimeSpent" value="414090000" />
375 </component> 299 </component>
376 <component name="ToolWindowManager"> 300 <component name="ToolWindowManager">
377 - <frame x="345" y="54" width="1582" height="969" extended-state="0" /> 301 + <frame x="414" y="18" width="1582" height="969" extended-state="0" />
378 <editor active="true" /> 302 <editor active="true" />
379 <layout> 303 <layout>
380 <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.19513798" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" /> 304 <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.19513798" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
@@ -624,13 +548,6 @@ @@ -624,13 +548,6 @@
624 </state> 548 </state>
625 </provider> 549 </provider>
626 </entry> 550 </entry>
627 - <entry file="file://$PROJECT_DIR$/api/index/controller/RecycleController.php">  
628 - <provider selected="true" editor-type-id="text-editor">  
629 - <state relative-caret-position="579">  
630 - <caret line="469" column="33" lean-forward="false" selection-start-line="469" selection-start-column="33" selection-end-line="469" selection-end-column="33" />  
631 - </state>  
632 - </provider>  
633 - </entry>  
634 <entry file="file://$PROJECT_DIR$/public/themes/admin_simpleboot3/admin/rtype/edit.html"> 551 <entry file="file://$PROJECT_DIR$/public/themes/admin_simpleboot3/admin/rtype/edit.html">
635 <provider selected="true" editor-type-id="text-editor"> 552 <provider selected="true" editor-type-id="text-editor">
636 <state relative-caret-position="0"> 553 <state relative-caret-position="0">
@@ -745,36 +662,18 @@ @@ -745,36 +662,18 @@
745 </state> 662 </state>
746 </provider> 663 </provider>
747 </entry> 664 </entry>
748 - <entry file="file://$PROJECT_DIR$/api/index/controller/SubscribeController.php">  
749 - <provider selected="true" editor-type-id="text-editor">  
750 - <state relative-caret-position="625">  
751 - <caret line="136" column="0" lean-forward="false" selection-start-line="136" selection-start-column="0" selection-end-line="136" selection-end-column="0" />  
752 - <folding>  
753 - <element signature="e#305#577#0#PHP" expanded="false" />  
754 - <element signature="e#583#854#0#PHP" expanded="false" />  
755 - <element signature="e#859#1113#0#PHP" expanded="false" />  
756 - <element signature="e#1119#1594#0#PHP" expanded="false" />  
757 - <element signature="e#1599#2490#0#PHP" expanded="false" />  
758 - <element signature="e#2497#2911#0#PHP" expanded="false" />  
759 - <element signature="e#2916#3386#0#PHP" expanded="false" />  
760 - <element signature="e#3393#3889#0#PHP" expanded="false" />  
761 - <element signature="e#3894#4897#0#PHP" expanded="false" />  
762 - </folding>  
763 - </state>  
764 - </provider>  
765 - </entry>  
766 - <entry file="file://$PROJECT_DIR$/simplewind/cmf/controller/RestBaseController.php"> 665 + <entry file="file://$PROJECT_DIR$/api/index/model/ShopgoodsModel.php">
767 <provider selected="true" editor-type-id="text-editor"> 666 <provider selected="true" editor-type-id="text-editor">
768 - <state relative-caret-position="1975">  
769 - <caret line="93" column="57" lean-forward="false" selection-start-line="93" selection-start-column="57" selection-end-line="93" selection-end-column="57" /> 667 + <state relative-caret-position="106">
  668 + <caret line="13" column="34" lean-forward="true" selection-start-line="13" selection-start-column="34" selection-end-line="13" selection-end-column="34" />
770 <folding /> 669 <folding />
771 </state> 670 </state>
772 </provider> 671 </provider>
773 </entry> 672 </entry>
774 <entry file="file://$PROJECT_DIR$/api/index/controller/UserController.php"> 673 <entry file="file://$PROJECT_DIR$/api/index/controller/UserController.php">
775 <provider selected="true" editor-type-id="text-editor"> 674 <provider selected="true" editor-type-id="text-editor">
776 - <state relative-caret-position="275">  
777 - <caret line="764" column="9" lean-forward="false" selection-start-line="764" selection-start-column="9" selection-end-line="764" selection-end-column="9" /> 675 + <state relative-caret-position="235">
  676 + <caret line="36" column="27" lean-forward="false" selection-start-line="36" selection-start-column="27" selection-end-line="36" selection-end-column="27" />
778 <folding> 677 <folding>
779 <element signature="e#345#694#0#PHP" expanded="false" /> 678 <element signature="e#345#694#0#PHP" expanded="false" />
780 <element signature="e#699#1464#0#PHP" expanded="false" /> 679 <element signature="e#699#1464#0#PHP" expanded="false" />
@@ -810,22 +709,65 @@ @@ -810,22 +709,65 @@
810 <element signature="e#20585#21662#0#PHP" expanded="false" /> 709 <element signature="e#20585#21662#0#PHP" expanded="false" />
811 <element signature="e#21668#22023#0#PHP" expanded="false" /> 710 <element signature="e#21668#22023#0#PHP" expanded="false" />
812 <element signature="e#22028#23108#0#PHP" expanded="false" /> 711 <element signature="e#22028#23108#0#PHP" expanded="false" />
  712 + <element signature="e#23114#23538#0#PHP" expanded="false" />
  713 + <element signature="e#23543#24154#0#PHP" expanded="false" />
813 </folding> 714 </folding>
814 </state> 715 </state>
815 </provider> 716 </provider>
816 </entry> 717 </entry>
817 - <entry file="file://$PROJECT_DIR$/api/index/model/ShopgoodsModel.php"> 718 + <entry file="file://$PROJECT_DIR$/simplewind/cmf/controller/RestBaseController.php">
818 <provider selected="true" editor-type-id="text-editor"> 719 <provider selected="true" editor-type-id="text-editor">
819 - <state relative-caret-position="106">  
820 - <caret line="13" column="34" lean-forward="true" selection-start-line="13" selection-start-column="34" selection-end-line="13" selection-end-column="34" /> 720 + <state relative-caret-position="210">
  721 + <caret line="93" column="57" lean-forward="false" selection-start-line="93" selection-start-column="57" selection-end-line="93" selection-end-column="57" />
821 <folding /> 722 <folding />
822 </state> 723 </state>
823 </provider> 724 </provider>
824 </entry> 725 </entry>
  726 + <entry file="file://$PROJECT_DIR$/api/index/controller/RecycleController.php">
  727 + <provider selected="true" editor-type-id="text-editor">
  728 + <state relative-caret-position="-194">
  729 + <caret line="37" column="28" lean-forward="false" selection-start-line="37" selection-start-column="28" selection-end-line="37" selection-end-column="28" />
  730 + <folding>
  731 + <element signature="e#342#596#0#PHP" expanded="false" />
  732 + <element signature="e#601#886#0#PHP" expanded="false" />
  733 + <element signature="e#892#1227#0#PHP" expanded="false" />
  734 + <element signature="e#1232#1729#0#PHP" expanded="false" />
  735 + <element signature="e#1735#1995#0#PHP" expanded="false" />
  736 + <element signature="e#2000#2289#0#PHP" expanded="false" />
  737 + <element signature="e#2295#2634#0#PHP" expanded="false" />
  738 + <element signature="e#2639#3142#0#PHP" expanded="false" />
  739 + <element signature="e#3148#3364#0#PHP" expanded="false" />
  740 + <element signature="e#3369#3738#0#PHP" expanded="false" />
  741 + <element signature="e#3744#4046#0#PHP" expanded="false" />
  742 + <element signature="e#4051#4450#0#PHP" expanded="false" />
  743 + <element signature="e#4456#4653#0#PHP" expanded="false" />
  744 + <element signature="e#4658#4915#0#PHP" expanded="false" />
  745 + <element signature="e#4921#5117#0#PHP" expanded="false" />
  746 + <element signature="e#5122#5384#0#PHP" expanded="false" />
  747 + </folding>
  748 + </state>
  749 + </provider>
  750 + </entry>
  751 + <entry file="file://$PROJECT_DIR$/api/index/controller/SubscribeController.php">
  752 + <provider selected="true" editor-type-id="text-editor">
  753 + <state relative-caret-position="407">
  754 + <caret line="167" column="8" lean-forward="false" selection-start-line="167" selection-start-column="8" selection-end-line="173" selection-end-column="11" />
  755 + <folding>
  756 + <element signature="e#583#854#0#PHP" expanded="false" />
  757 + <element signature="e#859#1113#0#PHP" expanded="false" />
  758 + <element signature="e#1119#1594#0#PHP" expanded="false" />
  759 + <element signature="e#1599#2490#0#PHP" expanded="false" />
  760 + <element signature="e#2497#2911#0#PHP" expanded="false" />
  761 + <element signature="e#2916#3386#0#PHP" expanded="false" />
  762 + <element signature="e#3393#3889#0#PHP" expanded="false" />
  763 + </folding>
  764 + </state>
  765 + </provider>
  766 + </entry>
825 <entry file="file://$PROJECT_DIR$/api/index/controller/ShopgoodsController.php"> 767 <entry file="file://$PROJECT_DIR$/api/index/controller/ShopgoodsController.php">
826 <provider selected="true" editor-type-id="text-editor"> 768 <provider selected="true" editor-type-id="text-editor">
827 - <state relative-caret-position="232">  
828 - <caret line="270" column="0" lean-forward="true" selection-start-line="270" selection-start-column="0" selection-end-line="270" selection-end-column="0" /> 769 + <state relative-caret-position="313">
  770 + <caret line="415" column="28" lean-forward="true" selection-start-line="415" selection-start-column="28" selection-end-line="415" selection-end-column="28" />
829 <folding> 771 <folding>
830 <element signature="e#411#604#0#PHP" expanded="false" /> 772 <element signature="e#411#604#0#PHP" expanded="false" />
831 <element signature="e#609#825#0#PHP" expanded="false" /> 773 <element signature="e#609#825#0#PHP" expanded="false" />
@@ -837,6 +779,7 @@ @@ -837,6 +779,7 @@
837 <element signature="e#3057#3575#0#PHP" expanded="false" /> 779 <element signature="e#3057#3575#0#PHP" expanded="false" />
838 <element signature="e#3581#4093#0#PHP" expanded="false" /> 780 <element signature="e#3581#4093#0#PHP" expanded="false" />
839 <element signature="e#4098#4661#0#PHP" expanded="false" /> 781 <element signature="e#4098#4661#0#PHP" expanded="false" />
  782 + <element signature="e#4667#5257#0#PHP" expanded="false" />
840 <element signature="e#5262#6260#0#PHP" expanded="false" /> 783 <element signature="e#5262#6260#0#PHP" expanded="false" />
841 <element signature="e#6266#6584#0#PHP" expanded="false" /> 784 <element signature="e#6266#6584#0#PHP" expanded="false" />
842 <element signature="e#6589#6965#0#PHP" expanded="false" /> 785 <element signature="e#6589#6965#0#PHP" expanded="false" />
@@ -848,8 +791,6 @@ @@ -848,8 +791,6 @@
848 <element signature="e#9264#10115#0#PHP" expanded="false" /> 791 <element signature="e#9264#10115#0#PHP" expanded="false" />
849 <element signature="e#10121#10391#0#PHP" expanded="false" /> 792 <element signature="e#10121#10391#0#PHP" expanded="false" />
850 <element signature="e#10396#10872#0#PHP" expanded="false" /> 793 <element signature="e#10396#10872#0#PHP" expanded="false" />
851 - <element signature="e#10878#11438#0#PHP" expanded="false" />  
852 - <element signature="e#11443#12270#0#PHP" expanded="false" />  
853 </folding> 794 </folding>
854 </state> 795 </state>
855 </provider> 796 </provider>
@@ -396,6 +396,12 @@ class ShopgoodsController extends RestBaseController @@ -396,6 +396,12 @@ class ShopgoodsController extends RestBaseController
396 public function shoporder() 396 public function shoporder()
397 { 397 {
398 $user_id = $this->getUserId(); 398 $user_id = $this->getUserId();
  399 + $login = Db::name('integral')
  400 + ->where('user_id',$user_id)
  401 + ->find();
  402 + if(empty($login)){
  403 + $this->error(['code'=>40005,'msg'=>'请先注册']);
  404 + }
399 $param = $this->request->param(); 405 $param = $this->request->param();
400 $param['user_id'] = $user_id; 406 $param['user_id'] = $user_id;
401 $param['create_time'] = time(); 407 $param['create_time'] = time();
@@ -407,6 +413,14 @@ class ShopgoodsController extends RestBaseController @@ -407,6 +413,14 @@ class ShopgoodsController extends RestBaseController
407 'express'=>'require', 413 'express'=>'require',
408 'content'=>'require' 414 'content'=>'require'
409 ]); 415 ]);
  416 + $validate->message([
  417 + 'shoprecycle_id'=>'收货地址不能为空',
  418 + 'shopgoods_id'=>'商品ID不能为空',
  419 + 'num'=>'购买数量不能为空',
  420 + 'total'=>'总价不能为空',
  421 + 'express'=>'配送方式不能为空',
  422 + 'content'=>'留言备注不能为空'
  423 + ]);
410 if (!$validate->check($param)) { 424 if (!$validate->check($param)) {
411 $this->error(['code'=>40005,'msg'=>$validate->getError()]); 425 $this->error(['code'=>40005,'msg'=>$validate->getError()]);
412 } 426 }