|
|
@@ -862,17 +862,18 @@ class ServiceOrderLogic extends BaseLogic
|
|
|
if($work->isEmpty()){
|
|
|
throw new Exception('工单不存在');
|
|
|
}
|
|
|
+
|
|
|
$work->refund_approval = 1;
|
|
|
$work->save();
|
|
|
-
|
|
|
//判断是否已下单时间过了两小时,并且师傅暂未上门,距离预约时间两小时以上
|
|
|
- if(($order['pay_time']+7200)>time() and $work['work_status']<4 and ($work['appointment_time']-7200)>time()){
|
|
|
+ if(($order['pay_time']+7200)>time() and $work['work_status']<4 and (strtotime($work['appointment_time'])-7200)>time()){
|
|
|
//生成退款订单
|
|
|
\app\common\model\recharge\RechargeOrder::update([
|
|
|
'id' => $order['id'],
|
|
|
'refund_status' => YesNoEnum::YES,
|
|
|
]);
|
|
|
|
|
|
+
|
|
|
// 生成退款记录
|
|
|
$recordSn = generate_sn(RefundRecord::class, 'sn');
|
|
|
$record = RefundRecord::create([
|