SubjectUserController.java
1.45 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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);
}
@RequestMapping("/subjectUserList")
public List<Map<String,Object>> subjectUserList(@RequestParam Map<String, Object> map){
return subjectUserService.subjectUserList(map);
}
@RequestMapping("/subjectUserDetail")
public List<Map<String,Object>> subjectUserDetail(@RequestParam Map<String, Object> map){
return subjectUserService.subjectUserDetail(map);
}
}