|
|
@@ -807,6 +807,26 @@ class Access
|
|
807
|
807
|
|
|
808
|
808
|
}
|
|
809
|
809
|
|
|
|
810
|
+ //b4 现金+京豆支付
|
|
|
811
|
+ if($array_fzone_paytype['type'] == 'b4'){
|
|
|
812
|
+
|
|
|
813
|
+ $userdata = Db::name('user')->where('uid',$store_order_data['uid'])->find();
|
|
|
814
|
+ //查询用户的京豆是否足够
|
|
|
815
|
+ $jingdou_pri = $userdata['jingdou'] - $array_fzone_paytype['other'];
|
|
|
816
|
+ if($jingdou_pri < 0){
|
|
|
817
|
+ return app('json')->fail('京豆不足,请重试!');
|
|
|
818
|
+ }
|
|
|
819
|
+
|
|
|
820
|
+ //如果京豆足够,修改订单的实际价格
|
|
|
821
|
+ $group_order_datas = Db::name('store_group_order')->where('group_order_id',$oid)->find();
|
|
|
822
|
+ if(!empty($group_order_datas)){
|
|
|
823
|
+ Db::name('store_group_order')->where('group_order_id',$oid)->update(['pay_price'=>$array_fzone_paytype['price']]);
|
|
|
824
|
+ }else{
|
|
|
825
|
+ return app('json')->fail('找不到订单,请重试!');
|
|
|
826
|
+ }
|
|
|
827
|
+
|
|
|
828
|
+ }
|
|
|
829
|
+
|
|
810
|
830
|
|
|
811
|
831
|
}else{
|
|
812
|
832
|
return app('json')->fail('数据异常,请重新下单,并选择支付方式!');
|