<?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)
    {

        $user_id = $request->data['id'];
        $status = $request->post('status');
        $time = $request->post('time');
        return ApiResponseApp::success(UserRewardDao::search($user_id, $status, $time));
    }
    /**
     * @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) {
        }
    }
}
