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

修改回收员已完成订单,修改家政预约地址表写错

... ... @@ -25,11 +25,11 @@
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file leaf-file-name="HomeController.php" pinned="false" current-in-tab="true">
<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="653">
<caret line="352" column="48" lean-forward="false" selection-start-line="352" selection-start-column="48" selection-end-line="352" selection-end-column="48" />
<state relative-caret-position="635">
<caret line="218" column="35" lean-forward="false" selection-start-line="218" selection-start-column="35" selection-end-line="218" selection-end-column="35" />
<folding>
<element signature="e#329#544#0#PHP" expanded="false" />
<element signature="e#549#890#0#PHP" expanded="false" />
... ... @@ -43,26 +43,28 @@
<element signature="e#3702#4540#0#PHP" expanded="false" />
<element signature="e#4546#4859#0#PHP" expanded="false" />
<element signature="e#4864#5239#0#PHP" expanded="false" />
<element signature="e#5245#5602#0#PHP" expanded="false" />
<element signature="e#5607#6015#0#PHP" expanded="false" />
<element signature="e#6021#6403#0#PHP" expanded="false" />
<element signature="e#6408#7078#0#PHP" expanded="false" />
<element signature="e#7084#7527#0#PHP" expanded="false" />
<element signature="e#7532#8382#0#PHP" expanded="false" />
<element signature="e#8388#8655#0#PHP" expanded="false" />
<element signature="e#8660#9135#0#PHP" expanded="false" />
<element signature="e#10660#11027#0#PHP" expanded="false" />
<element signature="e#11032#11472#0#PHP" expanded="false" />
<element signature="e#5245#5597#0#PHP" expanded="false" />
<element signature="e#5602#6010#0#PHP" expanded="false" />
<element signature="e#6016#6398#0#PHP" expanded="false" />
<element signature="e#6403#7073#0#PHP" expanded="false" />
<element signature="e#7079#7522#0#PHP" expanded="false" />
<element signature="e#7527#8377#0#PHP" expanded="false" />
<element signature="e#8383#8650#0#PHP" expanded="false" />
<element signature="e#8655#9130#0#PHP" expanded="false" />
<element signature="e#9136#9631#0#PHP" expanded="false" />
<element signature="e#9636#10649#0#PHP" expanded="false" />
<element signature="e#10655#11022#0#PHP" expanded="false" />
<element signature="e#11027#11467#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="700">
<caret line="799" column="32" lean-forward="true" selection-start-line="799" selection-start-column="32" selection-end-line="799" selection-end-column="32" />
<state relative-caret-position="328">
<caret line="823" column="27" lean-forward="false" selection-start-line="823" selection-start-column="27" selection-end-line="823" selection-end-column="27" />
<folding>
<element signature="e#131#169#0#PHP" expanded="true" />
<element signature="e#366#715#0#PHP" expanded="false" />
... ... @@ -101,15 +103,15 @@
<element signature="e#22049#23129#0#PHP" expanded="false" />
<element signature="e#23135#23559#0#PHP" expanded="false" />
<element signature="e#23564#24175#0#PHP" expanded="false" />
<element signature="e#25235#25519#0#PHP" expanded="false" />
<element signature="e#25524#26102#0#PHP" expanded="false" />
<element signature="e#26123#26442#0#PHP" expanded="false" />
<element signature="e#26448#26856#0#PHP" expanded="false" />
<element signature="e#26862#27621#0#PHP" expanded="false" />
<element signature="e#27641#28505#0#PHP" expanded="false" />
<element signature="e#28532#28932#0#PHP" expanded="false" />
<element signature="e#28956#29529#0#PHP" expanded="false" />
<element signature="e#29552#30362#0#PHP" expanded="false" />
<element signature="e#25795#26079#0#PHP" expanded="false" />
<element signature="e#26084#26662#0#PHP" expanded="false" />
<element signature="e#26683#27002#0#PHP" expanded="false" />
<element signature="e#27008#27416#0#PHP" expanded="false" />
<element signature="e#27422#28181#0#PHP" expanded="false" />
<element signature="e#28201#29065#0#PHP" expanded="false" />
<element signature="e#29092#29492#0#PHP" expanded="false" />
<element signature="e#29516#30089#0#PHP" expanded="false" />
<element signature="e#30112#30922#0#PHP" expanded="false" />
</folding>
</state>
</provider>
... ... @@ -184,8 +186,8 @@
<option value="$PROJECT_DIR$/public/themes/admin_simpleboot3/admin/subhome/index.html" />
<option value="$PROJECT_DIR$/public/themes/admin_simpleboot3/admin/subhome/edit.html" />
<option value="$PROJECT_DIR$/app/admin/controller/SubhomeController.php" />
<option value="$PROJECT_DIR$/api/index/controller/UserController.php" />
<option value="$PROJECT_DIR$/api/index/controller/HomeController.php" />
<option value="$PROJECT_DIR$/api/index/controller/UserController.php" />
</list>
</option>
</component>
... ... @@ -203,11 +205,11 @@
<sorting>DEFINITION_ORDER</sorting>
</component>
<component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" />
<component name="ProjectFrameBounds" extendedState="1">
<option name="x" value="379" />
<option name="y" value="63" />
<component name="ProjectFrameBounds">
<option name="x" value="402" />
<option name="y" value="184" />
<option name="width" value="1582" />
<option name="height" value="965" />
<option name="height" value="813" />
</component>
<component name="ProjectView">
<navigator currentView="ProjectPane" proportions="" version="1">
... ... @@ -348,15 +350,15 @@
<workItem from="1575246616478" duration="21722000" />
<workItem from="1575278769037" duration="7395000" />
<workItem from="1575332430854" duration="21245000" />
<workItem from="1575359408189" duration="7910000" />
<workItem from="1575359408189" duration="9455000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="439613000" />
<option name="totallyTimeSpent" value="441158000" />
</component>
<component name="ToolWindowManager">
<frame x="379" y="63" width="1582" height="965" extended-state="1" />
<frame x="402" y="184" width="1582" height="813" 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.1977661" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
... ... @@ -854,10 +856,43 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/api/index/controller/HomeController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="635">
<caret line="218" column="35" lean-forward="false" selection-start-line="218" selection-start-column="35" selection-end-line="218" selection-end-column="35" />
<folding>
<element signature="e#329#544#0#PHP" expanded="false" />
<element signature="e#549#890#0#PHP" expanded="false" />
<element signature="e#896#1112#0#PHP" expanded="false" />
<element signature="e#1117#1500#0#PHP" expanded="false" />
<element signature="e#1506#1726#0#PHP" expanded="false" />
<element signature="e#1731#2119#0#PHP" expanded="false" />
<element signature="e#2126#2643#0#PHP" expanded="false" />
<element signature="e#2648#3163#0#PHP" expanded="false" />
<element signature="e#3169#3697#0#PHP" expanded="false" />
<element signature="e#3702#4540#0#PHP" expanded="false" />
<element signature="e#4546#4859#0#PHP" expanded="false" />
<element signature="e#4864#5239#0#PHP" expanded="false" />
<element signature="e#5245#5597#0#PHP" expanded="false" />
<element signature="e#5602#6010#0#PHP" expanded="false" />
<element signature="e#6016#6398#0#PHP" expanded="false" />
<element signature="e#6403#7073#0#PHP" expanded="false" />
<element signature="e#7079#7522#0#PHP" expanded="false" />
<element signature="e#7527#8377#0#PHP" expanded="false" />
<element signature="e#8383#8650#0#PHP" expanded="false" />
<element signature="e#8655#9130#0#PHP" expanded="false" />
<element signature="e#9136#9631#0#PHP" expanded="false" />
<element signature="e#9636#10649#0#PHP" expanded="false" />
<element signature="e#10655#11022#0#PHP" expanded="false" />
<element signature="e#11027#11467#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="700">
<caret line="799" column="32" lean-forward="true" selection-start-line="799" selection-start-column="32" selection-end-line="799" selection-end-column="32" />
<state relative-caret-position="328">
<caret line="823" column="27" lean-forward="false" selection-start-line="823" selection-start-column="27" selection-end-line="823" selection-end-column="27" />
<folding>
<element signature="e#131#169#0#PHP" expanded="true" />
<element signature="e#366#715#0#PHP" expanded="false" />
... ... @@ -896,46 +931,15 @@
<element signature="e#22049#23129#0#PHP" expanded="false" />
<element signature="e#23135#23559#0#PHP" expanded="false" />
<element signature="e#23564#24175#0#PHP" expanded="false" />
<element signature="e#25235#25519#0#PHP" expanded="false" />
<element signature="e#25524#26102#0#PHP" expanded="false" />
<element signature="e#26123#26442#0#PHP" expanded="false" />
<element signature="e#26448#26856#0#PHP" expanded="false" />
<element signature="e#26862#27621#0#PHP" expanded="false" />
<element signature="e#27641#28505#0#PHP" expanded="false" />
<element signature="e#28532#28932#0#PHP" expanded="false" />
<element signature="e#28956#29529#0#PHP" expanded="false" />
<element signature="e#29552#30362#0#PHP" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/api/index/controller/HomeController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="653">
<caret line="352" column="48" lean-forward="false" selection-start-line="352" selection-start-column="48" selection-end-line="352" selection-end-column="48" />
<folding>
<element signature="e#329#544#0#PHP" expanded="false" />
<element signature="e#549#890#0#PHP" expanded="false" />
<element signature="e#896#1112#0#PHP" expanded="false" />
<element signature="e#1117#1500#0#PHP" expanded="false" />
<element signature="e#1506#1726#0#PHP" expanded="false" />
<element signature="e#1731#2119#0#PHP" expanded="false" />
<element signature="e#2126#2643#0#PHP" expanded="false" />
<element signature="e#2648#3163#0#PHP" expanded="false" />
<element signature="e#3169#3697#0#PHP" expanded="false" />
<element signature="e#3702#4540#0#PHP" expanded="false" />
<element signature="e#4546#4859#0#PHP" expanded="false" />
<element signature="e#4864#5239#0#PHP" expanded="false" />
<element signature="e#5245#5602#0#PHP" expanded="false" />
<element signature="e#5607#6015#0#PHP" expanded="false" />
<element signature="e#6021#6403#0#PHP" expanded="false" />
<element signature="e#6408#7078#0#PHP" expanded="false" />
<element signature="e#7084#7527#0#PHP" expanded="false" />
<element signature="e#7532#8382#0#PHP" expanded="false" />
<element signature="e#8388#8655#0#PHP" expanded="false" />
<element signature="e#8660#9135#0#PHP" expanded="false" />
<element signature="e#10660#11027#0#PHP" expanded="false" />
<element signature="e#11032#11472#0#PHP" expanded="false" />
<element signature="e#25795#26079#0#PHP" expanded="false" />
<element signature="e#26084#26662#0#PHP" expanded="false" />
<element signature="e#26683#27002#0#PHP" expanded="false" />
<element signature="e#27008#27416#0#PHP" expanded="false" />
<element signature="e#27422#28181#0#PHP" expanded="false" />
<element signature="e#28201#29065#0#PHP" expanded="false" />
<element signature="e#29092#29492#0#PHP" expanded="false" />
<element signature="e#29516#30089#0#PHP" expanded="false" />
<element signature="e#30112#30922#0#PHP" expanded="false" />
</folding>
</state>
</provider>
... ...
... ... @@ -204,7 +204,7 @@ class HomeController extends RestBaseController
* @title 预约家政服务地址详情
* @description
* @author GuoSheng
* @url /index/Shopgoods/recycleDetail
* @url /index/Home/recycleDetail
* @method GET
*
* @header name:XX-Token require:1 default: desc:token
... ...
... ... @@ -789,6 +789,7 @@ class UserController extends RestBaseController
* @header name:XX-Token require:1 default: desc:token
*
* @param name:order_id type:int require:1 other: desc:订单ID
* @param name:get_integral type:int require:1 other: desc:获得积分
*
* @return id:订单ID
* @return num:订单号
... ... @@ -801,15 +802,26 @@ class UserController extends RestBaseController
{
$user_id = $this->getUserId();
$order_id = $this->request->param('order_id');
$get_integral = $this->request->param('get_integral');
if(empty($order_id)){
$this->error('缺少必要参数');
}
$data['order_id'] = $order_id;
$data['user_id'] = $user_id;
$data['create_time'] = time();
$data['status'] = 2;
Db::name('subscribe')
->where('id',$order_id)
->update(['status'=>1]);
->update(['status'=>2,'get_integral'=>$get_integral]);
$info = Db::name('integral')
->where('user_id',$user_id)
->find();
$res['num'] = $info['num'] + 1;
$res['add_total'] = $info['add_total'] + $get_integral;
$res['now_integral'] = $info['now_integral'] + $get_integral;
Db::name('integral')
->where('user_id',$user_id)
->update($res);
$res = Db::name('collector')
->insertGetId($data);
if($res){
... ...