54 lines
1.3 KiB
PHP
54 lines
1.3 KiB
PHP
<?php
|
||
|
||
namespace app\controller\api;
|
||
|
||
use support\Request;
|
||
|
||
use App\Utils\ApiResponseApp;
|
||
|
||
|
||
use App\model\User;
|
||
use App\dao\UserRewardDao;
|
||
use hg\apidoc\annotation as Apidoc;
|
||
use support\Db;
|
||
|
||
/**
|
||
* @Apidoc\Title("用户收益控制器?")
|
||
*/
|
||
|
||
class Money_logController
|
||
{
|
||
protected $noNeedLogin = [];
|
||
|
||
|
||
/**
|
||
* @Apidoc\Title("1.0 获取用户收益列表")
|
||
* time 0全部时间1今天2昨天3最近七天 需要分页page: 1 size: 20
|
||
* @Apidoc\Url("api/money_log/lists")
|
||
* @Apidoc\Method("POST")
|
||
*/
|
||
public function lists(Request $request)
|
||
{
|
||
$page = $request->post('page', 1); // 默认第一页
|
||
$size = $request->post('size', 15); // 默认每页15条
|
||
$status = $request->post('status', 0); // 默认状态为0(全部)
|
||
$time = $request->post('time', null); // 默认时间不做过滤
|
||
$user_id = $request->data['id'];
|
||
return ApiResponseApp::success(UserRewardDao::search($user_id, $status, $time, $page, $size));
|
||
}
|
||
/**
|
||
* @Apidoc\Title("1.0 消息根据type 判断类型")
|
||
* @Apidoc\Url("api/common/messageList")
|
||
* @Apidoc\Method("POST")
|
||
*/
|
||
public function messageList(Request $request)
|
||
{
|
||
$type = $request->get('type');
|
||
/**
|
||
* 返回轮播图
|
||
*/
|
||
if ($type == 5) {
|
||
}
|
||
}
|
||
}
|