Commit ccd55a8b by 杨树贤

添加已使用次数给红包活动列表

parent 58a6eccc
......@@ -34,18 +34,13 @@ class IntegralsController extends Controller
public function index(Request $request, UserIntegralService $userIntegralService)
{
$userId = $request->user->user_id;
$map = ['is_api' => 1];
$map = ['is_api' => 1, 'user_id' => $userId];
$result = $this->service->getIntegralList($map);
//获取用户当前红包数额
$userIntegral = $userIntegralService->getUserIntegral(['id' => $userId]);
if ($userIntegral) {
$result['integral'] = $userIntegral['data']['integral'];
}
//获得当前是否已经签到
$checkInStatus = $this->service->getCheckInStatus($userId);
$result['check_in_status'] = $checkInStatus;
return $this->Export(0, 'ok', $result);
}
......
......@@ -3,6 +3,8 @@
namespace App\Services;
use Common\Model\RedisModel;
class IntegralService
{
public function getIntegralList($map = [])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment