package cn.com.countrygarden.bi.main.controller.ck;

import cn.com.countrygarden.bi.main.controller.BaseController;
import cn.com.countrygarden.bi.main.core.Result;
import cn.com.countrygarden.bi.main.model.ck.CkCleanerRecording;
import cn.com.countrygarden.bi.main.service.ck.CkCleanerRecordingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController("CkCleanerRecordingController")
@RequestMapping("/api/CkCleanerRecording")
public class CkCleanerRecordingController extends BaseController {
    @Autowired
    private CkCleanerRecordingService ckCleanerRecordingService;

    @GetMapping(value = "/list", produces = "application/json;charset=utf-8")
    public Result list(CkCleanerRecording ckCleanerRecording,
                       @RequestParam(value = "page", required = false, defaultValue = "10") int page,
                       @RequestParam(value = "size", required = false, defaultValue = "1") int size,
                       HttpServletRequest request) {
        return ckCleanerRecordingService.queryPageList(ckCleanerRecording,page,size,getAccessToken(request));
    }
}
