...
|
...
|
@@ -222,10 +222,15 @@ class CenterController extends HomeBaseController |
|
|
$request = request();
|
|
|
if ($request->isAjax()) {
|
|
|
$oid = $request->param('oid');
|
|
|
//如果是组合支付,需要吧之前支付的积分一并返还
|
|
|
$info = Db::name('zj_order')->field('pay_type,whole_num')->where(['id'=>$oid])->find();
|
|
|
Db::startTrans();
|
|
|
if (Db::name('zj_order')->where(['id' => $oid])->value('step') == 1) {
|
|
|
if (Db::name('zj_order')->delete($oid)) {
|
|
|
if (Db::name('zj_order_goods')->where(['oid' => $oid])->delete()) {
|
|
|
if($info['pay_type'] == 2) {
|
|
|
Db::name('user')->where(['id'=>session('user.id')])->setInc('balance', $info['whole_num']);
|
|
|
}
|
|
|
Db::commit();
|
|
|
$this->success('订单已取消', '', true);
|
|
|
} else {
|
...
|
...
|
|