|
@@ -257,6 +257,13 @@ class OrderService
|
|
if (!$orderRes) {
|
|
if (!$orderRes) {
|
|
throw new Exception('生成订单失败');
|
|
throw new Exception('生成订单失败');
|
|
}
|
|
}
|
|
|
|
+ //订单套餐卡券类型商家直接到账
|
|
|
|
+ if ($package['type'] == 2) {//卡券类型直接已完成
|
|
|
|
+ $wallet_rs = model('walletcompany')->lockChangeAccountRemain($companyId, 'money', $package['price'], 203, '套餐订单完成服务', 'order', $orderRes);
|
|
|
|
+ if($wallet_rs['status'] === false){
|
|
|
|
+ throw new Exception($wallet_rs['msg']);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
$newNum = $package['num'] - 1;
|
|
$newNum = $package['num'] - 1;
|
|
$packageRes = Db::name('package')->where($packageWhere)->update(['num'=>$newNum]);
|
|
$packageRes = Db::name('package')->where($packageWhere)->update(['num'=>$newNum]);
|
|
if (!$packageRes) {
|
|
if (!$packageRes) {
|