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

修改订单总金额

@@ -89,8 +89,8 @@ @@ -89,8 +89,8 @@
89 <file leaf-file-name="Pay.php" pinned="false" current-in-tab="true"> 89 <file leaf-file-name="Pay.php" pinned="false" current-in-tab="true">
90 <entry file="file://$PROJECT_DIR$/application/api/controller/Pay.php"> 90 <entry file="file://$PROJECT_DIR$/application/api/controller/Pay.php">
91 <provider selected="true" editor-type-id="text-editor"> 91 <provider selected="true" editor-type-id="text-editor">
92 - <state relative-caret-position="269">  
93 - <caret line="690" column="24" lean-forward="false" selection-start-line="690" selection-start-column="24" selection-end-line="690" selection-end-column="24" /> 92 + <state relative-caret-position="569">
  93 + <caret line="729" column="46" lean-forward="true" selection-start-line="729" selection-start-column="46" selection-end-line="729" selection-end-column="46" />
94 <folding> 94 <folding>
95 <element signature="e#574#693#0#PHP" expanded="false" /> 95 <element signature="e#574#693#0#PHP" expanded="false" />
96 <element signature="e#699#1012#0#PHP" expanded="false" /> 96 <element signature="e#699#1012#0#PHP" expanded="false" />
@@ -114,27 +114,16 @@ @@ -114,27 +114,16 @@
114 <element signature="e#26803#27196#0#PHP" expanded="false" /> 114 <element signature="e#26803#27196#0#PHP" expanded="false" />
115 <element signature="e#27223#30701#0#PHP" expanded="false" /> 115 <element signature="e#27223#30701#0#PHP" expanded="false" />
116 <element signature="e#30730#33635#0#PHP" expanded="false" /> 116 <element signature="e#30730#33635#0#PHP" expanded="false" />
117 - <element signature="e#35997#39718#0#PHP" expanded="false" />  
118 - <element signature="e#40896#48068#0#PHP" expanded="false" />  
119 - <element signature="e#43162#46883#0#PHP" expanded="false" />  
120 - <element signature="e#46939#47049#0#PHP" expanded="false" />  
121 - <element signature="e#47325#47394#0#PHP" expanded="false" />  
122 - <element signature="e#48091#48308#0#PHP" expanded="false" /> 117 + <element signature="e#40897#48069#0#PHP" expanded="false" />
  118 + <element signature="e#43163#46884#0#PHP" expanded="false" />
  119 + <element signature="e#46940#47050#0#PHP" expanded="false" />
  120 + <element signature="e#47326#47395#0#PHP" expanded="false" />
  121 + <element signature="e#48092#48309#0#PHP" expanded="false" />
123 </folding> 122 </folding>
124 </state> 123 </state>
125 </provider> 124 </provider>
126 </entry> 125 </entry>
127 </file> 126 </file>
128 - <file leaf-file-name="07.log" pinned="false" current-in-tab="false">  
129 - <entry file="file://$PROJECT_DIR$/runtime/log/201912/07.log">  
130 - <provider selected="true" editor-type-id="text-editor">  
131 - <state relative-caret-position="0">  
132 - <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />  
133 - <folding />  
134 - </state>  
135 - </provider>  
136 - </entry>  
137 - </file>  
138 </leaf> 127 </leaf>
139 </component> 128 </component>
140 <component name="FindInProjectRecents"> 129 <component name="FindInProjectRecents">
@@ -222,9 +211,9 @@ @@ -222,9 +211,9 @@
222 <sorting>DEFINITION_ORDER</sorting> 211 <sorting>DEFINITION_ORDER</sorting>
223 </component> 212 </component>
224 <component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" /> 213 <component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" />
225 - <component name="ProjectFrameBounds" extendedState="7">  
226 - <option name="x" value="-60" />  
227 - <option name="y" value="56" /> 214 + <component name="ProjectFrameBounds" extendedState="1">
  215 + <option name="x" value="105" />
  216 + <option name="y" value="49" />
228 <option name="width" value="1871" /> 217 <option name="width" value="1871" />
229 <option name="height" value="1007" /> 218 <option name="height" value="1007" />
230 </component> 219 </component>
@@ -354,7 +343,7 @@ @@ -354,7 +343,7 @@
354 <workItem from="1575541798312" duration="2359000" /> 343 <workItem from="1575541798312" duration="2359000" />
355 <workItem from="1575592025964" duration="640000" /> 344 <workItem from="1575592025964" duration="640000" />
356 <workItem from="1575599624364" duration="95000" /> 345 <workItem from="1575599624364" duration="95000" />
357 - <workItem from="1575680867057" duration="21613000" /> 346 + <workItem from="1575680867057" duration="22248000" />
358 </task> 347 </task>
359 <task id="LOCAL-00001" summary="调试"> 348 <task id="LOCAL-00001" summary="调试">
360 <created>1574145133364</created> 349 <created>1574145133364</created>
@@ -367,7 +356,7 @@ @@ -367,7 +356,7 @@
367 <servers /> 356 <servers />
368 </component> 357 </component>
369 <component name="TimeTrackingManager"> 358 <component name="TimeTrackingManager">
370 - <option name="totallyTimeSpent" value="331512000" /> 359 + <option name="totallyTimeSpent" value="332147000" />
371 </component> 360 </component>
372 <component name="TodoView"> 361 <component name="TodoView">
373 <todo-panel id="selected-file"> 362 <todo-panel id="selected-file">
@@ -379,10 +368,10 @@ @@ -379,10 +368,10 @@
379 </todo-panel> 368 </todo-panel>
380 </component> 369 </component>
381 <component name="ToolWindowManager"> 370 <component name="ToolWindowManager">
382 - <frame x="-8" y="-8" width="1936" height="1056" extended-state="7" /> 371 + <frame x="105" y="49" width="1871" height="1007" extended-state="1" />
383 <editor active="true" /> 372 <editor active="true" />
384 <layout> 373 <layout>
385 - <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.1705757" sideWeight="0.5" order="1" side_tool="false" content_ui="combo" /> 374 + <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.17669795" sideWeight="0.5" order="1" side_tool="false" content_ui="combo" />
386 <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32912987" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" /> 375 <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32912987" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
387 <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="0" side_tool="true" content_ui="tabs" /> 376 <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="0" side_tool="true" content_ui="tabs" />
388 <window_info id="Database" active="false" anchor="right" 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" /> 377 <window_info id="Database" active="false" anchor="right" 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" />
@@ -880,8 +869,8 @@ @@ -880,8 +869,8 @@
880 </entry> 869 </entry>
881 <entry file="file://$PROJECT_DIR$/application/api/controller/Pay.php"> 870 <entry file="file://$PROJECT_DIR$/application/api/controller/Pay.php">
882 <provider selected="true" editor-type-id="text-editor"> 871 <provider selected="true" editor-type-id="text-editor">
883 - <state relative-caret-position="269">  
884 - <caret line="690" column="24" lean-forward="false" selection-start-line="690" selection-start-column="24" selection-end-line="690" selection-end-column="24" /> 872 + <state relative-caret-position="569">
  873 + <caret line="729" column="46" lean-forward="true" selection-start-line="729" selection-start-column="46" selection-end-line="729" selection-end-column="46" />
