SubjectUserController.java
1.07 KB
package com.bsth.controller.subject;
import com.bsth.controller.BaseController;
import com.bsth.entity.subject.Subject;
import com.bsth.entity.subject.SubjectUser;
import com.bsth.service.subject.SubjectService;
import com.bsth.service.subject.SubjectUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
import java.util.Map;
@RestController
@RequestMapping("subjectUser")
public class SubjectUserController extends BaseController<SubjectUser, Integer> {
@Autowired
SubjectUserService subjectUserService;
//查看题目
@RequestMapping("/userAll")
public List<SubjectUser> userAll(){
return subjectUserService.userAll();
}
//判断用户答题是否正确
@RequestMapping("/determine")
public String determine(@RequestParam("id") Integer id){
return subjectUserService.determine(id);
}
}