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

修改总金额

... ... @@ -88,8 +88,8 @@
<file leaf-file-name="Pay.php" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/application/api/controller/Pay.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="528">
<caret line="369" column="120" lean-forward="true" selection-start-line="369" selection-start-column="120" selection-end-line="369" selection-end-column="120" />
<state relative-caret-position="288">
<caret line="202" column="62" lean-forward="true" selection-start-line="202" selection-start-column="62" selection-end-line="202" selection-end-column="62" />
<folding>
<element signature="e#574#693#0#PHP" expanded="false" />
<element signature="e#699#1012#0#PHP" expanded="false" />
... ... @@ -97,13 +97,13 @@
<element signature="e#3099#3419#0#PHP" expanded="false" />
<element signature="e#3424#5506#0#PHP" expanded="false" />
<element signature="e#5512#5930#0#PHP" expanded="false" />
<element signature="e#5935#14175#0#PHP" expanded="false" />
<element signature="e#6179#6269#0#PHP" expanded="false" />
<element signature="e#6347#6443#0#PHP" expanded="false" />
<element signature="e#9210#11294#0#PHP" expanded="false" />
<element signature="e#11358#11476#0#PHP" expanded="false" />
<element signature="e#12333#14108#0#PHP" expanded="false" />
<element signature="e#14181#14601#0#PHP" expanded="false" />
<element signature="e#14606#22776#0#PHP" expanded="false" />
<element signature="e#22793#23090#0#PHP" expanded="false" />
<element signature="e#23095#23488#0#PHP" expanded="false" />
<element signature="e#23515#26993#0#PHP" expanded="false" />
... ... @@ -206,8 +206,8 @@
<sorting>DEFINITION_ORDER</sorting>
</component>
<component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" />
<component name="ProjectFrameBounds">
<option name="x" value="209" />
<component name="ProjectFrameBounds" extendedState="1">
<option name="x" value="40" />
<option name="y" value="43" />
<option name="width" value="1700" />
<option name="height" value="1000" />
... ... @@ -338,7 +338,7 @@
<workItem from="1575541798312" duration="2359000" />
<workItem from="1575592025964" duration="640000" />
<workItem from="1575599624364" duration="95000" />
<workItem from="1575680867057" duration="13005000" />
<workItem from="1575680867057" duration="13217000" />
</task>
<task id="LOCAL-00001" summary="调试">
<created>1574145133364</created>
... ... @@ -351,7 +351,7 @@
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="322904000" />
<option name="totallyTimeSpent" value="323116000" />
</component>
<component name="TodoView">
<todo-panel id="selected-file">
... ... @@ -363,7 +363,7 @@
</todo-panel>
</component>
<component name="ToolWindowManager">
<frame x="209" y="43" width="1700" height="1000" extended-state="0" />
<frame x="40" y="43" width="1700" height="1000" extended-state="1" />
<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.19512194" sideWeight="0.5" order="1" side_tool="false" content_ui="combo" />
... ... @@ -860,8 +860,8 @@
</entry>
<entry file="file://$PROJECT_DIR$/application/api/controller/Pay.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="528">
<caret line="369" column="120" lean-forward="true" selection-start-line="369" selection-start-column="120" selection-end-line="369" selection-end-column="120" />
<state relative-caret-position="288">
<caret line="202" column="62" lean-forward="true" selection-start-line="202" selection-start-column="62" selection-end-line="202" selection-end-column="62" />
<folding>
<element signature="e#574#693#0#PHP" expanded="false" />
<element signature="e#699#1012#0#PHP" expanded="false" />
... ... @@ -869,13 +869,13 @@
<element signature="e#3099#3419#0#PHP" expanded="false" />
<element signature="e#3424#5506#0#PHP" expanded="false" />
<element signature="e#5512#5930#0#PHP" expanded="false" />
<element signature="e#5935#14175#0#PHP" expanded="false" />
<element signature="e#6179#6269#0#PHP" expanded="false" />
<element signature="e#6347#6443#0#PHP" expanded="false" />
<element signature="e#9210#11294#0#PHP" expanded="false" />
<element signature="e#11358#11476#0#PHP" expanded="false" />
<element signature="e#12333#14108#0#PHP" expanded="false" />
<element signature="e#14181#14601#0#PHP" expanded="false" />
<element signature="e#14606#22776#0#PHP" expanded="false" />
<element signature="e#22793#23090#0#PHP" expanded="false" />
<element signature="e#23095#23488#0#PHP" expanded="false" />
<element signature="e#23515#26993#0#PHP" expanded="false" />
... ...
... ... @@ -206,7 +206,7 @@ class Pay extends Api
}else{
//是会员
$pic = Db::name('pic')->field('id,price,buy_num,money')->where('id',$v)->find();
$total_money = $pic['money'] + $pic['price'] * 0.75;
$total_money = $pic['money'] + ($pic['price']*0.75);
Db::name('pic')->where('id',$pic['id'])->update(['buy_num'=>$pic['buy_num']+1,'money'=>$total_money]);
}
}
... ... @@ -368,7 +368,7 @@ class Pay extends Api
}else{
//是会员
$pic = Db::name('pic')->field('id,price,buy_num,money')->where('id',$v)->find();
$total_money = $pic['money'] + $pic['price'] * 0.75;
$total_money = $pic['money'] + ($pic['price']*0.75);
Db::name('pic')->where('id',$pic['id'])->update(['buy_num'=>$pic['buy_num']+1,'money'=>$total_money]);
}
}
... ...