package com.hc.web.controller.browser.third;

import com.hc.business.service.ZccmThirdCourseService;
import com.hc.core.utils.result.Result;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 第三方用户表(Third)表控制层
 *
 * @author java
 * @since 2020-06-17 17:29:30
 */

@RestController
@RequestMapping("/new/api/third")
public class OneThirdController {

    /**
     * 服务对象
     */
    private final ZccmThirdCourseService thirdCourseService;

    public OneThirdController(ZccmThirdCourseService thirdCourseService) {
        this.thirdCourseService = thirdCourseService;
    }

    @PostMapping("/course")
    @ApiOperation(value = "依据token获取 第三方课程", response = Result.class)
    public Result selectThird(@RequestParam String token) {
        return Result.success(thirdCourseService.queryThreadCourseDto(token));
    }


}