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

修改回收完成订单后加到回收员账号上问题

... ... @@ -2,7 +2,8 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="0011664b-87e9-41bd-9f37-18792fb15777" name="Default" comment="">
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/api/index/controller/ShopgoodsController.php" afterPath="$PROJECT_DIR$/api/index/controller/ShopgoodsController.php" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/api/index/controller/UserController.php" afterPath="$PROJECT_DIR$/api/index/controller/UserController.php" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
... ... @@ -27,8 +28,8 @@
<file leaf-file-name="SubscribeController.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/api/index/controller/SubscribeController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="576">
<caret line="136" column="0" lean-forward="true" selection-start-line="136" selection-start-column="0" selection-end-line="136" selection-end-column="0" />
<state relative-caret-position="25">
<caret line="1" column="0" lean-forward="false" selection-start-line="1" selection-start-column="0" selection-end-line="1" selection-end-column="0" />
<folding>
<element signature="e#305#577#0#PHP" expanded="false" />
<element signature="e#583#854#0#PHP" expanded="false" />
... ... @@ -44,44 +45,11 @@
</provider>
</entry>
</file>
<file leaf-file-name="ShopgoodsController.php" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/api/index/controller/ShopgoodsController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="435">
<caret line="69" column="17" lean-forward="false" selection-start-line="69" selection-start-column="17" selection-end-line="69" selection-end-column="17" />
<folding>
<element signature="e#411#604#0#PHP" expanded="false" />
<element signature="e#609#825#0#PHP" expanded="false" />
<element signature="e#2099#2317#0#PHP" expanded="false" />
<element signature="e#2322#2530#0#PHP" expanded="false" />
<element signature="e#2536#3043#0#PHP" expanded="false" />
<element signature="e#3048#3566#0#PHP" expanded="false" />
<element signature="e#3572#4084#0#PHP" expanded="false" />
<element signature="e#4089#4652#0#PHP" expanded="false" />
<element signature="e#4658#5248#0#PHP" expanded="false" />
<element signature="e#5253#6299#0#PHP" expanded="false" />
<element signature="e#6305#6623#0#PHP" expanded="false" />
<element signature="e#6628#7004#0#PHP" expanded="false" />
<element signature="e#7010#7365#0#PHP" expanded="false" />
<element signature="e#7370#7779#0#PHP" expanded="false" />
<element signature="e#7785#8170#0#PHP" expanded="false" />
<element signature="e#8175#8846#0#PHP" expanded="false" />
<element signature="e#8852#9298#0#PHP" expanded="false" />
<element signature="e#9303#10154#0#PHP" expanded="false" />
<element signature="e#10160#10430#0#PHP" expanded="false" />
<element signature="e#10435#10911#0#PHP" expanded="false" />
<element signature="e#10917#11547#0#PHP" expanded="false" />
<element signature="e#11552#13484#0#PHP" expanded="false" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="UserController.php" pinned="false" current-in-tab="false">
<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="259">
<caret line="1040" column="39" lean-forward="true" selection-start-line="1040" selection-start-column="39" selection-end-line="1040" selection-end-column="39" />
<state relative-caret-position="210">
<caret line="953" column="7" lean-forward="true" selection-start-line="953" selection-start-column="7" selection-end-line="953" selection-end-column="7" />
<folding>
<element signature="e#366#791#0#PHP" expanded="false" />
<element signature="e#796#1608#0#PHP" expanded="false" />
... ... @@ -126,28 +94,29 @@
<element signature="e#29715#30139#0#PHP" expanded="false" />
<element signature="e#30144#30755#0#PHP" expanded="false" />
<element signature="e#30761#31257#0#PHP" expanded="false" />
<element signature="e#31838#32925#0#PHP" expanded="false" />
<element signature="e#34071#34355#0#PHP" expanded="false" />
<element signature="e#34360#34996#0#PHP" expanded="false" />
<element signature="e#35017#35336#0#PHP" expanded="false" />
<element signature="e#35342#35750#0#PHP" expanded="false" />
<element signature="e#35756#36515#0#PHP" expanded="false" />
<element signature="e#36534#37398#0#PHP" expanded="false" />
<element signature="e#37424#37824#0#PHP" expanded="false" />
<element signature="e#37847#38420#0#PHP" expanded="false" />
<element signature="e#38443#39253#0#PHP" expanded="false" />
<element signature="e#39259#39858#0#PHP" expanded="false" />
<element signature="e#39863#40827#0#PHP" expanded="false" />
<element signature="e#40833#41500#0#PHP" expanded="false" />
<element signature="e#41505#42546#0#PHP" expanded="false" />
<element signature="e#42552#43215#0#PHP" expanded="false" />
<element signature="e#43220#44247#0#PHP" expanded="false" />
<element signature="e#44254#44685#0#PHP" expanded="false" />
<element signature="e#44690#45268#0#PHP" expanded="false" />
<element signature="e#45274#45703#0#PHP" expanded="false" />
<element signature="e#45708#46310#0#PHP" expanded="false" />
<element signature="e#46316#46743#0#PHP" expanded="false" />
<element signature="e#46748#47314#0#PHP" expanded="false" />
<element signature="e#31262#34624#0#PHP" expanded="false" />
<element signature="e#32064#33191#0#PHP" expanded="false" />
<element signature="e#34630#34914#0#PHP" expanded="false" />
<element signature="e#34919#35555#0#PHP" expanded="false" />
<element signature="e#35576#35895#0#PHP" expanded="false" />
<element signature="e#35901#36309#0#PHP" expanded="false" />
<element signature="e#36315#37074#0#PHP" expanded="false" />
<element signature="e#37093#37957#0#PHP" expanded="false" />
<element signature="e#37983#38383#0#PHP" expanded="false" />
<element signature="e#38406#38979#0#PHP" expanded="false" />
<element signature="e#39002#39812#0#PHP" expanded="false" />
<element signature="e#39818#40417#0#PHP" expanded="false" />
<element signature="e#40422#41386#0#PHP" expanded="false" />
<element signature="e#41392#42059#0#PHP" expanded="false" />
<element signature="e#42064#43105#0#PHP" expanded="false" />
<element signature="e#43111#43774#0#PHP" expanded="false" />
<element signature="e#43779#44806#0#PHP" expanded="false" />
<element signature="e#44813#45244#0#PHP" expanded="false" />
<element signature="e#45249#45827#0#PHP" expanded="false" />
<element signature="e#45833#46262#0#PHP" expanded="false" />
<element signature="e#46267#46869#0#PHP" expanded="false" />
<element signature="e#46875#47302#0#PHP" expanded="false" />
<element signature="e#47307#47873#0#PHP" expanded="false" />
</folding>
</state>
</provider>
... ... @@ -220,10 +189,10 @@
<option value="$PROJECT_DIR$/api/index/controller/SubscribeController.php" />
<option value="$PROJECT_DIR$/public/themes/admin_simpleboot3/admin/point/add.html" />
<option value="$PROJECT_DIR$/app/admin/controller/PointController.php" />
<option value="$PROJECT_DIR$/api/index/controller/UserController.php" />
<option value="$PROJECT_DIR$/api/index/controller/RecycleController.php" />
<option value="$PROJECT_DIR$/api/index/controller/HomeController.php" />
<option value="$PROJECT_DIR$/api/index/controller/ShopgoodsController.php" />
<option value="$PROJECT_DIR$/api/index/controller/UserController.php" />
</list>
</option>
</component>
... ... @@ -242,10 +211,10 @@
</component>
<component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" />
<component name="ProjectFrameBounds">
<option name="x" value="359" />
<option name="y" value="102" />
<option name="x" value="483" />
<option name="y" value="69" />
<option name="width" value="1618" />
<option name="height" value="1013" />
<option name="height" value="1024" />
</component>
<component name="ProjectView">
<navigator currentView="ProjectPane" proportions="" version="1">
... ... @@ -402,27 +371,28 @@
<workItem from="1575860170691" duration="607000" />
<workItem from="1576027263250" duration="3000" />
<workItem from="1576049946357" duration="1233000" />
<workItem from="1576056936489" duration="6220000" />
<workItem from="1576056936489" duration="7947000" />
<workItem from="1576066696521" duration="71000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="536086000" />
<option name="totallyTimeSpent" value="537884000" />
</component>
<component name="ToolWindowManager">
<frame x="359" y="102" width="1618" height="1013" extended-state="0" />
<frame x="483" y="69" width="1618" height="1024" 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.24582799" 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="false" show_stripe_button="true" weight="0.18292683" 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="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="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="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="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="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="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" />
... ... @@ -723,7 +693,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="400">
<caret line="26" column="20" lean-forward="false" selection-start-line="26" selection-start-column="20" selection-end-line="26" selection-end-column="20" />
<folding />
</state>
</provider>
</entry>
... ... @@ -745,10 +714,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="300">
<caret line="17" column="27" lean-forward="false" selection-start-line="17" selection-start-column="27" selection-end-line="17" selection-end-column="27" />
<folding>
<element signature="e#130#169#0#PHP" expanded="false" />
<element signature="e#262#1148#0#PHP" expanded="false" />
</folding>
</state>
</provider>
</entry>
... ... @@ -784,11 +749,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="325">
<caret line="60" column="12" lean-forward="false" selection-start-line="60" selection-start-column="12" selection-end-line="62" selection-end-column="31" />
<folding>
<element signature="e#262#867#0#PHP" expanded="false" />
<element signature="e#2477#4124#0#PHP" expanded="false" />
<element signature="e#4139#4605#0#PHP" expanded="false" />
</folding>
</state>
</provider>
</entry>
... ... @@ -796,20 +756,6 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="139">
<caret line="243" column="29" lean-forward="false" selection-start-line="243" selection-start-column="29" selection-end-line="243" selection-end-column="29" />
<folding>
<element signature="e#4855#5051#0#PHP" expanded="false" />
<element signature="e#5056#5318#0#PHP" expanded="false" />
<element signature="e#5324#5779#0#PHP" expanded="false" />
<element signature="e#5784#6508#0#PHP" expanded="false" />
<element signature="e#6514#6857#0#PHP" expanded="false" />
<element signature="e#6862#7343#0#PHP" expanded="false" />
<element signature="e#7349#7640#0#PHP" expanded="false" />
<element signature="e#7645#7996#0#PHP" expanded="false" />
<element signature="e#8002#8355#0#PHP" expanded="false" />
<element signature="e#8360#8765#0#PHP" expanded="false" />
<element signature="e#8771#9154#0#PHP" expanded="false" />
<element signature="e#9159#9826#0#PHP" expanded="false" />
</folding>
</state>
</provider>
</entry>
... ... @@ -817,16 +763,38 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="690">
<caret line="167" column="59" lean-forward="false" selection-start-line="167" selection-start-column="59" selection-end-line="167" selection-end-column="59" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/api/index/controller/ShopgoodsController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="360">
<caret line="69" column="17" lean-forward="false" selection-start-line="69" selection-start-column="17" selection-end-line="69" selection-end-column="17" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/api/index/controller/SubscribeController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="25">
<caret line="1" column="0" lean-forward="false" selection-start-line="1" selection-start-column="0" selection-end-line="1" selection-end-column="0" />
<folding>
<element signature="e#3168#3696#0#PHP" expanded="false" />
<element signature="e#305#577#0#PHP" expanded="false" />
<element signature="e#583#854#0#PHP" expanded="false" />
<element signature="e#859#1113#0#PHP" expanded="false" />
<element signature="e#1119#1594#0#PHP" expanded="false" />
<element signature="e#1599#2490#0#PHP" expanded="false" />
<element signature="e#2497#2911#0#PHP" expanded="false" />
<element signature="e#2916#3386#0#PHP" expanded="false" />
<element signature="e#3393#3889#0#PHP" expanded="false" />
<element signature="e#3894#4897#0#PHP" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/api/index/controller/UserController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="259">
<caret line="1040" column="39" lean-forward="true" selection-start-line="1040" selection-start-column="39" selection-end-line="1040" selection-end-column="39" />
<state relative-caret-position="210">
<caret line="953" column="7" lean-forward="true" selection-start-line="953" selection-start-column="7" selection-end-line="953" selection-end-column="7" />
<folding>
<element signature="e#366#791#0#PHP" expanded="false" />
<element signature="e#796#1608#0#PHP" expanded="false" />
... ... @@ -871,77 +839,29 @@
<element signature="e#29715#30139#0#PHP" expanded="false" />
<element signature="e#30144#30755#0#PHP" expanded="false" />
<element signature="e#30761#31257#0#PHP" expanded="false" />
<element signature="e#31838#32925#0#PHP" expanded="false" />
<element signature="e#34071#34355#0#PHP" expanded="false" />
<element signature="e#34360#34996#0#PHP" expanded="false" />
<element signature="e#35017#35336#0#PHP" expanded="false" />
<element signature="e#35342#35750#0#PHP" expanded="false" />
<element signature="e#35756#36515#0#PHP" expanded="false" />
<element signature="e#36534#37398#0#PHP" expanded="false" />
<element signature="e#37424#37824#0#PHP" expanded="false" />
<element signature="e#37847#38420#0#PHP" expanded="false" />
<element signature="e#38443#39253#0#PHP" expanded="false" />
<element signature="e#39259#39858#0#PHP" expanded="false" />
<element signature="e#39863#40827#0#PHP" expanded="false" />
<element signature="e#40833#41500#0#PHP" expanded="false" />
<element signature="e#41505#42546#0#PHP" expanded="false" />
<element signature="e#42552#43215#0#PHP" expanded="false" />
<element signature="e#43220#44247#0#PHP" expanded="false" />
<element signature="e#44254#44685#0#PHP" expanded="false" />
<element signature="e#44690#45268#0#PHP" expanded="false" />
<element signature="e#45274#45703#0#PHP" expanded="false" />
<element signature="e#45708#46310#0#PHP" expanded="false" />
<element signature="e#46316#46743#0#PHP" expanded="false" />
<element signature="e#46748#47314#0#PHP" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/api/index/controller/SubscribeController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="576">
<caret line="136" column="0" lean-forward="true" selection-start-line="136" selection-start-column="0" selection-end-line="136" selection-end-column="0" />
<folding>
<element signature="e#305#577#0#PHP" expanded="false" />
<element signature="e#583#854#0#PHP" expanded="false" />
<element signature="e#859#1113#0#PHP" expanded="false" />
<element signature="e#1119#1594#0#PHP" expanded="false" />
<element signature="e#1599#2490#0#PHP" expanded="false" />
<element signature="e#2497#2911#0#PHP" expanded="false" />
<element signature="e#2916#3386#0#PHP" expanded="false" />
<element signature="e#3393#3889#0#PHP" expanded="false" />
<element signature="e#3894#4897#0#PHP" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/api/index/controller/ShopgoodsController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="435">
<caret line="69" column="17" lean-forward="false" selection-start-line="69" selection-start-column="17" selection-end-line="69" selection-end-column="17" />
<folding>
<element signature="e#411#604#0#PHP" expanded="false" />
<element signature="e#609#825#0#PHP" expanded="false" />
<element signature="e#2099#2317#0#PHP" expanded="false" />
<element signature="e#2322#2530#0#PHP" expanded="false" />
<element signature="e#2536#3043#0#PHP" expanded="false" />
<element signature="e#3048#3566#0#PHP" expanded="false" />
<element signature="e#3572#4084#0#PHP" expanded="false" />
<element signature="e#4089#4652#0#PHP" expanded="false" />
<element signature="e#4658#5248#0#PHP" expanded="false" />
<element signature="e#5253#6299#0#PHP" expanded="false" />
<element signature="e#6305#6623#0#PHP" expanded="false" />
<element signature="e#6628#7004#0#PHP" expanded="false" />
<element signature="e#7010#7365#0#PHP" expanded="false" />
<element signature="e#7370#7779#0#PHP" expanded="false" />
<element signature="e#7785#8170#0#PHP" expanded="false" />
<element signature="e#8175#8846#0#PHP" expanded="false" />
<element signature="e#8852#9298#0#PHP" expanded="false" />
<element signature="e#9303#10154#0#PHP" expanded="false" />
<element signature="e#10160#10430#0#PHP" expanded="false" />
<element signature="e#10435#10911#0#PHP" expanded="false" />
<element signature="e#10917#11547#0#PHP" expanded="false" />
<element signature="e#11552#13484#0#PHP" expanded="false" />
<element signature="e#31262#34624#0#PHP" expanded="false" />
<element signature="e#32064#33191#0#PHP" expanded="false" />
<element signature="e#34630#34914#0#PHP" expanded="false" />
<element signature="e#34919#35555#0#PHP" expanded="false" />
<element signature="e#35576#35895#0#PHP" expanded="false" />
<element signature="e#35901#36309#0#PHP" expanded="false" />
<element signature="e#36315#37074#0#PHP" expanded="false" />
<element signature="e#37093#37957#0#PHP" expanded="false" />
<element signature="e#37983#38383#0#PHP" expanded="false" />
<element signature="e#38406#38979#0#PHP" expanded="false" />
<element signature="e#39002#39812#0#PHP" expanded="false" />
<element signature="e#39818#40417#0#PHP" expanded="false" />
<element signature="e#40422#41386#0#PHP" expanded="false" />
<element signature="e#41392#42059#0#PHP" expanded="false" />
<element signature="e#42064#43105#0#PHP" expanded="false" />
<element signature="e#43111#43774#0#PHP" expanded="false" />
<element signature="e#43779#44806#0#PHP" expanded="false" />
<element signature="e#44813#45244#0#PHP" expanded="false" />
<element signature="e#45249#45827#0#PHP" expanded="false" />
<element signature="e#45833#46262#0#PHP" expanded="false" />
<element signature="e#46267#46869#0#PHP" expanded="false" />
<element signature="e#46875#47302#0#PHP" expanded="false" />
<element signature="e#47307#47873#0#PHP" expanded="false" />
</folding>
</state>
</provider>
... ...
... ... @@ -1007,13 +1007,22 @@ class UserController extends RestBaseController
$data['create_time'] = time();
$data['status'] = 2;
//查询我的积分信息以及用户是否有邀请人
//查询用户积分信息以及用户是否有邀请人
//通过传入的订单ID来算出该订单的用户ID
$order = Db::name('subscribe')
->where('id',$order_id)
->field('id,user_id')
->find();
//通过查出来的用户ID来算出该用户的积分信息
$info = Db::name('integral')
->where('user_id',$user_id)
->where('user_id',$order['user_id'])
->find();
//查询该用户是否有邀请人
if(!empty($info['inviter_id'])){
//查询该用户是否第一次完成回收
$is_have = Db::name('subscribe')
->where('user_id',$user_id)
->where('user_id',$info['inviter_id'])
->where('status',2)
->find();
if(empty($is_have)){
... ... @@ -1043,11 +1052,20 @@ class UserController extends RestBaseController
$res['now_integral'] = $info['now_integral'] + $get_integral;
//添加对应的积分明细
$detail['user_id'] = $user_id;
$detail['total'] = $get_integral;
$detail['user_id'] = $order['user_id'];
//判断是否存在服务费
$fee = Db::name('recyclefee')
->where('id',1)
->find();
if($fee['fee'] == 0){
//没有服务费
$detail['total'] = $get_integral;
}else{
//有服务费
$detail['total'] = $get_integral-($get_integral*(5/100));
}
$detail['create_time'] = time();
$detail['type'] = 5;
// 启动事务
Db::startTrans();
try{
... ... @@ -1055,7 +1073,7 @@ class UserController extends RestBaseController
->where('id',$order_id)
->update(['status'=>2,'get_integral'=>$get_integral]);
$integral = Db::name('integral')
->where('user_id',$user_id)
->where('user_id',$order['user_id'])
->update($res);
$detail = Db::name('detail')->insertGetId($detail);
... ...