获取兑换配置

main
fengxinyhyl 9 months ago
parent 8cf30f499b
commit ef3d60b65f
  1. 10
      app/common/repositories/system/HuitongRepository.php
  2. 1
      app/common/repositories/user/UserAssetsLogRepository.php
  3. 24
      app/controller/api/Auth.php
  4. 20
      app/controller/api/user/User.php
  5. 9
      route/api.php

@ -80,7 +80,17 @@ class HuitongRepository extends BaseRepository
'total' => $totalHuitong,
)),
]);
}
public function getCurrent(){
$last = $this->dao->getLastHuitong();
if (empty($last)) {
$huitong = 1;
} else {
$huitong = $last['current'];
}
return $huitong;
}
}

@ -125,6 +125,7 @@ class UserAssetsLogRepository extends BaseRepository
* {"name":"福利积分--商户--推荐商家奖", "value":1, "key":"welfare_merchant_recommend"}
* {"name":"惠通宝增值幅度比例配置", "value":10, "key":"huitong_add"}
* {"name":"福利积分--存在分红点用户奖励", "value":10, "key":"share_award"}
* {"name":"消费积分兑换分红点", "value":100, "key":"consume_to_share"}
*/
public function userPayEvent($groupOrder)
{

File diff suppressed because one or more lines are too long

@ -18,6 +18,7 @@ use app\common\repositories\store\IntegralRepository;
use app\common\repositories\store\service\StoreServiceRepository;
use app\common\repositories\system\CacheRepository;
use app\common\repositories\user\MemberinterestsRepository;
use app\common\repositories\user\UserAssetsLogRepository;
use app\common\repositories\user\UserBillRepository;
use app\common\repositories\user\UserBrokerageRepository;
use app\common\repositories\user\UserRepository;
@ -43,6 +44,25 @@ class User extends BaseController
$this->user = $this->request->userInfo();
}
public function assetsLog(){
$user = $this->request->userInfo();
$uid = $user->uid;
// $uid = 3;
$page = $this->request->param('page', 1);
$limit = $this->request->param('limit', 10);
$asset_type = $this->request->param('asset_type', 1);
$where = array();
$where[] = array('asset_type','=',$asset_type);
$where[] = array('status','in',[UserAssetsLogRepository::STATUS_FROZEN, UserAssetsLogRepository::STATUS_SUCCESS, UserAssetsLogRepository::STATUS_USED]);
return app('json')->success(app(UserAssetsLogRepository::class)->list($uid, $where, $page, $limit));
}
/**
* @return mixed
* @author xaboy

@ -21,6 +21,10 @@ use think\facade\Route;
Route::group('api/', function () {
Route::any('test', 'api.Auth/test');
//兑换配置
Route::get('exchangeConfig', 'api.Auth/exchangeConfig');
//强制登录
Route::group(function () {
Route::group('v2', function () {
@ -35,8 +39,6 @@ Route::group('api/', function () {
Route::post('logout', 'api.Auth/logout');
//用户信息
Route::get('user', 'api.Auth/userInfo');
//用户资产明细
Route::get('user/assetsLog', 'api.Auth/assetsLog');
//绑定推荐人
Route::post('user/spread', 'api.Auth/spread');
@ -106,6 +108,9 @@ Route::group('api/', function () {
Route::post('user/cancel', 'api.Auth/cancel');
//用户
Route::group('user', function () {
//用户资产明细
Route::get('assetsLog', 'User/assetsLog');
//切换账号
Route::get('account', 'User/account');
Route::post('switch', 'User/switchUser');

Loading…
Cancel
Save