Commit 1c06503e by 杨树贤

添加注释

parent 50cc15fe
......@@ -7,15 +7,32 @@ use App\Services\UserIntegralService;
use Carbon\Carbon;
use Illuminate\Http\Request;
/**
* 用户签到
* Class CheckInController
* @package App\Http\Controllers
*/
class CheckInController extends Controller
{
/**
* @var CheckInService
*/
private $service;
/**
* CheckInController constructor.
* @param CheckInService $service
*/
public function __construct(CheckInService $service)
{
$this->service = $service;
}
/**
* 用户签到列表
* @param Request $request
* @return array|false|string
*/
public function index(Request $request)
{
$map = [
......@@ -26,6 +43,11 @@ class CheckInController extends Controller
return $this->Export(0, 'ok', $result);
}
/**
* 用户签到
* @param Request $request
* @return array|false|string
*/
public function add(Request $request)
{
$map = [
......
<?php
namespace App\Http\Controllers;
/**
* 商品兑换配置
* Class ExchangeSettingsController
* @package App\Http\Controllers
*/
class ExchangeSettingsController extends Controller
{
public function index()
{
}
}
\ No newline at end of file
......@@ -7,8 +7,16 @@ use App\Services\IntegralBillsService;
use Illuminate\Http\Request;
use App\Http\Transformers\IntegralBillTransformer;
/**
* 用户获取红包流水
* Class IntegralBillsController
* @package App\Http\Controllers
*/
class IntegralBillsController extends Controller
{
/**
* @var IntegralBillsService
*/
private $service;
public function __construct(IntegralBillsService $service)
......@@ -16,6 +24,12 @@ class IntegralBillsController extends Controller
$this->service = $service;
}
/**
* 获取红包获取流水账单
* @param Request $request
* @param IntegralBillTransformer $transformer
* @return array|false|string
*/
public function index(Request $request, IntegralBillTransformer $transformer)
{
$map = [
......@@ -26,4 +40,15 @@ class IntegralBillsController extends Controller
return $this->Export(0, 'ok', $result);
}
/**
* 好友助力链接
* @param Request $request
*/
public function assist(Request $request)
{
//$originUserId = $request->get('')
}
}
\ No newline at end of file
......@@ -8,8 +8,16 @@ use Illuminate\Http\Request;
use App\Services\IntegralService;
use App\Services\UserIntegralService;
/**
* 红包类型
* Class IntegralsController
* @package App\Http\Controllers
*/
class IntegralsController extends Controller
{
/**
* @var IntegralService
*/
private $service;
public function __construct(IntegralService $service)
......@@ -17,10 +25,17 @@ class IntegralsController extends Controller
$this->service = $service;
}
/**
* 获取用户可进行红包兑换的项目(比如签到,红包码等等)
* @param Request $request
* @param UserIntegralService $userIntegralService
* @return array|false|string
*/
public function index(Request $request, UserIntegralService $userIntegralService)
{
$map = ['is_api' => 1];
$result = $this->service->getIntegralList($map);
//获取用户当前红包数额
$userIntegral = $userIntegralService->getUserIntegral(['id' => 96]);
if ($userIntegral) {
$result['integral'] = $userIntegral['data']['integral'];
......
......@@ -7,22 +7,38 @@ use App\Http\Transformers\UserExchangeTransformer;
use App\Services\UserExchangeService;
use Illuminate\Http\Request;
/**
* 用户兑换(兑现)
* Class UserExchangesController
* @package App\Http\Controllers
*/
class UserExchangesController extends Controller
{
/**
* @var UserExchangeService
*/
private $service;
/**
* UserExchangesController constructor.
* @param UserExchangeService $service
*/
public function __construct(UserExchangeService $service)
{
$this->service = $service;
}
/**
* @param Request $request
* @param UserExchangeTransformer $transformer
* @return array|false|string
*/
public function index(Request $request, UserExchangeTransformer $transformer)
{
$map = [
'user_id' => $request->user->user_id,
];
$result = $this->service->getUserExchangeList($map);
// dd($result);
$result = $transformer->transform($result);
return $this->Export(0, 'ok', $result);
......
<?php
namespace App\Services;
class ExchangeSettingService
{
}
\ No newline at end of file
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