java拼接多个sql

   /**
     * 获得学生信息
     * 通过班级id获得学生信息接口
     * @TODO 权限
     *getStudents
     */
    @AutoLog(value = "获得学生信息")
    @ApiOperation(value="获得学生信息", notes="获得学生信息")
    @GetMapping(value = "/getStudentInfo")
//    @RequiresPermissions("stStudent:getStStudent")
    public Result<?> getStudentInfo(@RequestParam(required = true) String stuId,
                               HttpServletRequest req) {
        StStudent stStudent = stStudentService.getStudent(stuId);
        List<StatisticsVo> stStateJilu = stStateJiluService.getFrequency(stuId);
        List<StatisticsVo> stSanctions = stPunishService.getSanctions(stuId);
      Result result=new Result();
        Map<String,Object> nationCou=new HashMap<>();
       nationCou.put("stuInfo",stStudent);
       nationCou.put("cou",stStateJilu.get(0).getCou());
       nationCou.put("cou1",stSanctions.get(0).getCou());
        result.setResult(nationCou);
        return result;
    }

你可能感兴趣的:(项目碎片——java)