当前位置: 首页 > news >正文

网站建设吉金手指专业13网站服务器崩溃怎么办

网站建设吉金手指专业13,网站服务器崩溃怎么办,企业网站建设培训,wordpress百度索引链接目录 前言 一、技术栈 二、系统功能介绍 屋主管理 房屋信息管理 房屋租赁公告 租用订单管理 房屋信息管理 保洁管理 房屋信息 租用订单管理 取消订单管理 三、核心代码 1、登录模块 2、文件上传模块 3、代码封装 前言 互联网发展至今#xff0c;无论是其理论还是…目录 前言 一、技术栈 二、系统功能介绍 屋主管理 房屋信息管理 房屋租赁公告 租用订单管理 房屋信息管理 保洁管理 房屋信息 租用订单管理 取消订单管理 三、核心代码 1、登录模块 2、文件上传模块 3、代码封装 前言 互联网发展至今无论是其理论还是技术都已经成熟而且它广泛参与在社会中的方方面面。它让信息都可以通过网络传播搭配信息管理工具可以很好地为人们提供服务。针对房屋租赁信息管理混乱出错率高信息安全性差劳动强度大费时费力等问题采用房屋租赁管理系统可以有效管理使信息管理能够更加科学和规范。 房屋租赁管理系统在Eclipse环境中使用Java语言进行编码使用Mysql创建数据表保存本系统产生的数据。系统可以提供信息显示和相应服务其管理员管理屋主和用户管理房屋租房订单保洁安保房屋租赁公告等信息。屋主管理房屋审核租用订单预约保洁和安保。用户收藏房屋租用房屋支付租房订单。 总之房屋租赁管理系统集中管理信息有着保密性强效率高存储空间大成本低等诸多优点。它可以降低信息管理成本实现信息管理计算机化。 一、技术栈 末尾获取源码 SpringBootVueJS jQueryAjax... 二、系统功能介绍 屋主管理 管理员进入指定功能操作区之后可以管理屋主。其页面见下图。屋主的资料需要管理员负责管理包括修改新增删除等操作。 房屋信息管理 管理员进入指定功能操作区之后可以管理房屋信息。其页面见下图。管理员查看房屋对应的用户评论可以增删改查房屋信息。 房屋租赁公告 管理员进入指定功能操作区之后可以管理房屋租赁公告信息。其页面见下图。管理员发布房屋租赁公告信息对本页面显示的房屋租赁公告进行修改查询删除。 租用订单管理 屋主进入指定功能操作区之后可以管理租用订单。其页面见下图。屋主查看租用订单是否支付审核用户租用房屋的订单。 房屋信息管理 屋主进入指定功能操作区之后可以管理房屋信息。其页面见下图。屋主可以对自己的房屋预约保洁或安保。可以查看房屋对应的用户评论可以修改房屋信息。 保洁管理 屋主进入指定功能操作区之后可以管理保洁信息。其页面见下图。屋主在当前页面可以取消保洁可以查看预约的保洁信息是否通过管理员审核。 房屋信息 用户进入指定功能操作区之后可以查看房屋信息。其页面见下图。用户在本页面可以收藏房屋评论房屋租用房屋。 租用订单管理 用户进入指定功能操作区之后可以管理租用订单。其页面见下图。用户在当前页面支付租用房屋的订单可以取消订单可以查看租用订单是否通过屋主的审核。 取消订单管理 用户进入指定功能操作区之后可以管理取消的订单。其页面见下图。用户查看已经取消的房屋租用订单可以删除已取消的房屋租用订单。 三、核心代码 1、登录模块 package com.controller;import java.util.Arrays; import java.util.Calendar; import java.util.Date; import java.util.Map;import javax.servlet.http.HttpServletRequest;import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.RestController;import com.annotation.IgnoreAuth; import com.baomidou.mybatisplus.mapper.EntityWrapper; import com.entity.TokenEntity; import com.entity.UserEntity; import com.service.TokenService; import com.service.UserService; import com.utils.CommonUtil; import com.utils.MD5Util; import com.utils.MPUtil; import com.utils.PageUtils; import com.utils.R; import com.utils.ValidatorUtils;/*** 登录相关*/ RequestMapping(users) RestController public class UserController{Autowiredprivate UserService userService;Autowiredprivate TokenService tokenService;/*** 登录*/IgnoreAuthPostMapping(value /login)public R login(String username, String password, String captcha, HttpServletRequest request) {UserEntity user userService.selectOne(new EntityWrapperUserEntity().eq(username, username));if(usernull || !user.getPassword().equals(password)) {return R.error(账号或密码不正确);}String token tokenService.generateToken(user.getId(),username, users, user.getRole());return R.ok().put(token, token);}/*** 注册*/IgnoreAuthPostMapping(value /register)public R register(RequestBody UserEntity user){ // ValidatorUtils.validateEntity(user);if(userService.selectOne(new EntityWrapperUserEntity().eq(username, user.getUsername())) !null) {return R.error(用户已存在);}userService.insert(user);return R.ok();}/*** 退出*/GetMapping(value logout)public R logout(HttpServletRequest request) {request.getSession().invalidate();return R.ok(退出成功);}/*** 密码重置*/IgnoreAuthRequestMapping(value /resetPass)public R resetPass(String username, HttpServletRequest request){UserEntity user userService.selectOne(new EntityWrapperUserEntity().eq(username, username));if(usernull) {return R.error(账号不存在);}user.setPassword(123456);userService.update(user,null);return R.ok(密码已重置为123456);}/*** 列表*/RequestMapping(/page)public R page(RequestParam MapString, Object params,UserEntity user){EntityWrapperUserEntity ew new EntityWrapperUserEntity();PageUtils page userService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.allLike(ew, user), params), params));return R.ok().put(data, page);}/*** 列表*/RequestMapping(/list)public R list( UserEntity user){EntityWrapperUserEntity ew new EntityWrapperUserEntity();ew.allEq(MPUtil.allEQMapPre( user, user)); return R.ok().put(data, userService.selectListView(ew));}/*** 信息*/RequestMapping(/info/{id})public R info(PathVariable(id) String id){UserEntity user userService.selectById(id);return R.ok().put(data, user);}/*** 获取用户的session用户信息*/RequestMapping(/session)public R getCurrUser(HttpServletRequest request){Long id (Long)request.getSession().getAttribute(userId);UserEntity user userService.selectById(id);return R.ok().put(data, user);}/*** 保存*/PostMapping(/save)public R save(RequestBody UserEntity user){ // ValidatorUtils.validateEntity(user);if(userService.selectOne(new EntityWrapperUserEntity().eq(username, user.getUsername())) !null) {return R.error(用户已存在);}userService.insert(user);return R.ok();}/*** 修改*/RequestMapping(/update)public R update(RequestBody UserEntity user){ // ValidatorUtils.validateEntity(user);userService.updateById(user);//全部更新return R.ok();}/*** 删除*/RequestMapping(/delete)public R delete(RequestBody Long[] ids){userService.deleteBatchIds(Arrays.asList(ids));return R.ok();} } 2、文件上传模块 package com.controller;import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.util.Arrays; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Random; import java.util.UUID;import org.apache.commons.io.FileUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.util.ResourceUtils; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile;import com.annotation.IgnoreAuth; import com.baomidou.mybatisplus.mapper.EntityWrapper; import com.entity.ConfigEntity; import com.entity.EIException; import com.service.ConfigService; import com.utils.R;/*** 上传文件映射表*/ RestController RequestMapping(file) SuppressWarnings({unchecked,rawtypes}) public class FileController{Autowiredprivate 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);FileUtils.copyFile(dest, new File(C:\\Users\\Desktop\\jiadian\\springbootl7own\\src\\main\\resources\\static\\upload/fileName));if(StringUtils.isNotBlank(type) type.equals(1)) {ConfigEntity configEntity configService.selectOne(new EntityWrapperConfigEntity().eq(name, faceFile));if(configEntitynull) {configEntity new ConfigEntity();configEntity.setName(faceFile);configEntity.setValue(fileName);} else {configEntity.setValue(fileName);}configService.insertOrUpdate(configEntity);}return R.ok().put(file, fileName);}/*** 下载文件*/IgnoreAuthRequestMapping(/download)public ResponseEntitybyte[] 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 ResponseEntitybyte[](FileUtils.readFileToByteArray(file),headers, HttpStatus.CREATED);}} catch (IOException e) {e.printStackTrace();}return new ResponseEntitybyte[](HttpStatus.INTERNAL_SERVER_ERROR);}} 3、代码封装 package com.utils;import java.util.HashMap; import java.util.Map;/*** 返回数据*/ public class R extends HashMapString, Object {private static final long serialVersionUID 1L;public R() {put(code, 0);}public static R error() {return error(500, 未知异常请联系管理员);}public static R error(String msg) {return error(500, msg);}public static R error(int code, String msg) {R r new R();r.put(code, code);r.put(msg, msg);return r;}public static R ok(String msg) {R r new R();r.put(msg, msg);return r;}public static R ok(MapString, Object map) {R r new R();r.putAll(map);return r;}public static R ok() {return new R();}public R put(String key, Object value) {super.put(key, value);return this;} }
http://www.sadfv.cn/news/71301/

相关文章:

  • 外贸网站推广平台排名前十名wordpress品牌分类
  • 做网站还赚钱吗英文网站推广方法
  • 盐城网站开发渠道合作重庆腊肠制作
  • 打造网站品牌wps网站超链接怎么做
  • 青岛开发区制作网站公司app制作培训
  • 做网站前怎么建立数据结构网站建设有哪些模块
  • 电子商务网站建设与管理是什么网站架构怎么看
  • 戴尔官方网站建设启示网站开发需要考什么证
  • 网站如何做关键词引流市场调研报告ppt模板
  • 阿里云服务器可以访问国外网站吗浏览器怎么打开网站服务器连接
  • 免费网站制作 优帮云网站后台这么做
  • python快速搭建网站集团公司门户网站建设
  • 注册网站做推广wordpress 阅后即
  • 付网站建设费用计入科目wordpress登录没链接
  • 杭州电商网站平台开发公司Wordpress点金
  • 网站所有权变更淘宝运营培训内容
  • 扁平化网站源码软件开发学校排名
  • 郑州软件开发公司seo工具是什么意思
  • 网站建设平台方案网站静态路径
  • 公司做网站推广的价格听书网页设计教程
  • 建筑公司做网站的好处成都asp网站建设
  • 网站 优点wordpress 调用多媒体
  • 企业网站建设有什么要求服装网站的建设策划
  • 山东住房和城乡建设厅网站教育中心用了mip的网站
  • 门户网站建立流程网络营销推广公司名称
  • 书店如何做网站网站开发的工作环境
  • 做网站通常用的软件十大最佳摄影网站
  • 主流媒体网站建设外国网站英语要求
  • 网站建设350元零基础建设网站视频教程
  • 重庆广告网站推广网站建设与运营成本