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

回收员订单

@@ -2,7 +2,8 @@ @@ -2,7 +2,8 @@
2 <project version="4"> 2 <project version="4">
3 <component name="ChangeListManager"> 3 <component name="ChangeListManager">
4 <list default="true" id="0011664b-87e9-41bd-9f37-18792fb15777" name="Default" comment=""> 4 <list default="true" id="0011664b-87e9-41bd-9f37-18792fb15777" name="Default" comment="">
5 - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/api/index/controller/SubscribeController.php" afterPath="$PROJECT_DIR$/api/index/controller/SubscribeController.php" /> 5 + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
  6 + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/api/index/controller/UserController.php" afterPath="$PROJECT_DIR$/api/index/controller/UserController.php" />
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" />
@@ -24,11 +25,11 @@ @@ -24,11 +25,11 @@
24 </component> 25 </component>
25 <component name="FileEditorManager"> 26 <component name="FileEditorManager">
26 <leaf SIDE_TABS_SIZE_LIMIT_KEY="300"> 27 <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
27 - <file leaf-file-name="UserController.php" pinned="false" current-in-tab="false"> 28 + <file leaf-file-name="UserController.php" pinned="false" current-in-tab="true">
28 <entry file="file://$PROJECT_DIR$/api/index/controller/UserController.php"> 29 <entry file="file://$PROJECT_DIR$/api/index/controller/UserController.php">
29 <provider selected="true" editor-type-id="text-editor"> 30 <provider selected="true" editor-type-id="text-editor">
30 - <state relative-caret-position="332">  
31 - <caret line="419" column="16" lean-forward="true" selection-start-line="419" selection-start-column="16" selection-end-line="419" selection-end-column="16" /> 31 + <state relative-caret-position="532">
  32 + <caret line="768" column="29" lean-forward="true" selection-start-line="768" selection-start-column="29" selection-end-line="768" selection-end-column="29" />
32 <folding> 33 <folding>
33 <element signature="e#345#694#0#PHP" expanded="false" /> 34 <element signature="e#345#694#0#PHP" expanded="false" />
34 <element signature="e#699#1464#0#PHP" expanded="false" /> 35 <element signature="e#699#1464#0#PHP" expanded="false" />
@@ -59,17 +60,31 @@ @@ -59,17 +60,31 @@
59 <element signature="e#17026#17635#0#PHP" expanded="false" /> 60 <element signature="e#17026#17635#0#PHP" expanded="false" />
60 <element signature="e#17640#18973#0#PHP" expanded="false" /> 61 <element signature="e#17640#18973#0#PHP" expanded="false" />
61 <element signature="e#18979#19336#0#PHP" expanded="false" /> 62 <element signature="e#18979#19336#0#PHP" expanded="false" />
62 - <element signature="e#19341#20183#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" />
63 </folding> 68 </folding>
64 </state> 69 </state>
65 </provider> 70 </provider>
66 </entry> 71 </entry>
67 </file> 72 </file>
68 - <file leaf-file-name="SubscribeController.php" pinned="false" current-in-tab="true"> 73 + <file leaf-file-name="RestBaseController.php" pinned="false" current-in-tab="false">
  74 + <entry file="file://$PROJECT_DIR$/simplewind/cmf/controller/RestBaseController.php">
  75 + <provider selected="true" editor-type-id="text-editor">
  76 + <state relative-caret-position="210">
  77 + <caret line="93" column="57" lean-forward="false" selection-start-line="93" selection-start-column="57" selection-end-line="93" selection-end-column="57" />
  78 + <folding />
  79 + </state>
  80 + </provider>
  81 + </entry>
  82 + </file>
  83 + <file leaf-file-name="SubscribeController.php" pinned="false" current-in-tab="false">
