EsCourseController.java 978 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
package com.kwan.shuyu.controller;

import com.kwan.shuyu.domain.CoursePub;
import com.kwan.shuyu.domain.CourseSearchParam;
import com.kwan.shuyu.domain.QueryResponseResult;
import com.kwan.shuyu.service.EsCourseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/search/course")
public class EsCourseController {

    @Autowired
    private EsCourseServiceImpl esCourseServiceImpl;

    @GetMapping(value = "/list/{page}/{size}")
    public QueryResponseResult<CoursePub> list(@PathVariable("page") int page
            , @PathVariable("size") int size, CourseSearchParam courseSearchParam) {
        return esCourseServiceImpl.list(page, size, courseSearchParam);
    }
}