Browse Source

收益-返回两个体系的余额

sunxbiao 5 months ago
parent
commit
36fa7b42e0
1 changed files with 6 additions and 0 deletions
  1. 6 0
      app/controller/api/user/User.php

+ 6 - 0
app/controller/api/user/User.php

@@ -13,6 +13,7 @@ namespace app\controller\api\user;
13 13
 use app\common\repositories\article\AgreementRepository;
14 14
 use app\common\repositories\merchant\order\OrderGzcRepository;
15 15
 use app\common\repositories\merchant\order\OrderMerchantRepository;
16
+use app\common\repositories\shared\SharedProsperityUserRepository;
16 17
 use app\common\repositories\store\product\ProductRepository;
17 18
 use app\common\repositories\user\UnionUsersRepository;
18 19
 use app\controller\api\merchant\sxy\Access;
@@ -3819,6 +3820,11 @@ class User extends BaseController
3819 3820
         $uid = $this->request->uid();
3820 3821
         // 佣金余额
3821 3822
         $data['brokerage_price'] = Db::name('user')->where('uid', $uid)->value('brokerage_price');
3823
+
3824
+        /** @var SharedProsperityUserRepository $sharedProsperityUserRepository */
3825
+        $sharedProsperityUserRepository = app()->make(SharedProsperityUserRepository::class);
3826
+        $sharedProsperityUserEntity = $sharedProsperityUserRepository->getSharedProsperityUserEntityByUserId($uid);
3827
+        $data['shared_prosperity_balance'] = $sharedProsperityUserEntity->getBalance();
3822 3828
         // 总收益
3823 3829
         $data['sum_amount'] = Db::name('user_bill')
3824 3830
             ->where('uid', $uid)