69 <entry file="file://$PROJECT_DIR$/api/index/controller/SubscribeController.php"> 84 <entry file="file://$PROJECT_DIR$/api/index/controller/SubscribeController.php">
70 <provider selected="true" editor-type-id="text-editor"> 85 <provider selected="true" editor-type-id="text-editor">
71 - <state relative-caret-position="357">  
72 - <caret line="170" column="34" lean-forward="true" selection-start-line="170" selection-start-column="34" selection-end-line="170" selection-end-column="34" /> 86 + <state relative-caret-position="532">
  87 + <caret line="136" column="0" lean-forward="true" selection-start-line="136" selection-start-column="0" selection-end-line="136" selection-end-column="0" />
73 <folding> 88 <folding>
74 <element signature="e#305#577#0#PHP" expanded="false" /> 89 <element signature="e#305#577#0#PHP" expanded="false" />
75 <element signature="e#583#854#0#PHP" expanded="false" /> 90 <element signature="e#583#854#0#PHP" expanded="false" />
@@ -79,6 +94,7 @@ @@ -79,6 +94,7 @@
79 <element signature="e#2497#2911#0#PHP" expanded="false" /> 94 <element signature="e#2497#2911#0#PHP" expanded="false" />
80 <element signature="e#2916#3386#0#PHP" expanded="false" /> 95 <element signature="e#2916#3386#0#PHP" expanded="false" />
81 <element signature="e#3393#3889#0#PHP" expanded="false" /> 96 <element signature="e#3393#3889#0#PHP" expanded="false" />
  97 + <element signature="e#3894#4897#0#PHP" expanded="false" />
82 </folding> 98 </folding>
83 </state> 99 </state>
84 </provider> 100 </provider>
@@ -139,7 +155,6 @@ @@ -139,7 +155,6 @@
139 <option value="$PROJECT_DIR$/api/config.php" /> 155 <option value="$PROJECT_DIR$/api/config.php" />
140 <option value="$PROJECT_DIR$/api/wxapp/controller/PublicController.php" /> 156 <option value="$PROJECT_DIR$/api/wxapp/controller/PublicController.php" />
141 <option value="$PROJECT_DIR$/api/index/controller/HomeController.php" /> 157 <option value="$PROJECT_DIR$/api/index/controller/HomeController.php" />
142 - <option value="$PROJECT_DIR$/simplewind/cmf/controller/RestBaseController.php" />  
143 <option value="$PROJECT_DIR$/app/user/controller/AdminIndexController.php" /> 158 <option value="$PROJECT_DIR$/app/user/controller/AdminIndexController.php" />
144 <option value="$PROJECT_DIR$/public/themes/admin_simpleboot3/user/admin_index/index.html" /> 159 <option value="$PROJECT_DIR$/public/themes/admin_simpleboot3/user/admin_index/index.html" />
145 <option value="$PROJECT_DIR$/app/admin/controller/UserController.php" /> 160 <option value="$PROJECT_DIR$/app/admin/controller/UserController.php" />
@@ -153,8 +168,9 @@ @@ -153,8 +168,9 @@
153 <option value="$PROJECT_DIR$/app/admin/controller/SubhomeController.php" /> 168 <option value="$PROJECT_DIR$/app/admin/controller/SubhomeController.php" />
154 <option value="$PROJECT_DIR$/public/themes/admin_simpleboot3/admin/subhome/index.html" /> 169 <option value="$PROJECT_DIR$/public/themes/admin_simpleboot3/admin/subhome/index.html" />
155 <option value="$PROJECT_DIR$/public/themes/simpleboot3/index/index.html" /> 170 <option value="$PROJECT_DIR$/public/themes/simpleboot3/index/index.html" />
156 - <option value="$PROJECT_DIR$/api/index/controller/UserController.php" />  
157 <option value="$PROJECT_DIR$/api/index/controller/SubscribeController.php" /> 171 <option value="$PROJECT_DIR$/api/index/controller/SubscribeController.php" />
  172 + <option value="$PROJECT_DIR$/simplewind/cmf/controller/RestBaseController.php" />
  173 + <option value="$PROJECT_DIR$/api/index/controller/UserController.php" />
