📝目录

👑项目简介

📷效果展示

📚技术栈

⌨️部分代码参考

📑MySQL表设计参考

📜项目论文

🙈为什么选择我

📩源码获取


👑项目简介

👑👑 本项目是一个基于Spring Boot和微信小程序开发的智慧物业管理系统✅✅,旨在提升物业管理的效率和居民的生活质量。系统通过Spring Boot后端架构,集成了物业报修、缴费管理、公告通知、设施预定等功能,确保物业管理工作高效、有序。微信小程序前端设计简洁、易操作,居民可以随时随地报修、查询账单、接收物业通知等。系统还支持实时数据分析与物业管理统计,为物业公司提供决策支持。通过智能化管理和便捷的服务接口,智慧物业系统优化了传统物业管理模式,提升了居民的满意度与物业管理的响应速度,为智慧城市建设贡献力量。

(具体功能以代码为准)。

📸效果展示

📚技术栈

Java

Java 是一种面向对象的编程语言,具有“编写一次,到处运行”的特性。它通过 Java 虚拟机(JVM)在不同平台上运行,提供了强大的跨平台能力。Java 的丰富类库和强大的社区支持使其在企业级应用、移动应用(如 Android)和大数据处理等领域得到广泛应用。Java 以其稳定性和安全性而闻名,是许多大型系统和应用的首选语言。

Spring Boot

Spring Boot是一个基于Spring框架的开源Java框架,旨在简化Spring应用程序的开发过程。它通过约定优于配置的方式,使开发者能够快速启动新项目,而无需过多的配置。Spring Boot集成了多种常用功能,如安全性、数据访问和微服务架构,极大地提高了开发效率,使得构建和部署Java应用变得更加简便和灵活。

微信小程序

微信小程序是一种轻量级的应用程序,可以在微信平台内无缝使用,无需下载和安装。它们提供丰富的功能,包括购物、支付、社交、资讯等,用户只需通过微信扫描二维码或在聊天中点击链接即可快速访问。小程序的开发基于微信提供的框架,支持前端页面和后端逻辑的灵活组合,开发者可以轻松创建符合用户需求的应用。由于其便捷性和广泛的用户基础,小程序在商业和社交场景中得到广泛应用,极大地提升了用户体验,成为现代移动互联网的重要组成部分。

MySQL

MySQL是一种流行的开源关系数据库管理系统,以其高性能、可靠性和易用性而受到广泛欢迎。它采用结构化查询语言(SQL)进行数据管理,支持多种数据类型和复杂查询。MySQL广泛应用于Web应用、企业数据库和大数据存储等场景,因其良好的事务处理能力和数据完整性,成为许多开发者和企业的首选数据库解决方案。

⌨️部分代码参考

package com.controller;
 
/**
 * 用户
 * 后端接口
 */
@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();
    }
 
	
	/**
	 * 退出
	 */
	@RequestMapping("/logout")
	public R logout(HttpServletRequest request) {
		request.getSession().invalidate();
		return R.ok("退出成功");
	}
	
	/**
     * 获取用户的session用户信息
     */
    @RequestMapping("/session")
    public R getCurrUser(HttpServletRequest request){
    	Long id = (Long)request.getSession().getAttribute("userId");
        YonghuEntity u = yonghuService.selectById(id);
        return R.ok().put("data", u);
    }
    
    /**
     * 密码重置
     */
    @IgnoreAuth
	@RequestMapping(value = "/resetPass")
    public R resetPass(String username, HttpServletRequest request){
    	YonghuEntity u = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("yonghuming", username));
    	if(u==null) {
    		return R.error("账号不存在");
    	}
        u.setMima("123456");
        yonghuService.updateById(u);
        return R.ok("密码已重置为:123456");
    }
 
 
 
    /**
     * 后台列表
     */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params,YonghuEntity yonghu,
		HttpServletRequest request){
        EntityWrapper<YonghuEntity> ew = new EntityWrapper<YonghuEntity>();
 
		PageUtils page = yonghuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, yonghu), params), params));
 
        return R.ok().put("data", page);
    }
    
    /**
     * 前台列表
     */
	@IgnoreAuth
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params,YonghuEntity yonghu, 
		HttpServletRequest request){
        EntityWrapper<YonghuEntity> ew = new EntityWrapper<YonghuEntity>();
 
		PageUtils page = yonghuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, yonghu), params), params));
        return R.ok().put("data", page);
    }
 
 
 
	/**
     * 列表
     */
    @RequestMapping("/lists")
    public R list( YonghuEntity yonghu){
       	EntityWrapper<YonghuEntity> ew = new EntityWrapper<YonghuEntity>();
      	ew.allEq(MPUtil.allEQMapPre( yonghu, "yonghu")); 
        return R.ok().put("data", yonghuService.selectListView(ew));
    }
 
	 /**
     * 查询
     */
    @RequestMapping("/query")
    public R query(YonghuEntity yonghu){
        EntityWrapper< YonghuEntity> ew = new EntityWrapper< YonghuEntity>();
 		ew.allEq(MPUtil.allEQMapPre( yonghu, "yonghu")); 
		YonghuView yonghuView =  yonghuService.selectView(ew);
		return R.ok("查询用户成功").put("data", yonghuView);
    }
	
    /**
     * 后台详情
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        YonghuEntity yonghu = yonghuService.selectById(id);
        return R.ok().put("data", yonghu);
    }
 
    /**
     * 前台详情
     */
	@IgnoreAuth
    @RequestMapping("/detail/{id}")
    public R detail(@PathVariable("id") Long id){
        YonghuEntity yonghu = yonghuService.selectById(id);
        return R.ok().put("data", yonghu);
    }
    
 
 
 
    /**
     * 后台保存
     */
    @RequestMapping("/save")
    @SysLog("新增用户") 
    public R save(@RequestBody YonghuEntity yonghu, HttpServletRequest request){
        if(yonghuService.selectCount(new EntityWrapper<YonghuEntity>().eq("yonghuming", yonghu.getYonghuming()))>0) {
            return R.error("用户名已存在");
        }
    	yonghu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(yonghu);
    	YonghuEntity u = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("yonghuming", yonghu.getYonghuming()));
		if(u!=null) {
			return R.error("用户已存在");
		}
		yonghu.setId(new Date().getTime());
        yonghuService.insert(yonghu);
        return R.ok();
    }
    
    /**
     * 前台保存
     */
    @SysLog("新增用户")
    @RequestMapping("/add")
    public R add(@RequestBody YonghuEntity yonghu, HttpServletRequest request){
        if(yonghuService.selectCount(new EntityWrapper<YonghuEntity>().eq("yonghuming", yonghu.getYonghuming()))>0) {
            return R.error("用户名已存在");
        }
    	yonghu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(yonghu);
    	YonghuEntity u = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("yonghuming", yonghu.getYonghuming()));
		if(u!=null) {
			return R.error("用户已存在");
		}
		yonghu.setId(new Date().getTime());
        yonghuService.insert(yonghu);
        return R.ok();
    }
 
 
 
    /**
     * 修改
     */
    @RequestMapping("/update")
    @Transactional
    @SysLog("修改用户")
    public R update(@RequestBody YonghuEntity yonghu, HttpServletRequest request){
        //ValidatorUtils.validateEntity(yonghu);
        if(yonghuService.selectCount(new EntityWrapper<YonghuEntity>().ne("id", yonghu.getId()).eq("yonghuming", yonghu.getYonghuming()))>0) {
            return R.error("用户名已存在");
        }
        yonghuService.updateById(yonghu);//全部更新
        return R.ok();
    }
 
 
 
    /**
     * 删除
     */
    @RequestMapping("/delete")
    @SysLog("删除用户")
    public R delete(@RequestBody Long[] ids){
        yonghuService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }
    
}
 
 
package com.aspect;
 
