|
|
@@ -86,6 +86,7 @@ use app\common\repositories\user\UserSignHongbaoRepository;
|
|
86
|
86
|
use app\common\repositories\user\UserSignJingdouRepository;
|
|
87
|
87
|
use app\common\repositories\user\UserSignScoreRepository;
|
|
88
|
88
|
use app\common\repositories\user\UserSignVrRepository;
|
|
|
89
|
+use app\common\repositories\user\UserSignXfbRepository;
|
|
89
|
90
|
use app\common\repositories\user\UserThirdRepository;
|
|
90
|
91
|
use app\common\repositories\user\UserWithdrawalLimitRecordRepository;
|
|
91
|
92
|
use app\common\repositories\wechat\RoutineQrcodeRepository;
|
|
|
@@ -11735,6 +11736,24 @@ class StoreOrderRepository extends BaseRepository
|
|
11735
|
11736
|
'购买共富区商品获得PV'
|
|
11736
|
11737
|
);
|
|
11737
|
11738
|
|
|
|
11739
|
+ // 发放幸福币
|
|
|
11740
|
+ $xfbData = [
|
|
|
11741
|
+ 'uid' => $sharedProsperityUserEntity->getUserId(),
|
|
|
11742
|
+ 'before' => 0,
|
|
|
11743
|
+ 'number' => $storeOrderEntity->getPayPrice(),
|
|
|
11744
|
+ 'after' => 0,
|
|
|
11745
|
+ 'mark' => '购买共富区商品获得幸福币:' . $storeOrderEntity->getPayPrice(),
|
|
|
11746
|
+ 'desc' => '购买共富区商品获得幸福币',
|
|
|
11747
|
+ 'order_sn' => $storeOrderEntity->getOrderSn(),
|
|
|
11748
|
+ 'order_type' => $storeOrderEntity->getOrderType(),
|
|
|
11749
|
+ 'type' => 1,
|
|
|
11750
|
+ 'addtime' => time()
|
|
|
11751
|
+ ];
|
|
|
11752
|
+ /** @var UserSignXfbRepository $xfbRepository */
|
|
|
11753
|
+ $xfbRepository = app()->make(UserSignXfbRepository::class);
|
|
|
11754
|
+ $xfbRepository->create($xfbData);
|
|
|
11755
|
+
|
|
|
11756
|
+
|
|
11738
|
11757
|
if (!empty($sharedProsperityUserEntity->getParentId())) {
|
|
11739
|
11758
|
// 如果 共富区推荐人 不是平台,则为 推荐人发放 推荐奖励
|
|
11740
|
11759
|
$sharedProsperityUserEntityByParent = $sharedProsperityUserRepository->getSharedProsperityUserEntityByUserId($sharedProsperityUserEntity->getParentId());
|
|
|
@@ -12210,6 +12229,12 @@ class StoreOrderRepository extends BaseRepository
|
|
12210
|
12229
|
}, $userWithdrawalLimitRecordEntityList);
|
|
12211
|
12230
|
$userWithdrawalLimitRecordRepository->executeByIdList($userWithdrawalLimitRecordIdList);
|
|
12212
|
12231
|
}
|
|
|
12232
|
+
|
|
|
12233
|
+ // 结算幸福币
|
|
|
12234
|
+ /** @var UserSignXfbRepository $xfbRepository */
|
|
|
12235
|
+ $xfbRepository = app()->make(UserSignXfbRepository::class);
|
|
|
12236
|
+ // 结算
|
|
|
12237
|
+ $xfbRepository->settlement($unsettledOrderSnList);
|
|
12213
|
12238
|
} catch (DbException $e) {
|
|
12214
|
12239
|
throw new ValidateException('订单结算失败');
|
|
12215
|
12240
|
}
|