158 </list> 174 </list>
159 </option> 175 </option>
160 </component> 176 </component>
@@ -173,8 +189,8 @@ @@ -173,8 +189,8 @@
173 </component> 189 </component>
174 <component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" /> 190 <component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" />
175 <component name="ProjectFrameBounds"> 191 <component name="ProjectFrameBounds">
176 - <option name="x" value="316" />  
177 - <option name="y" value="57" /> 192 + <option name="x" value="891" />
  193 + <option name="y" value="7" />
178 <option name="width" value="1582" /> 194 <option name="width" value="1582" />
179 <option name="height" value="969" /> 195 <option name="height" value="969" />
180 </component> 196 </component>
@@ -203,55 +219,20 @@ @@ -203,55 +219,20 @@
203 <path> 219 <path>
204 <item name="scrap" type="b2602c69:ProjectViewProjectNode" /> 220 <item name="scrap" type="b2602c69:ProjectViewProjectNode" />
205 <item name="scrap" type="2a2b976b:PhpTreeStructureProvider$1" /> 221 <item name="scrap" type="2a2b976b:PhpTreeStructureProvider$1" />
206 - <item name="app" type="2a2b976b:PhpTreeStructureProvider$1" />  
207 - </path>  
208 - <path>  
209 - <item name="scrap" type="b2602c69:ProjectViewProjectNode" />  
210 - <item name="scrap" type="2a2b976b:PhpTreeStructureProvider$1" />  
211 - <item name="app" type="2a2b976b:PhpTreeStructureProvider$1" />  
212 - <item name="admin" type="2a2b976b:PhpTreeStructureProvider$1" />  
213 - </path>  
214 - <path>  
215 - <item name="scrap" type="b2602c69:ProjectViewProjectNode" />  
216 - <item name="scrap" type="2a2b976b:PhpTreeStructureProvider$1" />  
217 - <item name="app" type="2a2b976b:PhpTreeStructureProvider$1" />  
218 - <item name="admin" type="2a2b976b:PhpTreeStructureProvider$1" />  
219 - <item name="controller" type="2a2b976b:PhpTreeStructureProvider$1" />  
220 - </path>  
221 - <path>  
222 - <item name="scrap" type="b2602c69:ProjectViewProjectNode" />  
223 - <item name="scrap" type="2a2b976b:PhpTreeStructureProvider$1" />  
224 - <item name="public" type="2a2b976b:PhpTreeStructureProvider$1" />  
225 - </path>  
226 - <path>  
227 - <item name="scrap" type="b2602c69:ProjectViewProjectNode" />  
228 - <item name="scrap" type="2a2b976b:PhpTreeStructureProvider$1" />  
229 - <item name="public" type="2a2b976b:PhpTreeStructureProvider$1" />  
230 - <item name="themes" type="2a2b976b:PhpTreeStructureProvider$1" /> 222 + <item name="api" type="2a2b976b:PhpTreeStructureProvider$1" />
231 </path> 223 </path>
232 <path> 224 <path>
233 <item name="scrap" type="b2602c69:ProjectViewProjectNode" /> 225 <item name="scrap" type="b2602c69:ProjectViewProjectNode" />
234 <item name="scrap" type="2a2b976b:PhpTreeStructureProvider$1" /> 226 <item name="scrap" type="2a2b976b:PhpTreeStructureProvider$1" />
235 - <item name="public" type="2a2b976b:PhpTreeStructureProvider$1" />  
236 - <item name="themes" type="2a2b976b:PhpTreeStructureProvider$1" />  
237 - <item name="simpleboot3" type="2a2b976b:PhpTreeStructureProvider$1" />  
238 - </path>  
239 - <path>  
240 - <item name="scrap" type="b2602c69:ProjectViewProjectNode" />  
241 - <item name="scrap" type="2a2b976b:PhpTreeStructureProvider$1" />  
242 - <item name="public" type="2a2b976b:PhpTreeStructureProvider$1" />  
243 - <item name="themes" type="2a2b976b:PhpTreeStructureProvider$1" />  
244 - <item name="simpleboot3" type="2a2b976b:PhpTreeStructureProvider$1" /> 227 + <item name="api" type="2a2b976b:PhpTreeStructureProvider$1" />
245 <item name="index" type="2a2b976b:PhpTreeStructureProvider$1" /> 228 <item name="index" type="2a2b976b:PhpTreeStructureProvider$1" />
246 </path> 229 </path>
247 <path> 230 <path>
248 <item name="scrap" type="b2602c69:ProjectViewProjectNode" /> 231 <item name="scrap" type="b2602c69:ProjectViewProjectNode" />
249 <item name="scrap" type="2a2b976b:PhpTreeStructureProvider$1" /> 232 <item name="scrap" type="2a2b976b:PhpTreeStructureProvider$1" />
250 - <item name="public" type="2a2b976b:PhpTreeStructureProvider$1" />  
251 - <item name="themes" type="2a2b976b:PhpTreeStructureProvider$1" />  
252 - <item name="simpleboot3" type="2a2b976b:PhpTreeStructureProvider$1" /> 233 + <item name="api" type="2a2b976b:PhpTreeStructureProvider$1" />
253 <item name="index" type="2a2b976b:PhpTreeStructureProvider$1" /> 234 <item name="index" type="2a2b976b:PhpTreeStructureProvider$1" />
254 - <item name="user" type="2a2b976b:PhpTreeStructureProvider$1" /> 235 + <item name="controller" type="2a2b976b:PhpTreeStructureProvider$1" />
255 </path> 236 </path>
256 </expand> 237 </expand>
257 <select /> 238 <select />
@@ -350,15 +331,15 @@ @@ -350,15 +331,15 @@
350 <workItem from="1574986868818" duration="22318000" /> 331 <workItem from="1574986868818" duration="22318000" />
351 <workItem from="1575016153150" duration="3315000" /> 332 <workItem from="1575016153150" duration="3315000" />
352 <workItem from="1575246616478" duration="21722000" /> 333 <workItem from="1575246616478" duration="21722000" />
353 - <workItem from="1575278769037" duration="233000" /> 334 + <workItem from="1575278769037" duration="7368000" />
354 </task> 335 </task>
355 <servers /> 336 <servers />
356 </component> 337 </component>
357 <component name="TimeTrackingManager"> 338 <component name="TimeTrackingManager">
358 - <option name="totallyTimeSpent" value="403296000" /> 339 + <option name="totallyTimeSpent" value="410431000" />
359 </component> 340 </component>
360 <component name="ToolWindowManager"> 341 <component name="ToolWindowManager">
361 - <frame x="316" y="57" width="1582" height="969" extended-state="0" /> 342 + <frame x="891" y="7" width="1582" height="969" extended-state="0" />
362 <editor active="true" /> 343 <editor active="true" />
363 <layout> 344 <layout>
364 <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.19250986" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" /> 345 <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.19250986" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
@@ -580,13 +561,6 @@ @@ -580,13 +561,6 @@
580 </state> 561 </state>
581 </provider> 562 </provider>
582 </entry> 563 </entry>
583 - <entry file="file://$PROJECT_DIR$/simplewind/cmf/controller/RestBaseController.php">  
584 - <provider selected="true" editor-type-id="text-editor">  
585 - <state relative-caret-position="515">  
586 - <caret line="119" column="42" lean-forward="true" selection-start-line="119" selection-start-column="42" selection-end-line="119" selection-end-column="42" />  
587 - </state>  
588 - </provider>  
589 - </entry>  
590 <entry file="jar://$APPLICATION_HOME_DIR$/lib/phpstorm.jar!/resources/html5-schema/html5/tables.rnc"> 564 <entry file="jar://$APPLICATION_HOME_DIR$/lib/phpstorm.jar!/resources/html5-schema/html5/tables.rnc">
591 <provider selected="true" editor-type-id="text-editor"> 565 <provider selected="true" editor-type-id="text-editor">
592 <state relative-caret-position="273"> 566 <state relative-caret-position="273">
@@ -755,10 +729,44 @@ @@ -755,10 +729,44 @@
755 </provider> 729 </provider>
756 </entry> 730 </entry>
757 <entry file="file://$PROJECT_DIR$/public/themes/simpleboot3/index/index.html" /> 731 <entry file="file://$PROJECT_DIR$/public/themes/simpleboot3/index/index.html" />
  732 + <entry file="file://$PROJECT_DIR$/app/admin/controller/AttrController.php">
  733 + <provider selected="true" editor-type-id="text-editor">
  734 + <state relative-caret-position="200">
  735 + <caret line="51" column="12" lean-forward="false" selection-start-line="51" selection-start-column="12" selection-end-line="54" selection-end-column="15" />
  736 + <folding />
  737 + </state>
  738 + </provider>
  739 + </entry>
  740 + <entry file="file://$PROJECT_DIR$/api/index/controller/SubscribeController.php">
  741 + <provider selected="true" editor-type-id="text-editor">
  742 + <state relative-caret-position="532">
  743 + <caret line="136" column="0" lean-forward="true" selection-start-line="136" selection-start-column="0" selection-end-line="136" selection-end-column="0" />
  744 + <folding>
  745 + <element signature="e#305#577#0#PHP" expanded="false" />
  746 + <element signature="e#583#854#0#PHP" expanded="false" />
  747 + <element signature="e#859#1113#0#PHP" expanded="false" />
  748 + <element signature="e#1119#1594#0#PHP" expanded="false" />
  749 + <element signature="e#1599#2490#0#PHP" expanded="false" />
  750 + <element signature="e#2497#2911#0#PHP" expanded="false" />
  751 + <element signature="e#2916#3386#0#PHP" expanded="false" />
  752 + <element signature="e#3393#3889#0#PHP" expanded="false" />
  753 + <element signature="e#3894#4897#0#PHP" expanded="false" />
  754 + </folding>
  755 + </state>
  756 + </provider>
  757 + </entry>
  758 + <entry file="file://$PROJECT_DIR$/simplewind/cmf/controller/RestBaseController.php">
  759 + <provider selected="true" editor-type-id="text-editor">
  760 + <state relative-caret-position="210">
  761 + <caret line="93" column="57" lean-forward="false" selection-start-line="93" selection-start-column="57" selection-end-line="93" selection-end-column="57" />
  762 + <folding />
  763 + </state>
  764 + </provider>
  765 + </entry>
