package com.xhkjedu.sstudy.controller.resource;

import com.xhkjedu.sstudy.model.resource.TGuideGroup;
import com.xhkjedu.sstudy.service.resource.GuideGroupService;
import com.xhkjedu.utils.N_Utils;
import com.xhkjedu.vo.ResultVo;
import com.xhkjedu.sstudy.vo.resource.GuideGroupVo;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author ywx
 * @classname TGuideGroupController
 * @description 
 * @date 2020/6/2 17:01
 **/
@RestController
@RequestMapping("/guide_group")
public class GuideGroupController {
    @Resource
    private GuideGroupService guideGroupService;

    @PostMapping("/analyze")
    public ResultVo analyze(@RequestBody TGuideGroup tGuideGroup) {
        N_Utils.validation(new Object[]{tGuideGroup.getGuideid(),"预习id",1});
        List<GuideGroupVo> list = guideGroupService.findAll(tGuideGroup);
        return new ResultVo(0,"导学分析成功",list);
    }
}
