Explorar el Código

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

sunxbiao hace 5 meses
padre
commit
36fa7b42e0
Se han modificado 1 ficheros con 6 adiciones y 0 borrados
  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
 use app\common\repositories\article\AgreementRepository;
13
 use app\common\repositories\article\AgreementRepository;
14
 use app\common\repositories\merchant\order\OrderGzcRepository;
14
 use app\common\repositories\merchant\order\OrderGzcRepository;
15
 use app\common\repositories\merchant\order\OrderMerchantRepository;
15
 use app\common\repositories\merchant\order\OrderMerchantRepository;
16
+use app\common\repositories\shared\SharedProsperityUserRepository;
16
 use app\common\repositories\store\product\ProductRepository;
17
 use app\common\repositories\store\product\ProductRepository;
17
 use app\common\repositories\user\UnionUsersRepository;
18
 use app\common\repositories\user\UnionUsersRepository;
18
 use app\controller\api\merchant\sxy\Access;
19
 use app\controller\api\merchant\sxy\Access;
@@ -3819,6 +3820,11 @@ class User extends BaseController
3819
         $uid = $this->request->uid();
3820
         $uid = $this->request->uid();
3820
         // 佣金余额
3821
         // 佣金余额
3821
         $data['brokerage_price'] = Db::name('user')->where('uid', $uid)->value('brokerage_price');
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
         $data['sum_amount'] = Db::name('user_bill')
3829
         $data['sum_amount'] = Db::name('user_bill')
3824
             ->where('uid', $uid)
3830
             ->where('uid', $uid)