📝目录

👑项目简介

📷效果展示

📚技术栈

⌨️部分代码参考

📑MySQL表设计参考

📜项目论文

🙈为什么选择我

📩源码获取


👑项目简介

👑本项目是基于Node.js✅✅的物业管理✅✅系统旨在提升物业管理的效率与透明度,提供便捷的在线服务平台。系统支持业主和物业管理人员之间的实时沟通,用户可以提交停车、维修请求、报修、查询费用及公告等信息。物业管理人员则可以通过后台管理系统处理请求、发布通知和管理财务数据。此外,系统集成了缴费功能,方便业主在线支付物业费和其他相关费用。通过数据分析模块,物业管理方能够更好地了解业主需求,优化服务质量,实现物业管理的智能化与现代化。

📷效果展示

📚技术栈

Node.js

Node.js 是一个开源的、跨平台的 JavaScript 运行时环境,基于 Chrome 的 V8 引擎构建。它允许开发者在服务器端运行 JavaScript,打破了传统上 JavaScript 只在浏览器中执行的限制。Node.js 以事件驱动、非阻塞 I/O 模型为特点,使其在处理高并发请求时表现优越,适合构建高效的网络应用和实时服务。

JavaScript

JavaScript 是一种广泛使用的脚本语言,主要用于网页开发。它使得网页具有交互性和动态效果,并能够与用户进行实时交互。JavaScript 是一个轻量级、解释型的语言,支持面向对象和函数式编程。随着 Node.js 的兴起,JavaScript 现在不仅可以在浏览器中运行,也能用于服务器端编程,形成了全栈开发的趋势。

Java

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

MySQL

MySQL 是一种开源的关系型数据库管理系统(RDBMS),以其高效、可靠和易用著称。它使用结构化查询语言(SQL)进行数据管理,广泛应用于各种 web 应用和企业系统中。MySQL 支持事务、外键和复杂查询,适合处理大量数据和高并发访问。由于其良好的性能和社区支持,MySQL 已成为最流行的数据库之一。

⌨️部分代码参考

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表设计参考

id列名数据类型长度说明
1user_idINT11用户唯一标识
2usernameVARCHAR50用户名
3emailVARCHAR100用户邮箱
4phoneVARCHAR15用户联系电话
5property_idINT11物业唯一标识
6property_nameVARCHAR100物业名称
7addressVARCHAR255物业地址
8management_feeDECIMAL10,2物业管理费用
9request_idINT11维修请求唯一标识
10request_typeVARCHAR50请求类型(维修、咨询等)
11request_descriptionTEXT请求描述
12statusENUM请求状态(待处理、已完成)
13created_atDATETIME请求提交日期
14notification_idINT11通知唯一标识
15notification_titleVARCHAR100通知标题
16notification_bodyTEXT通知内容
17notification_dateDATETIME通知日期

📜项目论文

🙈为什么选择我

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

📩源码获取

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

Logo

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

更多推荐