package com.xhkjedu.sstudy.controller.resource;

import com.xhkjedu.sstudy.model.resource.TGuideGroupStudent;
import com.xhkjedu.sstudy.service.resource.GuideGroupStudentService;
import com.xhkjedu.utils.N_Utils;
import com.xhkjedu.vo.ResultVo;
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;

/**
 * @author ywx
 * @classname TGuideGroupStudentController
 * @description 
 * @date 2020/6/2 17:03
 **/
@RestController
@RequestMapping("/guide_student")
public class GuideGroupStudentController {
    @Resource
    private GuideGroupStudentService guideGroupStudentService;

    @PostMapping("/update")
    public ResultVo updateRead(@RequestBody TGuideGroupStudent tGuideGroupStudent) {
        Integer guideid = tGuideGroupStudent.getGuideid();
        Integer studentid = tGuideGroupStudent.getStudentid();
        N_Utils.validation(new Object[]{guideid,"预习id",1,studentid,"学生id",1});
        guideGroupStudentService.updateRead(tGuideGroupStudent);
        return new ResultVo(0,"更新查看记录成功");
    }
}
