|
|
@@ -60,7 +60,6 @@ class CgRefundController extends BaseController
|
|
|
if (in_array($cg->debt, [0, 2]) && $cg->addTime < '2023-10-17 00:00:00') {
|
|
|
util::fail('10月17日前订单无法申请退款');
|
|
|
}
|
|
|
-
|
|
|
$ghsId = $cg->ghsId ?? 0;
|
|
|
$ghs = GhsClass::getById($ghsId, true);
|
|
|
if (empty($ghs)) {
|
|
|
@@ -86,6 +85,14 @@ class CgRefundController extends BaseController
|
|
|
if (isset($cg->clearId) && !empty($cg->clearId)) {
|
|
|
util::fail('订单已结,不能再申请售后');
|
|
|
}
|
|
|
+ $payTime = $cg->payTime;
|
|
|
+ $currentTime = strtotime($payTime);
|
|
|
+ $now = time();
|
|
|
+ $newTime = bcadd($currentTime, 89400);
|
|
|
+ if ($now > $newTime) {
|
|
|
+ util::fail('超时订单,不能自行申请售后');
|
|
|
+ }
|
|
|
+
|
|
|
$connection = Yii::$app->db;
|
|
|
$transaction = $connection->beginTransaction();
|
|
|
try {
|