Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
ic_welfare_api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
1c06503e
authored
Aug 26, 2019
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
添加注释
parent
50cc15fe
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
110 additions
and
1 deletions
app/Http/Controllers/CheckInController.php
app/Http/Controllers/ExchangeSettingsController.php
app/Http/Controllers/IntegralBillsController.php
app/Http/Controllers/IntegralsController.php
app/Http/Controllers/UserExchangesController.php
app/Services/ExchangeSettingService.php
app/Http/Controllers/CheckInController.php
View file @
1c06503e
...
...
@@ -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
=
[
...
...
app/Http/Controllers/ExchangeSettingsController.php
0 → 100644
View file @
1c06503e
<?php
namespace
App\Http\Controllers
;
/**
* 商品兑换配置
* Class ExchangeSettingsController
* @package App\Http\Controllers
*/
class
ExchangeSettingsController
extends
Controller
{
public
function
index
()
{
}
}
\ No newline at end of file
app/Http/Controllers/IntegralBillsController.php
View file @
1c06503e
...
...
@@ -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
app/Http/Controllers/IntegralsController.php
View file @
1c06503e
...
...
@@ -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'
];
...
...
app/Http/Controllers/UserExchangesController.php
View file @
1c06503e
...
...
@@ -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
);
...
...
app/Services/ExchangeSettingService.php
0 → 100644
View file @
1c06503e
<?php
namespace
App\Services
;
class
ExchangeSettingService
{
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment