文末获取源码
开发语言:Java
框架:springboot
JDK版本:JDK1.8
服务器:tomcat7
数据库:mysql 5.7/8.0
数据库工具:Navicat11
开发软件:eclipse/myeclipse/idea
Maven包:Maven3.3.9
浏览器:谷歌浏览器
一、前言介绍
互联网发展至今,无论是其理论还是技术都已经成熟,而且它广泛参与在社会中的方方面面。它让信息都可以通过网络传播,搭配信息管理工具可以很好地为人们提供服务。针对大学生租房信息管理混乱,出错率高,信息安全性差,劳动强度大,费时费力等问题,采用大学生租房平台可以有效管理,使信息管理能够更加科学和规范。
大学生租房平台在 Eclipse环境中,使用Java语言进行编码,使用Mysql创建数据表保存本系统产生的数据。系统可以提供信息显示和相应服务,其管理员房东和用户,对房东提交的信息审批信息进行审核,审核房东发布的房源信息。房东提交信息审批信息,发布房源信息,审核用户租房订单。用户收藏房屋,租用房屋,支付租房订单。
总之,大学生租房平台集中管理信息,有着保密性强,效率高,存储空间大,成本低等诸多优点。它可以降低信息管理成本,实现信息管理计算机化。
二、功能需求
不同的系统提供的服务也不相同,其对应的功能也不相同,所以,系统开工前,需要明确其用途,确定其功能。由此,才可以进行各个任务的开展。
大学生租房平台经过分析,确定了其需要设置管理员的角色,其操作的功能通过用例图展示(见下图)。管理员管理房东和用户,对房东提交的信息审批信息进行审核,审核房东发布的房源信息。

大学生租房平台经过分析,确定了其需要设置房东的角色,其操作的功能通过用例图展示(见下图)。房东提交信息审批信息,发布房源信息,审核用户租房订单。

三、用户功能实现
3.1房源信息
用户进入前台之后可以查看房源信息。其页面见下图。本页面显示所有要出租的房源信息,用户可以根据房源名称,户型,出租类型等字段查询所需房源信息。

3.2房源详细信息
用户进入前台之后可以查看房源详细信息。其页面见下图。用户点击房源的标题即可查看其相关介绍。用户可以收藏房源,或在当前页面点击租房按钮进行租房。

3.3提交租房信息
用户进入前台之后可以对需要的房源提交租房信息。其页面见下图。用户对需要的房源进行租房,提交租房信息时要设置申请日期。
 
3.4订单信息管理
用户进入后台功能操作区之后可以查看订单信息。其页面见下图。用户支付未支付的租房订单,查看租房订单是否通过房东审核。

四、管理员功能实现
4.1房东管理
管理员进入指定功能操作区之后可以管理房东。其页面见下图。房东的资料需要管理员负责管理,包括修改,新增,删除等操作。

4.2信息审批管理
管理员进入指定功能操作区之后可以管理信息审批信息。其页面见下图。房东上传房产证和身份证信息,管理员查看后进行审批,审批通过之后,房东才可以发布房源信息。

4.3房源信息管理
管理员进入指定功能操作区之后可以管理房源信息。其页面见下图。房东发布的房源信息需要先通过管理员的审核,然后才能展示在前台进行出租。

五、房东功能实现
5.1信息审批管理
房东进入指定功能操作区之后可以管理信息审批信息。其页面见下图。房东查看信息审批信息是否通过审核,只有通过审核之后,房东才可以发布房源信息。

5.2订单信息管理
房东进入指定功能操作区之后可以管理订单信息。其页面见下图。用户租房后,房东需要查看用户是否支付,而且还要审核用户的租房订单。

六、部分核心代码
  
   - 
    
     
    
    
     
      /**
     
    
- 
    
     
    
    
     
       * 上传文件映射表
     
    
- 
    
     
    
    
     
       */
     
    
- 
    
     
    
    
     
      @RestController
     
    
- 
    
     
    
    
     
      @RequestMapping("file")
     
    
- 
    
     
    
    
     
      @SuppressWarnings({"unchecked","rawtypes"})
     
    
- 
    
     
    
    
     
      public 
      class 
      FileController{
     
    
- 
    
     
    
    
     	
      @Autowired
     
    
- 
    
     
    
    
         
      private ConfigService configService;
     
    
- 
    
     
    
    
     	
      /**
     
    
- 
    
     
    
    
     
       * 上传文件
     
    
- 
    
     
    
    
     
       */
     
    
- 
    
     
    
    
     	
      @RequestMapping("/upload")
     
    
- 
    
     
    
    
     	
      public R 
      upload
      (@RequestParam("file") MultipartFile file,String type) 
      throws Exception {
     
    
- 
    
     
    
    
     		
      if (file.isEmpty()) {
     
    
- 
    
     
    
    
     			
      throw 
      new 
      EIException(
      "上传文件不能为空");
     
    
- 
    
     
    
    
     
      		}
     
    
- 
    
     
    
    
     		
      String 
      fileExt 
      = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(
      ".")+
      1);
     
    
- 
    
     
    
    
     		
      File 
      path 
      = 
      new 
      File(ResourceUtils.getURL(
      "classpath:static").getPath());
     
    
- 
    
     
    
    
     		
      if(!path.exists()) {
     
    
- 
    
     
    
    
     
      		    path = 
      new 
      File(
      "");
     
    
- 
    
     
    
    
     
      		}
     
    
- 
    
     
    
    
     		
      File 
      upload 
      = 
      new 
      File(path.getAbsolutePath(),
      "/upload/");
     
    
- 
    
     
    
    
     		
      if(!upload.exists()) {
     
    
- 
    
     
    
    
     
      		    upload.mkdirs();
     
    
- 
    
     
    
    
     
      		}
     
    
- 
    
     
    
    
     		
      String 
      fileName 
      = 
      new 
      Date().getTime()+
      "."+fileExt;
     
    
- 
    
     
    
    
     		
      File 
      dest 
      = 
      new 
      File(upload.getAbsolutePath()+
      "/"+fileName);
     
    
- 
    
     
    
    
     
      		file.transferTo(dest);
     
    
- 
    
     
    
    
     		
      /**
     
    
- 
    
     
    
    
     
       * 如果使用idea或者eclipse重启项目,发现之前上传的图片或者文件丢失,将下面一行代码注释打开
     
    
- 
    
     
    
    
     
       * 请将以下的"D:\\springbootq33sd\\src\\main\\resources\\static\\upload"替换成你本地项目的upload路径,
     
    
- 
    
     
    
    
     
       * 并且项目路径不能存在中文、空格等特殊字符
     
    
- 
    
     
    
    
     
       */
     
    
- 
    
     
    
    
     
      // FileUtils.copyFile(dest, new File("D:\\springbootq33sd\\src\\main\\resources\\static\\upload"+"/"+fileName)); /**修改了路径以后请将该行最前面的//注释去掉**/
     
    
- 
    
     
    
    
     		
      if(StringUtils.isNotBlank(type) && type.equals(
      "1")) {
     
    
- 
    
     
    
    
     			
      ConfigEntity 
      configEntity 
      = configService.selectOne(
      new 
      EntityWrapper<ConfigEntity>().eq(
      "name", 
      "faceFile"));
     
    
- 
    
     
    
    
     			
      if(configEntity==
      null) {
     
    
- 
    
     
    
    
     
      				configEntity = 
      new 
      ConfigEntity();
     
    
- 
    
     
    
    
     
      				configEntity.setName(
      "faceFile");
     
    
- 
    
     
    
    
     
      				configEntity.setValue(fileName);
     
    
- 
    
     
    
    
     
      			} 
      else {
     
    
- 
    
     
    
    
     
      				configEntity.setValue(fileName);
     
    
- 
    
     
    
    
     
      			}
     
    
- 
    
     
    
    
     
      			configService.insertOrUpdate(configEntity);
     
    
- 
    
     
    
    
     
      		}
     
    
- 
    
     
    
    
     		
      return R.ok().put(
      "file", fileName);
     
    
- 
    
     
    
    
     
      	}
     
    
- 
    
     
    
    
     	
     
    
- 
    
     
    
    
     	
      /**
     
    
- 
    
     
    
    
     
       * 下载文件
     
    
- 
    
     
    
    
     
       */
     
    
- 
    
     
    
    
     	
      @IgnoreAuth
     
    
- 
    
     
    
    
     	
      @RequestMapping("/download")
     
    
- 
    
     
    
    
     	
      public ResponseEntity<
      byte[]> download(
      @RequestParam String fileName) {
     
    
- 
    
     
    
    
     		
      try {
     
    
- 
    
     
    
    
     			
      File 
      path 
      = 
      new 
      File(ResourceUtils.getURL(
      "classpath:static").getPath());
     
    
- 
    
     
    
    
     			
      if(!path.exists()) {
     
    
- 
    
     
    
    
     
      			    path = 
      new 
      File(
      "");
     
    
- 
    
     
    
    
     
      			}
     
    
- 
    
     
    
    
     			
      File 
      upload 
      = 
      new 
      File(path.getAbsolutePath(),
      "/upload/");
     
    
- 
    
     
    
    
     			
      if(!upload.exists()) {
     
    
- 
    
     
    
    
     
      			    upload.mkdirs();
     
    
- 
    
     
    
    
     
      			}
     
    
- 
    
     
    
    
     			
      File 
      file 
      = 
      new 
      File(upload.getAbsolutePath()+
      "/"+fileName);
     
    
- 
    
     
    
    
     			
      if(file.exists()){
     
    
- 
    
     
    
    
     				
      /*if(!fileService.canRead(file, SessionManager.getSessionUser())){
     
    
- 
    
     
    
    
     
       getResponse().sendError(403);
     
    
- 
    
     
    
    
     
       }*/
     
    
- 
    
     
    
    
     				
      HttpHeaders 
      headers 
      = 
      new 
      HttpHeaders();
     
    
- 
    
     
    
    
     
      			    headers.setContentType(MediaType.APPLICATION_OCTET_STREAM);    
     
    
- 
    
     
    
    
     
      			    headers.setContentDispositionFormData(
      "attachment", fileName);    
     
    
- 
    
     
    
    
     			    
      return 
      new 
      ResponseEntity<
      byte[]>(FileUtils.readFileToByteArray(file),headers, HttpStatus.CREATED);
     
    
- 
    
     
    
    
     
      			}
     
    
- 
    
     
    
    
     
      		} 
      catch (IOException e) {
     
    
- 
    
     
    
    
     
      			e.printStackTrace();
     
    
- 
    
     
    
    
     
      		}
     
    
- 
    
     
    
    
     		
      return 
      new 
      ResponseEntity<
      byte[]>(HttpStatus.INTERNAL_SERVER_ERROR);
     
    
- 
    
     
    
    
     
      	}
     
    
- 
    
     
    
    
     	
     
    
- 
    
     
    
    
     
      }
     
    
 
  
   - 
    
     
    
    
     
      RestController
     
    
- 
    
     
    
    
     
      @RequestMapping(
      "/kechengchengji")
     
    
- 
    
     
    
    
     
      public 
      class 
      KechengchengjiController {
     
    
- 
    
     
    
    
         
      @Autowired
     
    
- 
    
     
    
    
         
      private 
      KechengchengjiService kechengchengjiService;
     
    
- 
    
     
    
    
      
     
    
- 
    
     
    
    
      
     
    
- 
    
     
    
    
         
     
    
- 
    
     
    
    
      
     
    
- 
    
     
    
    
      
     
    
- 
    
     
    
    
         
      /**
     
    
- 
    
     
    
    
     
       * 后端列表
     
    
- 
    
     
    
    
     
       */
     
    
- 
    
     
    
    
         
      @RequestMapping(
      "/page")
     
    
- 
    
     
    
    
         
      public R 
      page(
      @RequestParam Map<String, Object> params,KechengchengjiEntity kechengchengji,
     
    
- 
    
     
    
    
     
       HttpServletRequest request){
     
    
- 
    
     
    
    
     		
      String tableName = request.
      getSession().
      getAttribute(
      "tableName").
      toString();
     
    
- 
    
     
    
    
     		
      if(tableName.
      equals(
      "jiaoshi")) {
     
    
- 
    
     
    
    
     
      			kechengchengji.
      setJiaoshizhanghao((
      String)request.
      getSession().
      getAttribute(
      "username"));
     
    
- 
    
     
    
    
     
      		}
     
    
- 
    
     
    
    
     		
      if(tableName.
      equals(
      "xuesheng")) {
     
    
- 
    
     
    
    
     
      			kechengchengji.
      setXuehao((
      String)request.
      getSession().
      getAttribute(
      "username"));
     
    
- 
    
     
    
    
     
      		}
     
    
- 
    
     
    
    
             
      EntityWrapper<
      KechengchengjiEntity> ew = 
      new 
      EntityWrapper<
      KechengchengjiEntity>();
     
    
- 
    
     
    
    
     		
      PageUtils page = kechengchengjiService.
      queryPage(params, 
      MPUtil.
      sort(
      MPUtil.
      between(
      MPUtil.
      likeOrEq(ew, kechengchengji), params), params));
     
    
- 
    
     
    
    
      
     
    
- 
    
     
    
    
             
      return R.
      ok().
      put(
      "data", page);
     
    
- 
    
     
    
    
     
          }
     
    
- 
    
     
    
    
         
     
    
- 
    
     
    
    
         
      /**
     
    
- 
    
     
    
    
     
       * 前端列表
     
    
- 
    
     
    
    
     
       */
     
    
- 
    
     
    
    
     	
      @IgnoreAuth
     
    
- 
    
     
    
    
         
      @RequestMapping(
      "/list")
     
    
- 
    
     
    
    
         
      public R 
      list(
      @RequestParam Map<String, Object> params,KechengchengjiEntity kechengchengji, 
     
    
- 
    
     
    
    
     
       HttpServletRequest request){
     
    
- 
    
     
    
    
             
      EntityWrapper<
      KechengchengjiEntity> ew = 
      new 
      EntityWrapper<
      KechengchengjiEntity>();
     
    
- 
    
     
    
    
     		
      PageUtils page = kechengchengjiService.
      queryPage(params, 
      MPUtil.
      sort(
      MPUtil.
      between(
      MPUtil.
      likeOrEq(ew, kechengchengji), params), params));
     
    
- 
    
     
    
    
             
      return R.
      ok().
      put(
      "data", page);
     
    
- 
    
     
    
    
     
          }
     
    
- 
    
     
    
    
      
     
    
- 
    
     
    
    
     	
      /**
     
    
- 
    
     
    
    
     
       * 列表
     
    
- 
    
     
    
    
     
       */
     
    
- 
    
     
    
    
         
      @RequestMapping(
      "/lists")
     
    
- 
    
     
    
    
         
      public R 
      list(
       KechengchengjiEntity kechengchengji){
     
    
- 
    
     
    
    
            	
      EntityWrapper<
      KechengchengjiEntity> ew = 
      new 
      EntityWrapper<
      KechengchengjiEntity>();
     
    
- 
    
     
    
    
     
            	ew.
      allEq(
      MPUtil.
      allEQMapPre( kechengchengji, 
      "kechengchengji")); 
     
    
- 
    
     
    
    
             
      return R.
      ok().
      put(
      "data", kechengchengjiService.
      selectListView(ew));
     
    
- 
    
     
    
    
     
          }
     
    
- 
    
     
    
    
      
     
    
- 
    
     
    
    
     	 
      /**
     
    
- 
    
     
    
    
     
       * 查询
     
    
- 
    
     
    
    
     
       */
     
    
- 
    
     
    
    
         
      @RequestMapping(
      "/query")
     
    
- 
    
     
    
    
         
      public R 
      query(
      KechengchengjiEntity kechengchengji){
     
    
- 
    
     
    
    
             
      EntityWrapper< 
      KechengchengjiEntity> ew = 
      new 
      EntityWrapper< 
      KechengchengjiEntity>();
     
    
- 
    
     
    
    
     
       		ew.
      allEq(
      MPUtil.
      allEQMapPre( kechengchengji, 
      "kechengchengji")); 
     
    
- 
    
     
    
    
     		
      KechengchengjiView kechengchengjiView =  kechengchengjiService.
      selectView(ew);
     
    
- 
    
     
    
    
     		
      return R.
      ok(
      "查询课程成绩成功").
      put(
      "data", kechengchengjiView);
     
    
- 
    
     
    
    
     
          }
     
    
- 
    
     
    
    
     	
     
    
- 
    
     
    
    
         
      /**
     
    
- 
    
     
    
    
     
       * 后端详情
     
    
- 
    
     
    
    
     
       */
     
    
- 
    
     
    
    
         
      @RequestMapping(
      "/info/{id}")
     
    
- 
    
     
    
    
         
      public R 
      info(
      @PathVariable("id") Long id){
     
    
- 
    
     
    
    
             
      KechengchengjiEntity kechengchengji = kechengchengjiService.
      selectById(id);
     
    
- 
    
     
    
    
             
      return R.
      ok().
      put(
      "data", kechengchengji);
     
    
- 
    
     
    
    
     
          }
     
    
- 
    
     
    
    
      
     
    
- 
    
     
    
    
         
      /**
     
    
- 
    
     
    
    
     
       * 前端详情
     
    
- 
    
     
    
    
     
       */
     
    
- 
    
     
    
    
     	
      @IgnoreAuth
     
    
- 
    
     
    
    
         
      @RequestMapping(
      "/detail/{id}")
     
    
- 
    
     
    
    
         
      public R 
      detail(
      @PathVariable("id") Long id){
     
    
- 
    
     
    
    
             
      KechengchengjiEntity kechengchengji = kechengchengjiService.
      selectById(id);
     
    
- 
    
     
    
    
             
      return R.
      ok().
      put(
      "data", kechengchengji);
     
    
- 
    
     
    
    
     
          }
     
    
- 
    
     
    
    
         
     
    
- 
    
     
    
    
      
     
    
- 
    
     
    
    
      
     
    
- 
    
     
    
    
      
     
    
- 
    
     
    
    
         
      /**
     
    
- 
    
     
    
    
     
       * 后端保存
     
    
- 
    
     
    
    
     
       */
     
    
- 
    
     
    
    
         
      @RequestMapping(
      "/save")
     
    
- 
    
     
    
    
         
      public R 
      save(
      @RequestBody KechengchengjiEntity kechengchengji, HttpServletRequest request){
     
    
- 
    
     
    
    
     
          	kechengchengji.
      setId(
      new 
      Date().
      getTime()+
      new 
      Double(
      Math.
      floor(
      Math.
      random()*
      1000)).
      longValue());
     
    
- 
    
     
    
    
         	
      //ValidatorUtils.validateEntity(kechengchengji);
     
    
- 
    
     
    
    
     
              kechengchengjiService.
      insert(kechengchengji);
     
    
- 
    
     
    
    
             
      return R.
      ok();
     
    
- 
    
     
    
    
     
          }
     
    
- 
    
     
    
    
         
     
    
- 
    
     
    
    
         
      /**
     
    
- 
    
     
    
    
     
       * 前端保存
     
    
- 
    
     
    
    
     
       */
     
    
- 
    
     
    
    
         
      @RequestMapping(
      "/add")
     
    
- 
    
     
    
    
         
      public R 
      add(
      @RequestBody KechengchengjiEntity kechengchengji, HttpServletRequest request){
     
    
- 
    
     
    
    
     
          	kechengchengji.
      setId(
      new 
      Date().
      getTime()+
      new 
      Double(
      Math.
      floor(
      Math.
      random()*
      1000)).
      longValue());
     
    
- 
    
     
    
    
         	
      //ValidatorUtils.validateEntity(kechengchengji);
     
    
- 
    
     
    
    
     
              kechengchengjiService.
      insert(kechengchengji);
     
    
- 
    
     
    
    
             
      return R.
      ok();
     
    
- 
    
     
    
    
     
          }
     
    
- 
    
     
    
    
      
     
    
- 
    
     
    
    
         
      /**
     
    
- 
    
     
    
    
     
       * 修改
     
    
- 
    
     
    
    
     
       */
     
    
- 
    
     
    
    
         
      @RequestMapping(
      "/update")
     
    
- 
    
     
    
    
         
      public R 
      update(
      @RequestBody KechengchengjiEntity kechengchengji, HttpServletRequest request){
     
    
- 
    
     
    
    
             
      //ValidatorUtils.validateEntity(kechengchengji);
     
    
- 
    
     
    
    
     
              kechengchengjiService.
      updateById(kechengchengji);
      //全部更新
     
    
- 
    
     
    
    
             
      return R.
      ok();
     
    
- 
    
     
    
    
     
          }
     
    
- 
    
     
    
    
         
     
    
- 
    
     
    
    
      
     
    
- 
    
     
    
    
         
      /**
     
    
- 
    
     
    
    
     
       * 删除
     
    
- 
    
     
    
    
     
       */
     
    
- 
    
     
    
    
         
      @RequestMapping(
      "/delete")
     
    
- 
    
     
    
    
         
      public R 
      delete(
      @RequestBody Long[] ids){
     
    
- 
    
     
    
    
     
              kechengchengjiService.
      deleteBatchIds(
      Arrays.
      asList(ids));
     
    
- 
    
     
    
    
             
      return R.
      ok();
     
    
- 
    
     
    
    
     
          }
     
    
- 
    
     
    
    
         
     
    
- 
    
     
    
    
         
      /**
     
    
- 
    
     
    
    
     
       * 提醒接口
     
    
- 
    
     
    
    
     
       */
     
    
- 
    
     
    
    
     	
      @RequestMapping(
      "/remind/{columnName}/{type}")
     
    
- 
    
     
    
    
     	
      public R 
      remindCount(
      @PathVariable("columnName") String columnName, HttpServletRequest request, 
     
    
- 
    
     
    
    
     						 
      @PathVariable(
      "type") 
      String 
      type,
      @RequestParam 
      Map<
      String, 
      Object> map) {
     
    
- 
    
     
    
    
     
      		map.
      put(
      "column", columnName);
     
    
- 
    
     
    
    
     
      		map.
      put(
      "type", 
      type);
     
    
- 
    
     
    
    
     		
     
    
- 
    
     
    
    
     		
      if(
      type.
      equals(
      "2")) {
     
    
- 
    
     
    
    
     			
      SimpleDateFormat sdf = 
      new 
      SimpleDateFormat(
      "yyyy-MM-dd");
     
    
- 
    
     
    
    
     			
      Calendar c = 
      Calendar.
      getInstance();
     
    
- 
    
     
    
    
     			
      Date remindStartDate = 
      null;
     
    
- 
    
     
    
    
     			
      Date remindEndDate = 
      null;
     
    
- 
    
     
    
    
     			
      if(map.
      get(
      "remindstart")!=
      null) {
     
    
- 
    
     
    
    
     				
      Integer remindStart = 
      Integer.
      parseInt(map.
      get(
      "remindstart").
      toString());
     
    
- 
    
     
    
    
     
      				c.
      setTime(
      new 
      Date()); 
     
    
- 
    
     
    
    
     
      				c.
      add(
      Calendar.
      DAY_OF_MONTH,remindStart);
     
    
- 
    
     
    
    
     
      				remindStartDate = c.
      getTime();
     
    
- 
    
     
    
    
     
      				map.
      put(
      "remindstart", sdf.
      format(remindStartDate));
     
    
- 
    
     
    
    
     
      			}
     
    
- 
    
     
    
    
     			
      if(map.
      get(
      "remindend")!=
      null) {
     
    
- 
    
     
    
    
     				
      Integer remindEnd = 
      Integer.
      parseInt(map.
      get(
      "remindend").
      toString());
     
    
- 
    
     
    
    
     
      				c.
      setTime(
      new 
      Date());
     
    
- 
    
     
    
    
     
      				c.
      add(
      Calendar.
      DAY_OF_MONTH,remindEnd);
     
    
- 
    
     
    
    
     
      				remindEndDate = c.
      getTime();
     
    
- 
    
     
    
    
     
      				map.
      put(
      "remindend", sdf.
      format(remindEndDate));
     
    
- 
    
     
    
    
     
      			}
     
    
- 
    
     
    
    
     
      		}
     
    
- 
    
     
    
    
     		
     
    
- 
    
     
    
    
     		
      Wrapper<
      KechengchengjiEntity> wrapper = 
      new 
      EntityWrapper<
      KechengchengjiEntity>();
     
    
- 
    
     
    
    
     		
      if(map.
      get(
      "remindstart")!=
      null) {
     
    
- 
    
     
    
    
     
      			wrapper.
      ge(columnName, map.
      get(
      "remindstart"));
     
    
- 
    
     
    
    
     
      		}
     
    
- 
    
     
    
    
     		
      if(map.
      get(
      "remindend")!=
      null) {
     
    
- 
    
     
    
    
     
      			wrapper.
      le(columnName, map.
      get(
      "remindend"));
     
    
- 
    
     
    
    
     
      		}
     
    
- 
    
     
    
    
      
     
    
- 
    
     
    
    
     		
      String tableName = request.
      getSession().
      getAttribute(
      "tableName").
      toString();
     
    
- 
    
     
    
    
     		
      if(tableName.
      equals(
      "jiaoshi")) {
     
    
- 
    
     
    
    
     
      			wrapper.
      eq(
      "jiaoshizhanghao", (
      String)request.
      getSession().
      getAttribute(
      "username"));
     
    
- 
    
     
    
    
     
      		}
     
    
- 
    
     
    
    
     		
      if(tableName.
      equals(
      "xuesheng")) {
     
    
- 
    
     
    
    
     
      			wrapper.
      eq(
      "xuehao", (
      String)request.
      getSession().
      getAttribute(
      "username"));
     
    
- 
    
     
    
    
     
      		}
     
    
- 
    
     
    
    
      
     
    
- 
    
     
    
    
     
      		int count = kechengchengjiService.
      selectCount(wrapper);
     
    
- 
    
     
    
    
     		
      return R.
      ok().
      put(
      "count", count);
     
    
- 
    
     
    
    
     
      	}
     
    
- 
    
     
    
    
     	
     
    
- 
    
     
    
    
      
     
    
- 
    
     
    
    
      
     
    
- 
    
     
    
    
      
     
    
- 
    
     
    
    
      
     
    
- 
    
     
    
    
      
     
    
- 
    
     
    
    
      
     
    
- 
    
     
    
    
      
     
    
- 
    
     
    
    
     
      }
     
    
 转载:https://blog.csdn.net/m0_49113107/article/details/128741227
 
					