首页 > 编程语言 >基于Springboot的网上租房系统设计与实现(源码+lw+远程部署)

基于Springboot的网上租房系统设计与实现(源码+lw+远程部署)

时间:2024-09-03 12:53:14浏览次数:6  
标签:insert Springboot value lw yonghu 源码 config id name

文章目录

前言

❤️博主简介:全网累计客户1000+,培训机构讲师、全栈开发工程师、知乎/小红书优秀作者、腾讯云/阿里云VIP客户、专注Java、小程序、安卓领域和毕业项目开发❤️
⭐️文末获取源码+数据库⭐️
同学们可以先收藏起来,以免迷路,关于毕设选题,项目和论文的相关问题可以找我咨询,希望帮助到越来越多的同学。

项目介绍

本系统采用Springboot+Vue实现,包含租客、房主、管理员三个模块
⭐️租客功能概括为:预约看房、租房申请、个人信息管理等
⭐️房主功能概括为:房屋信息管理、签订租房合同等
⭐️管理员功能概括为:租客管理、房主管理、房屋管理、租房申请审核、房屋审核、公告管理、轮播图管理、留言管理等

实现页面截图

请添加图片描述
请添加图片描述

请添加图片描述
请添加图片描述
请添加图片描述

请添加图片描述

文章参考

在这里插入图片描述

我的优势

我的个人网站

❤️毕设最全个人站点 浏览器搜索:sensencoding.cn

请添加图片描述

网站上传的项目均是博主自己收集和开发的,质量都可以得到保障,适合有一些开发基础的同学使用

代码参考

@RestController
@RequestMapping("/yonghu")
public class YonghuController {
    @Autowired
    private YonghuService yonghuService;


    
	@Autowired
	private TokenService tokenService;
	
	/**
	 * 登录
	 */
	@IgnoreAuth
	@RequestMapping(value = "/login")
	public R login(String username, String password, String captcha, HttpServletRequest request) {
		YonghuEntity u = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("yonghuming", username));
		if(u==null || !u.getMima().equals(password)) {
			return R.error("账号或密码不正确");
		}
		
		String token = tokenService.generateToken(u.getId(), username,"yonghu",  "用户" );
		return R.ok().put("token", token);
	}

	
	/**
     * 注册
     */
	@IgnoreAuth
    @RequestMapping("/register")
    public R register(@RequestBody YonghuEntity yonghu){
    	//ValidatorUtils.validateEntity(yonghu);
    	YonghuEntity u = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("yonghuming", yonghu.getYonghuming()));
		if(u!=null) {
			return R.error("注册用户已存在");
		}
		Long uId = new Date().getTime();
		yonghu.setId(uId);
        yonghuService.insert(yonghu);
        return R.ok();
    }

数据库参考


/*Table structure for table `config` */

DROP TABLE IF EXISTS `config`;

CREATE TABLE `config` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `name` varchar(100) NOT NULL COMMENT '配置参数名称',
  `value` varchar(100) DEFAULT NULL COMMENT '配置参数值',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COMMENT='配置文件';

/*Data for the table `config` */

insert  into `config`(`id`,`name`,`value`) values (1,'picture1','http://localhost:8080/springboot94sk3/upload/picture1.jpg');
insert  into `config`(`id`,`name`,`value`) values (2,'picture2','http://localhost:8080/springboot94sk3/upload/picture2.jpg');
insert  into `config`(`id`,`name`,`value`) values (3,'picture3','http://localhost:8080/springboot94sk3/upload/picture3.jpg');
insert  into `config`(`id`,`name`,`value`) values (6,'homepage',NULL);


源码获取

文章下方名片联系我

标签:insert,Springboot,value,lw,yonghu,源码,config,id,name
From: https://blog.csdn.net/m0_73351812/article/details/141817703

相关文章