885 <folding> 874 <folding>
886 <element signature="e#574#693#0#PHP" expanded="false" /> 875 <element signature="e#574#693#0#PHP" expanded="false" />
887 <element signature="e#699#1012#0#PHP" expanded="false" /> 876 <element signature="e#699#1012#0#PHP" expanded="false" />
@@ -905,12 +894,11 @@ @@ -905,12 +894,11 @@
905 <element signature="e#26803#27196#0#PHP" expanded="false" /> 894 <element signature="e#26803#27196#0#PHP" expanded="false" />
906 <element signature="e#27223#30701#0#PHP" expanded="false" /> 895 <element signature="e#27223#30701#0#PHP" expanded="false" />
907 <element signature="e#30730#33635#0#PHP" expanded="false" /> 896 <element signature="e#30730#33635#0#PHP" expanded="false" />
908 - <element signature="e#35997#39718#0#PHP" expanded="false" />  
909 - <element signature="e#40896#48068#0#PHP" expanded="false" />  
910 - <element signature="e#43162#46883#0#PHP" expanded="false" />  
911 - <element signature="e#46939#47049#0#PHP" expanded="false" />  
912 - <element signature="e#47325#47394#0#PHP" expanded="false" />  
913 - <element signature="e#48091#48308#0#PHP" expanded="false" /> 897 + <element signature="e#40897#48069#0#PHP" expanded="false" />
  898 + <element signature="e#43163#46884#0#PHP" expanded="false" />
  899 + <element signature="e#46940#47050#0#PHP" expanded="false" />
  900 + <element signature="e#47326#47395#0#PHP" expanded="false" />
  901 + <element signature="e#48092#48309#0#PHP" expanded="false" />
914 </folding> 902 </folding>
915 </state> 903 </state>
916 </provider> 904 </provider>
@@ -688,14 +688,12 @@ class Pay extends Api @@ -688,14 +688,12 @@ class Pay extends Api
688 688
689 //图片支付订单结果通知(无需调用) 689 //图片支付订单结果通知(无需调用)
690 public function picOrderNotify(){ 690 public function picOrderNotify(){
691 - Log::info('景龙');  
692 $config = config('verify.wx_pay'); 691 $config = config('verify.wx_pay');
693 $app = Factory::payment($config); 692 $app = Factory::payment($config);
694 $response = $app->handlePaidNotify(function($message, $fail){ 693 $response = $app->handlePaidNotify(function($message, $fail){
695 //return_code 表示通信状态 694 //return_code 表示通信状态
696 if ($message['return_code'] === 'SUCCESS') { 695 if ($message['return_code'] === 'SUCCESS') {
697 if ($message['result_code'] === 'SUCCESS') { 696 if ($message['result_code'] === 'SUCCESS') {
698 - Log::info($message);  
699 //找到该订单信息 697 //找到该订单信息
700 $data = Db::name('order')->where('id',$message['out_trade_no'])->find(); 698 $data = Db::name('order')->where('id',$message['out_trade_no'])->find();
701 $pic_id = explode(',',$data['pic_id']); 699 $pic_id = explode(',',$data['pic_id']);
@@ -713,7 +711,8 @@ class Pay extends Api @@ -713,7 +711,8 @@ class Pay extends Api
713 //非会员 711 //非会员
714 if($user['is_vip'] == 0){ 712 if($user['is_vip'] == 0){
715 $pic = Db::name('pic')->field('id,price,buy_num,money')->where('id',$v)->find(); 713 $pic = Db::name('pic')->field('id,price,buy_num,money')->where('id',$v)->find();
716 - Db::name('pic')->where('id',$pic['id'])->update(['buy_num'=>$pic['buy_num']+1,'money'=>$pic['money']+$pic['price']]); 714 + $total_money = $pic['money'] + $pic['price'];
  715 + Db::name('pic')->where('id',$pic['id'])->update(['buy_num'=>$pic['buy_num']+1,'money'=>$total_money]);
717 }else{ 716 }else{
718 //是会员 717 //是会员
719 $pic = Db::name('pic')->field('id,price,buy_num,money')->where('id',$v)->find(); 718 $pic = Db::name('pic')->field('id,price,buy_num,money')->where('id',$v)->find();