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;
    }
发布了125 篇原创文章 · 获赞 41 · 访问量 2733

猜你喜欢

转载自blog.csdn.net/qq_43618030/article/details/103822060