SubjectUserController.java 1.45 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);
    }

    @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);
    }
    
    
}