|
|
@@ -20,6 +20,7 @@ use app\api\logic\ServiceOrderLogic;
|
|
|
use app\common\logic\PaymentLogic;
|
|
|
use app\common\model\property\PropertyOrder;
|
|
|
use app\common\logic\BaseLogic;
|
|
|
+use app\common\model\works\ServiceWork;
|
|
|
use think\Exception;
|
|
|
use think\facade\Db;
|
|
|
use think\facade\Log;
|
|
|
@@ -192,7 +193,22 @@ class PropertyOrderLogic extends BaseLogic
|
|
|
if ($order['order_amount'] == 0) {
|
|
|
//0元时自动支付
|
|
|
$redirectUrl = $params['redirect'] ?? '/pages/payment/payment';
|
|
|
- PaymentLogic::pay($params['pay_way'], $params['from'], $order, 4, $redirectUrl);
|
|
|
+ $res = PaymentLogic::pay($params['pay_way'], $params['from'], $order, 4, $redirectUrl);
|
|
|
+ if(isset($res['need_pay']) && $res['need_pay'] === 0) {
|
|
|
+ $workDetail = ServiceWork::findOrEmpty($order['work_id']);
|
|
|
+ if (!$workDetail->isEmpty()) {
|
|
|
+ event('Notice', [
|
|
|
+ 'scene_id' => 100,
|
|
|
+ 'params' => [
|
|
|
+ 'user_id' => 0,
|
|
|
+ 'order_id' => $workDetail['id'],
|
|
|
+ 'thing3' => $workDetail['title'],
|
|
|
+ 'time6' => $workDetail['appointment_time'],
|
|
|
+ 'phone_number8' => $workDetail['mobile'],
|
|
|
+ ]
|
|
|
+ ]);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|