758 <entry file="file://$PROJECT_DIR$/api/index/controller/UserController.php"> 766 <entry file="file://$PROJECT_DIR$/api/index/controller/UserController.php">
759 <provider selected="true" editor-type-id="text-editor"> 767 <provider selected="true" editor-type-id="text-editor">
760 - <state relative-caret-position="332">  
761 - <caret line="419" column="16" lean-forward="true" selection-start-line="419" selection-start-column="16" selection-end-line="419" selection-end-column="16" /> 768 + <state relative-caret-position="532">
  769 + <caret line="768" column="29" lean-forward="true" selection-start-line="768" selection-start-column="29" selection-end-line="768" selection-end-column="29" />
762 <folding> 770 <folding>
763 <element signature="e#345#694#0#PHP" expanded="false" /> 771 <element signature="e#345#694#0#PHP" expanded="false" />
764 <element signature="e#699#1464#0#PHP" expanded="false" /> 772 <element signature="e#699#1464#0#PHP" expanded="false" />
@@ -789,32 +797,11 @@ @@ -789,32 +797,11 @@
789 <element signature="e#17026#17635#0#PHP" expanded="false" /> 797 <element signature="e#17026#17635#0#PHP" expanded="false" />
790 <element signature="e#17640#18973#0#PHP" expanded="false" /> 798 <element signature="e#17640#18973#0#PHP" expanded="false" />
791 <element signature="e#18979#19336#0#PHP" expanded="false" /> 799 <element signature="e#18979#19336#0#PHP" expanded="false" />
792 - <element signature="e#19341#20183#0#PHP" expanded="false" />  
793 - </folding>  
794 - </state>  
795 - </provider>  
796 - </entry>  
797 - <entry file="file://$PROJECT_DIR$/app/admin/controller/AttrController.php">  
798 - <provider selected="true" editor-type-id="text-editor">  
799 - <state relative-caret-position="200">  
800 - <caret line="51" column="12" lean-forward="false" selection-start-line="51" selection-start-column="12" selection-end-line="54" selection-end-column="15" />  
801 - <folding />  
802 - </state>  
803 - </provider>  
804 - </entry>  
805 - <entry file="file://$PROJECT_DIR$/api/index/controller/SubscribeController.php">  
806 - <provider selected="true" editor-type-id="text-editor">  
807 - <state relative-caret-position="357">  
808 - <caret line="170" column="34" lean-forward="true" selection-start-line="170" selection-start-column="34" selection-end-line="170" selection-end-column="34" />  
809 - <folding>  
810 - <element signature="e#305#577#0#PHP" expanded="false" />  
811 - <element signature="e#583#854#0#PHP" expanded="false" />  
812 - <element signature="e#859#1113#0#PHP" expanded="false" />  
813 - <element signature="e#1119#1594#0#PHP" expanded="false" />  
814 - <element signature="e#1599#2490#0#PHP" expanded="false" />  
815 - <element signature="e#2497#2911#0#PHP" expanded="false" />  
816 - <element signature="e#2916#3386#0#PHP" expanded="false" />  
817 - <element signature="e#3393#3889#0#PHP" expanded="false" /> 800 + <element signature="e#19341#20222#0#PHP" expanded="false" />
  801 + <element signature="e#20228#20580#0#PHP" expanded="false" />
  802 + <element signature="e#20585#21662#0#PHP" expanded="false" />
  803 + <element signature="e#21668#22023#0#PHP" expanded="false" />
  804 + <element signature="e#22028#23108#0#PHP" expanded="false" />