/**
 * 系统日志,切面处理类
 */
@Aspect
@Component
public class SysLogAspect {
    @Autowired
    private SyslogService syslogService;
    
    @Pointcut("@annotation(com.annotation.SysLog)")
    public void logPointCut() { 
    }
 
    @Around("logPointCut()")
    public Object around(ProceedingJoinPoint point) throws Throwable {
        long beginTime = System.currentTimeMillis();
        //执行方法
        Object result = point.proceed();
        //执行时长(毫秒)
        long time = System.currentTimeMillis() - beginTime;
 
        //保存日志
        saveSysLog(point, time);
 
        return result;
    }
 
    private void saveSysLog(ProceedingJoinPoint joinPoint, long time) {
        MethodSignature signature = (MethodSignature) joinPoint.getSignature();
        Method method = signature.getMethod();
 
        SyslogEntity sysLog = new SyslogEntity();
        SysLog syslog = method.getAnnotation(SysLog.class);
        if(syslog != null){
            //注解上的描述
            sysLog.setOperation(syslog.value());
        }
 
        //请求的方法名
        String className = joinPoint.getTarget().getClass().getName();
        String methodName = signature.getName();
        sysLog.setMethod(className + "." + methodName + "()");
 
        //请求的参数
        Object[] args = joinPoint.getArgs();
        try{
            String params = new Gson().toJson(args[0]);
            sysLog.setParams(params);
        }catch (Exception e){
 
        }
 
        //获取request
        HttpServletRequest request = HttpContextUtils.getHttpServletRequest();
        //设置IP地址
        sysLog.setIp(IPUtils.getIpAddr(request));
 
        //用户名
        String username = (String)request.getSession().getAttribute("username");
        sysLog.setUsername(username);
 
        sysLog.setTime(time);
        sysLog.setAddtime(new Date());
        //保存系统日志
        syslogService.insert(sysLog);
    }
}
 

📑MySQL表设计参考

数据类型说明
idINT AUTO_INCREMENT用户ID,主键,自动递增
usernameVARCHAR(50)用户名,唯一
passwordVARCHAR(255)用户密码(加密存储)
emailVARCHAR(100)用户邮箱,唯一
phone_numberVARCHAR(15)用户手机号
first_nameVARCHAR(50)用户名字
last_nameVARCHAR(50)用户姓氏
genderENUM('M', 'F', 'O')性别(M: 男, F: 女, O: 其他)
date_of_birthDATE用户出生日期
registration_dateTIMESTAMP用户注册时间,默认当前时间
last_loginDATETIME最后登录时间
statusENUM('active', 'inactive')用户状态(active: 激活, inactive: 禁用)
profile_pictureVARCHAR(255)用户头像的图片路径
addressTEXT用户地址

📜项目文档

🙈为什么选择我

  • 项目可根据要求更改或定制,满足多样化需求🍰
  • 直接对接项目开发者,无中间商赚差价💰️
  • 博主自己参与项目开发,了解项目架构和细节,提供全面答疑👨‍💻
  • 提供源码、数据库、搭建环境、bug调试、技术辅导一条龙服务🐉
  • todesk、向日葵、腾讯会议、语音电话快捷交流,高效沟通📞

📩源码获取

欢迎大家点赞👍、收藏⭐️、关注 、咨询📧 下方获取👇🏻联系方式👇🏻

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