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

修改我的回收订单

... ... @@ -24,11 +24,11 @@
<select />
</component>
<component name="FileEditorManager">
<leaf>
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file leaf-file-name="HomeController.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/api/index/controller/HomeController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="498">
<state relative-caret-position="1150">
<caret line="355" column="31" lean-forward="false" selection-start-line="355" selection-start-column="31" selection-end-line="355" selection-end-column="31" />
<folding>
<element signature="e#329#544#0#PHP" expanded="false" />
... ... @@ -63,8 +63,8 @@
<file leaf-file-name="UserController.php" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/api/index/controller/UserController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-152">
<caret line="833" column="7" lean-forward="true" selection-start-line="833" selection-start-column="7" selection-end-line="833" selection-end-column="7" />
<state relative-caret-position="1057">
<caret line="283" column="9" lean-forward="true" selection-start-line="283" selection-start-column="9" selection-end-line="283" selection-end-column="9" />
<folding>
<element signature="e#366#715#0#PHP" expanded="false" />
<element signature="e#720#1485#0#PHP" expanded="false" />
... ... @@ -78,28 +78,38 @@
<element signature="e#4919#5120#0#PHP" expanded="false" />
<element signature="e#5126#5388#0#PHP" expanded="false" />
<element signature="e#5393#5598#0#PHP" expanded="false" />
<element signature="e#6050#7278#0#PHP" expanded="false" />
<element signature="e#7301#7846#0#PHP" expanded="false" />
<element signature="e#8137#8529#0#PHP" expanded="false" />
<element signature="e#9088#10287#0#PHP" expanded="false" />
<element signature="e#10754#12017#0#PHP" expanded="false" />
<element signature="e#12040#12392#0#PHP" expanded="false" />
<element signature="e#13087#14346#0#PHP" expanded="false" />
<element signature="e#14818#17023#0#PHP" expanded="false" />
<element signature="e#17643#18976#0#PHP" expanded="false" />
<element signature="e#19344#20225#0#PHP" expanded="false" />
<element signature="e#20588#21665#0#PHP" expanded="false" />
<element signature="e#22031#23111#0#PHP" expanded="false" />
<element signature="e#23546#24157#0#PHP" expanded="false" />
<element signature="e#24664#25771#0#PHP" expanded="false" />
<element signature="e#26066#26644#0#PHP" expanded="false" />
<element signature="e#26665#26984#0#PHP" expanded="false" />
<element signature="e#26990#27398#0#PHP" expanded="false" />
<element signature="e#27404#28163#0#PHP" expanded="false" />
<element signature="e#28183#29047#0#PHP" expanded="false" />
<element signature="e#29074#29474#0#PHP" expanded="false" />
<element signature="e#29498#30071#0#PHP" expanded="false" />
<element signature="e#30094#30904#0#PHP" expanded="false" />
<element signature="e#7850#8130#0#PHP" expanded="false" />
<element signature="e#8135#8527#0#PHP" expanded="false" />
<element signature="e#8533#9081#0#PHP" expanded="false" />
<element signature="e#9086#10285#0#PHP" expanded="false" />
<element signature="e#10291#10747#0#PHP" expanded="false" />
<element signature="e#10752#12015#0#PHP" expanded="false" />
<element signature="e#12038#12390#0#PHP" expanded="false" />
<element signature="e#12396#13080#0#PHP" expanded="false" />
<element signature="e#13085#14344#0#PHP" expanded="false" />
<element signature="e#14350#14811#0#PHP" expanded="false" />
<element signature="e#14816#17021#0#PHP" expanded="false" />
<element signature="e#17027#17636#0#PHP" expanded="false" />
<element signature="e#17641#18974#0#PHP" expanded="false" />
<element signature="e#18980#19337#0#PHP" expanded="false" />
<element signature="e#19342#20223#0#PHP" expanded="false" />
<element signature="e#20229#20581#0#PHP" expanded="false" />
<element signature="e#20586#21663#0#PHP" expanded="false" />
<element signature="e#21669#22024#0#PHP" expanded="false" />
<element signature="e#22029#23109#0#PHP" expanded="false" />
<element signature="e#23115#23539#0#PHP" expanded="false" />
<element signature="e#23544#24155#0#PHP" expanded="false" />
<element signature="e#24161#24657#0#PHP" expanded="false" />
<element signature="e#24662#25769#0#PHP" expanded="false" />
<element signature="e#25775#26059#0#PHP" expanded="false" />
<element signature="e#26064#26642#0#PHP" expanded="false" />
<element signature="e#26663#26982#0#PHP" expanded="false" />
<element signature="e#26988#27396#0#PHP" expanded="false" />
<element signature="e#27402#28161#0#PHP" expanded="false" />
<element signature="e#28181#29045#0#PHP" expanded="false" />
<element signature="e#29072#29472#0#PHP" expanded="false" />
<element signature="e#29496#30069#0#PHP" expanded="false" />
<element signature="e#30092#30902#0#PHP" expanded="false" />
</folding>
</state>
</provider>
... ... @@ -194,8 +204,8 @@
</component>
<component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" />
<component name="ProjectFrameBounds">
<option name="x" value="418" />
<option name="y" value="66" />
<option name="x" value="310" />
<option name="y" value="12" />
<option name="width" value="1582" />
<option name="height" value="960" />
</component>
... ... @@ -214,6 +224,7 @@
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="Scratches" />
<pane id="Scope" />
<pane id="ProjectPane">
<subPane>
... ... @@ -244,12 +255,11 @@
<select />
</subPane>
</pane>
<pane id="Scratches" />
</panes>
</component>
<component name="PropertiesComponent">
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/../../areial" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="DefaultHtmlFileTemplate" value="HTML File" />
</component>
<component name="RecentsManager">
... ... @@ -340,27 +350,28 @@
<workItem from="1575332430854" duration="21245000" />
<workItem from="1575359408189" duration="10054000" />
<workItem from="1575419186725" duration="599000" />
<workItem from="1575420787741" duration="2280000" />
<workItem from="1575420787741" duration="2879000" />
<workItem from="1575431441427" duration="4417000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="444636000" />
<option name="totallyTimeSpent" value="449652000" />
</component>
<component name="ToolWindowManager">
<frame x="418" y="66" width="1582" height="960" extended-state="0" />
<frame x="310" y="12" width="1582" height="960" 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.17017083" 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.17214192" 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="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.32982457" sideWeight="0.5" order="3" 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="7" 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.33" 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="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.25086308" sideWeight="0.5" order="7" 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="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="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
... ... @@ -813,7 +824,7 @@
</entry>
<entry file="file://$PROJECT_DIR$/api/index/controller/HomeController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="498">
<state relative-caret-position="1150">
<caret line="355" column="31" lean-forward="false" selection-start-line="355" selection-start-column="31" selection-end-line="355" selection-end-column="31" />
<folding>
<element signature="e#329#544#0#PHP" expanded="false" />
... ... @@ -846,8 +857,8 @@
</entry>
<entry file="file://$PROJECT_DIR$/api/index/controller/UserController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-152">
<caret line="833" column="7" lean-forward="true" selection-start-line="833" selection-start-column="7" selection-end-line="833" selection-end-column="7" />
<state relative-caret-position="1057">
<caret line="283" column="9" lean-forward="true" selection-start-line="283" selection-start-column="9" selection-end-line="283" selection-end-column="9" />
<folding>
<element signature="e#366#715#0#PHP" expanded="false" />
<element signature="e#720#1485#0#PHP" expanded="false" />
... ... @@ -861,28 +872,38 @@
<element signature="e#4919#5120#0#PHP" expanded="false" />
<element signature="e#5126#5388#0#PHP" expanded="false" />
<element signature="e#5393#5598#0#PHP" expanded="false" />
<element signature="e#6050#7278#0#PHP" expanded="false" />
<element signature="e#7301#7846#0#PHP" expanded="false" />
<element signature="e#8137#8529#0#PHP" expanded="false" />
<element signature="e#9088#10287#0#PHP" expanded="false" />
<element signature="e#10754#12017#0#PHP" expanded="false" />
<element signature="e#12040#12392#0#PHP" expanded="false" />
<element signature="e#13087#14346#0#PHP" expanded="false" />
<element signature="e#14818#17023#0#PHP" expanded="false" />
<element signature="e#17643#18976#0#PHP" expanded="false" />
<element signature="e#19344#20225#0#PHP" expanded="false" />
<element signature="e#20588#21665#0#PHP" expanded="false" />
<element signature="e#22031#23111#0#PHP" expanded="false" />
<element signature="e#23546#24157#0#PHP" expanded="false" />
<element signature="e#24664#25771#0#PHP" expanded="false" />
<element signature="e#26066#26644#0#PHP" expanded="false" />
<element signature="e#26665#26984#0#PHP" expanded="false" />
<element signature="e#26990#27398#0#PHP" expanded="false" />
<element signature="e#27404#28163#0#PHP" expanded="false" />
<element signature="e#28183#29047#0#PHP" expanded="false" />
<element signature="e#29074#29474#0#PHP" expanded="false" />
<element signature="e#29498#30071#0#PHP" expanded="false" />
<element signature="e#30094#30904#0#PHP" expanded="false" />
<element signature="e#7850#8130#0#PHP" expanded="false" />
<element signature="e#8135#8527#0#PHP" expanded="false" />
<element signature="e#8533#9081#0#PHP" expanded="false" />
<element signature="e#9086#10285#0#PHP" expanded="false" />
<element signature="e#10291#10747#0#PHP" expanded="false" />
<element signature="e#10752#12015#0#PHP" expanded="false" />
<element signature="e#12038#12390#0#PHP" expanded="false" />
<element signature="e#12396#13080#0#PHP" expanded="false" />
<element signature="e#13085#14344#0#PHP" expanded="false" />
<element signature="e#14350#14811#0#PHP" expanded="false" />
<element signature="e#14816#17021#0#PHP" expanded="false" />
<element signature="e#17027#17636#0#PHP" expanded="false" />
<element signature="e#17641#18974#0#PHP" expanded="false" />
<element signature="e#18980#19337#0#PHP" expanded="false" />
<element signature="e#19342#20223#0#PHP" expanded="false" />
<element signature="e#20229#20581#0#PHP" expanded="false" />
<element signature="e#20586#21663#0#PHP" expanded="false" />
<element signature="e#21669#22024#0#PHP" expanded="false" />
<element signature="e#22029#23109#0#PHP" expanded="false" />
<element signature="e#23115#23539#0#PHP" expanded="false" />
<element signature="e#23544#24155#0#PHP" expanded="false" />
<element signature="e#24161#24657#0#PHP" expanded="false" />
<element signature="e#24662#25769#0#PHP" expanded="false" />
<element signature="e#25775#26059#0#PHP" expanded="false" />
<element signature="e#26064#26642#0#PHP" expanded="false" />
<element signature="e#26663#26982#0#PHP" expanded="false" />
<element signature="e#26988#27396#0#PHP" expanded="false" />
<element signature="e#27402#28161#0#PHP" expanded="false" />
<element signature="e#28181#29045#0#PHP" expanded="false" />
<element signature="e#29072#29472#0#PHP" expanded="false" />
<element signature="e#29496#30069#0#PHP" expanded="false" />
<element signature="e#30092#30902#0#PHP" expanded="false" />
</folding>
</state>
</provider>
... ...
... ... @@ -242,7 +242,8 @@ class UserController extends RestBaseController
->where('user_id',$user_id)
->where('status',0)
->field('id,num,create_time,sub_time,attr_id')
->select();
->select()
->toArray();
$res = $this->r_foreach($data);
$this->success('SUCCESS',$res);
}elseif ($status == 1){
... ... @@ -251,7 +252,8 @@ class UserController extends RestBaseController
->where('user_id',$user_id)
->where('status',1)
->field('id,num,create_time,sub_time,attr_id')
->select();
->select()
->toArray();
$res = $this->r_foreach($data);
$this->success('SUCCESS',$res);
}elseif ($status == 2){
... ... @@ -260,7 +262,8 @@ class UserController extends RestBaseController
->where('user_id',$user_id)
->where('status',2)
->field('id,num,create_time,sub_time,attr_id')
->select();
->select()
->toArray();
$res = $this->r_foreach($data);
$this->success('SUCCESS',$res);
}
... ... @@ -269,16 +272,14 @@ class UserController extends RestBaseController
//封装回收订单循环逻辑
public function r_foreach($res){
foreach ($res as &$v){
$v['rgoods_name'] = [];
$v['attr_id'] = explode(',',$v['attr_id']);
foreach ($v['attr_id'] as &$v1){
$v1 = Db::name('attr')
->alias('a')
->join('rgoods r','a.rgoods_id=r.id')
->field('r.rgoods_name')
->where('id',$v1)
->where('a.id',$v1)
->find();
array_push($v['rgoods_name'],$v1);
}
}
return $res;
... ...