818 </folding> 805 </folding>
819 </state> 806 </state>
820 </provider> 807 </provider>
@@ -618,6 +618,7 @@ class UserController extends RestBaseController @@ -618,6 +618,7 @@ class UserController extends RestBaseController
618 */ 618 */
619 public function collect() 619 public function collect()
620 { 620 {
  621 + $user_id = $this->getUserId();
621 $where['status'] = ['eq',0]; 622 $where['status'] = ['eq',0];
622 $data = Db::name('subscribe') 623 $data = Db::name('subscribe')
623 ->where($where) 624 ->where($where)
@@ -641,4 +642,139 @@ class UserController extends RestBaseController @@ -641,4 +642,139 @@ class UserController extends RestBaseController
641 $this->success('success',$data); 642 $this->success('success',$data);
642 } 643 }
643 644
  645 + /**
  646 + * @title 回收员已接单订单
  647 + * @description 回收员已接单订单
  648 + * @author Guosheng
  649 + * @url /index/User/jie
  650 + * @method GET
  651 + *
  652 + * @header name:XX-Token require:1 default: desc:token
  653 + *
  654 + * @return id:订单ID
  655 + * @return num:订单号
  656 + * @return goods_name:商品名称
  657 + * @return create_time:创建时间
  658 + * @return sub_time:预约时间
  659 + *
  660 + */
  661 + public function jie()
  662 + {
  663 + $user_id = $this->getUserId();
  664 + $list = Db::name('collector')
  665 + ->where('user_id',$user_id)
  666 + ->where('status',1)
  667 + ->select()
  668 + ->toArray();
  669 + foreach ($list as &$val){
  670 + $val['order_id'] = Db::name('subscribe')
  671 + ->where('id',$val['order_id'])
  672 + ->field('id,num,create_time,sub_time,attr_id')
  673 + ->find();
  674 + $attr_id = explode(',',$val['order_id']['attr_id']);
  675 +
  676 + $val['order_id']['attr_id'] = [];
  677 + foreach ($attr_id as &$v1){
  678 + $v1 = Db::name('attr')
  679 + ->alias('a')
  680 + ->join('rgoods r','a.rgoods_id=r.id')
  681 + ->field('r.rgoods_name')
  682 + ->where('a.id',$v1)
  683 + ->find();
  684 + array_push($val['order_id']['attr_id'],$v1['rgoods_name']);
  685 + }
  686 + $val['order_id']['attr_id'] = implode(',',$val['order_id']['attr_id']);
  687 + }
  688 + $this->success('success',$list);
  689 +
  690 +
  691 + }
  692 +
  693 + /**
  694 + * @title 回收员已完成订单
  695 + * @description 回收员已完成订单
  696 + * @author Guosheng
  697 + * @url /index/User/finish
  698 + * @method GET
  699 + *
  700 + * @header name:XX-Token require:1 default: desc:token
  701 + *
  702 + * @return id:订单ID
  703 + * @return num:订单号
  704 + * @return goods_name:商品名称
  705 + * @return create_time:创建时间
  706 + * @return sub_time:预约时间
  707 + *
  708 + */
  709 + public function finish()
  710 + {
  711 + $user_id = $this->getUserId();
  712 + $list = Db::name('collector')
  713 + ->where('user_id',$user_id)
  714 + ->where('status',2)
  715 + ->select()
  716 + ->toArray();
  717 + foreach ($list as &$val){
  718 + $val['order_id'] = Db::name('subscribe')
  719 + ->where('id',$val['order_id'])
  720 + ->field('id,num,create_time,sub_time,attr_id')
  721 + ->find();
  722 + $attr_id = explode(',',$val['order_id']['attr_id']);
  723 +
  724 + $val['order_id']['attr_id'] = [];
  725 + foreach ($attr_id as &$v1){
  726 + $v1 = Db::name('attr')
  727 + ->alias('a')
  728 + ->join('rgoods r','a.rgoods_id=r.id')
  729 + ->field('r.rgoods_name')
  730 + ->where('a.id',$v1)
  731 + ->find();
  732 + array_push($val['order_id']['attr_id'],$v1['rgoods_name']);
  733 + }
  734 + $val['order_id']['attr_id'] = implode(',',$val['order_id']['attr_id']);
  735 + }
  736 + $this->success('success',$list);
  737 +
  738 +
  739 + }
  740 +
  741 + /**
  742 + * @title 回收员确认接单
  743 + * @description 回收员确认接单
  744 + * @author Guosheng
  745 + * @url /index/User/affirm
  746 + * @method GET
  747 + *
  748 + * @header name:XX-Token require:1 default: desc:token
  749 + *
  750 + * @param name:order_id type:int require:1 other: desc:订单ID
  751 + *
  752 + * @return id:订单ID
  753 + * @return num:订单号
  754 + * @return goods_name:商品名称
  755 + * @return create_time:创建时间
  756 + * @return sub_time:预约时间
  757 + *
  758 + */
  759 + public function affirm()
  760 + {
  761 + $user_id = $this->getUserId();
  762 + $order_id = $this->request->param('order_id');
  763 + if(empty($order_id)){
  764 + $this->error('缺少必要参数');
  765 + }
  766 + $data['order_id'] = $order_id;
  767 + $data['user_id'] = $user_id;
  768 + $data['create_time'] = time();
  769 + Db::name('subscribe')
  770 + ->where('id',$order_id)
  771 + ->update(['status'=>1]);
  772 + $res = Db::name('collector')
  773 + ->insertGetId($data);
  774 + if($res){
  775 + $this->success('接单成功');
  776 + }else{
  777 + $this->error('sql语句错误');
  778 + }
  779 + }
644 } 780 }