|
|
@@ -47,6 +47,7 @@ use think\exception\ValidateException;
|
|
47
|
47
|
use think\facade\Db;
|
|
48
|
48
|
use think\facade\Log;
|
|
49
|
49
|
use think\model\Relation;
|
|
|
50
|
+use Throwable;
|
|
50
|
51
|
|
|
51
|
52
|
/**
|
|
52
|
53
|
* Class StoreGroupOrderRepository
|
|
|
@@ -197,7 +198,7 @@ class StoreGroupOrderRepository extends BaseRepository
|
|
197
|
198
|
$storeOrderRepository->closeStoreOrder($storeOrderEntity, $uid, $changeMessage, $remark);
|
|
198
|
199
|
}
|
|
199
|
200
|
});
|
|
200
|
|
- } catch (\Throwable $e) {
|
|
|
201
|
+ } catch (Throwable $e) {
|
|
201
|
202
|
throw new ValidateException('关闭订单失败:' . json_encode([
|
|
202
|
203
|
'error_message' => $e->getMessage(),
|
|
203
|
204
|
'error_file' => $e->getFile(),
|
|
|
@@ -921,7 +922,7 @@ class StoreGroupOrderRepository extends BaseRepository
|
|
921
|
922
|
$storeGroupOrderRepository->storeGroupOrderPaySuccess($storeGroupOrderEntity->getGroupOrderId());
|
|
922
|
923
|
}
|
|
923
|
924
|
});
|
|
924
|
|
- } catch (\Throwable $e) {
|
|
|
925
|
+ } catch (Throwable $e) {
|
|
925
|
926
|
Log::error('StoreGroupOrderRepository-createStoreGroupOrder:' . $e->getMessage());
|
|
926
|
927
|
return [
|
|
927
|
928
|
'code' => 10001,
|
|
|
@@ -941,7 +942,7 @@ class StoreGroupOrderRepository extends BaseRepository
|
|
941
|
942
|
* @param string $rand 当现金支付时,汇付会在订单尾部跟一个随机数
|
|
942
|
943
|
* @param string|null $payOpenId 当现金支付时,付款人的Id
|
|
943
|
944
|
* @return void
|
|
944
|
|
- * @throws DbException
|
|
|
945
|
+ * @throws Throwable
|
|
945
|
946
|
*/
|
|
946
|
947
|
public function storeGroupOrderPaySuccess(int $groupOrderId, string $rand = '', string $payOpenId = null): void
|
|
947
|
948
|
{
|
|
|
@@ -978,8 +979,9 @@ class StoreGroupOrderRepository extends BaseRepository
|
|
978
|
979
|
// 生成奖励数据
|
|
979
|
980
|
$storeOrderRepository->createRewardMechanismByStoreOrderId($storeOrderEntity->getOrderId());
|
|
980
|
981
|
|
|
981
|
|
- if ($storeOrderEntity->getMerId() == CommonEnum::DESIGN_MERCHANT_ID['MemberZone']['code']) {
|
|
|
982
|
+ if (in_array($storeOrderEntity->getMerId(), [CommonEnum::DESIGN_MERCHANT_ID['MemberZone']['code'], CommonEnum::DESIGN_MERCHANT_ID['SharedProsperity']['code']])) {
|
|
982
|
983
|
// 会员专区的 订单立即结算
|
|
|
984
|
+ // 共富区的订单立即结算
|
|
983
|
985
|
$settlementOrderIdList[] = $storeOrderEntity->getOrderId();
|
|
984
|
986
|
}
|
|
985
|
987
|
|