src/main/java/com/jubilantz/controller/EasStudentController.java

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

package com.jubilantz.controller;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.jubilantz.entity.EasClass;
import com.jubilantz.entity.EasRole;
import com.jubilantz.entity.EasStudent;
import com.jubilantz.entity.EasUser;
import com.jubilantz.services.EasClassService;
import com.jubilantz.services.EasStudentService;
import org.apache.commons.beanutils.PropertyUtilsBean;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Author JubilantZ
 * @Date: 2021/4/14 10:11
 */
@Controller
@RequestMapping("/easStudent")
public class EasStudentController {
    @Autowired
    private EasStudentService easStudentService;


    @RequestMapping("/index")
    public String index() throws Exception{
        return "system/student/index";
    }



    @RequestMapping("/list")
    @ResponseBody
    public Map<String, Object> list(@RequestParam(defaultValue = "1") Integer page,
                                    @RequestParam(defaultValue = "10") Integer limit,
                                    EasStudent easStudent) throws Exception{
        Map<String, Object> map = new HashMap<>();

//        System.out.println("我是:" + easStudent.getClass_id());

        Page<EasStudent> pager = PageHelper.startPage(page,limit);
//        List<EasStudent> list = easStudentService.getList(easStudent);
        List<EasStudent> list = easStudentService.findList(easStudent);
//        System.out.println("获取信息总条数为:" + list.size());
//        for (EasStudent e:list
//             ) {
//            System.out.println(e.getUser().getUsername());
//            System.out.println(e.getName());
//            System.out.println(e.getClass_id());
//        }
后面还有 9 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。