SSM+微信小程序实现物业管理系统及实例代码

 更新时间:2022年02月15日 14:15:26   作者:编程指南针  
这篇文章主要介绍了SSM+微信小程序实现物业管理系统,ssm微信小程序物业管理系统,有网站后台管理系统,本文通过实例代码给大家展示系统的功能,需要的朋友可以参考下

项目编号:BS-XCX-003

ssm微信小程序物业管理系统,有网站后台管理系统

项目描述

微信小程序物业管理系统,微信小程序端包括以下几个模块:

社区公告、报修、信息采集、生活缴费、二手置换

微信小程序后台管理界面可以增删改查社区公告、问卷、问卷问题、问题选项等

在微信小程序前端,用户提交信息后,可在我的界面查看提交的信息,管理员可以在微信小程序后台管理界面查看所有用户提交的信息。

运行环境

jdk8+tomcat8+mysql5.7+IntelliJ IDEA+maven

项目技术(必填)

spring+spring mvc+mybatis+layui

下面展示一下系统的功能:

物业管理后台地址

http://localhost:8080/SheQu/

登录账号admin   123

社区公告管理

商品管理

在线调查问卷管理

题目管理

选项管理

小程序端产生的数据查询

维修查询

商品订单查询

小程序端页面功能展示

公告管理

报修管理

调查问卷

生活缴费

在线购物

我的

 项目核心代码:

package com.shequ.controller;
 
import com.alibaba.fastjson.JSON;
import com.shequ.pojo.Admin;
import com.shequ.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.util.List;
import java.util.Map;
@Controller
public class AdminController {
    @Autowired
    AdminService adminService;
    @ResponseBody
    @RequestMapping("/login")
    public String findOneAdmin(String account, String pwd, HttpServletRequest request ){
        HttpSession session = request.getSession(true);//新建session对象
        Admin admin = adminService.findOneAdmin(account,pwd);
        session.setAttribute("admin",admin);
        if(admin!=null){
            return "success";
        }
        return "failure";
    }
    @RequestMapping(value = "/findAllAccount",produces="application/json;charset=UTF-8")
    public String findAllAccount(){
        List<Admin> accounts = adminService.findAllAccount();
        String result = JSON.toJSONString(accounts);
        System.out.println(result);
        return result;
    @RequestMapping(value = "/updateAdminPwd" )
    public String updateAdminPwd(@RequestBody Map map, HttpServletRequest request){
        Admin admin = (Admin) session.getAttribute("admin");  //将对应数据存入session中
        String account = admin.getAccount();
        System.out.println(map);
        String pwd = map.get("pwd").toString();
        System.out.println("pwd:"+pwd);
        int n = adminService.updateAdminPwd(pwd,account);
        if(n>0){
}
package com.shequ.controller;
 
import com.alibaba.fastjson.JSON;
import com.shequ.mapper.ChoiceMapper;
import com.shequ.pojo.Choice;
import com.shequ.pojo.Pay;
import com.shequ.pojo.Sur_Que;
import com.shequ.service.ChoiceService;
import com.shequ.service.Sur_QueService;
import com.shequ.util.Layui;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
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 java.util.HashMap;
import java.util.List;
import java.util.Map;
@Controller
public class ChoiceController {
   @Autowired
   ChoiceService choiceService;
    @ResponseBody
    @RequestMapping(value = "/findAllChoiceByPage",produces="application/json;charset=UTF-8")
    public String findAllChoiceByPage(@RequestParam("limit") String limit, @RequestParam("page") String page) {
        int start = (Integer.parseInt(page) - 1)*Integer.parseInt(limit);
        int pageSize = Integer.parseInt(limit);
        List<Choice> choices = choiceService.findAllChoiceByPage(start,pageSize);
        List<Choice> choicesAll = choiceService.findAllChoice();
        Layui l = Layui.data(choicesAll.size(), choices);
        String result = JSON.toJSONString(l);
        return result;
    }
    @RequestMapping(value = "/deleteChoiceById")
    public String deleteChoiceById(@RequestParam("id")String id) {
        int n = choiceService.deleteChoiceById(Integer.parseInt(id));
        if(n>0){
            return "success";
        }
        return "failure";
    @RequestMapping(value = "/insertChoice")
    public String insertChoice(@RequestBody Map map) {
        int n = choiceService.insertChoice(map);
    @RequestMapping(value = "/updateChoiceById")
    public String updateChoiceById(@RequestBody Map map) {
        int n = choiceService.updateChoiceById(map);
    @RequestMapping(value = "/findAllUserSurQueAndOptByPage",produces="application/json;charset=UTF-8")
    public String findAllUserSurQueAndOptByPage(@RequestParam("limit") String limit, @RequestParam("page") String page) {
        List<Choice> choices = choiceService.findAllUserSurQueAndOptByPage(start,pageSize);
        List<Choice> choiceAll = choiceService.findAllChoice();
        Layui l = Layui.data(choiceAll.size(), choices);
}
package com.shequ.controller;
 
import com.shequ.util.MyTool;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
@Controller
public class CommonController {
    private final Logger log =  LoggerFactory.getLogger(CommonController.class);
    @RequestMapping("/{pageName}")
    public String pathAll(@PathVariable(value="pageName") String pageName){
        return pageName;
    }
    @RequestMapping("/loginOut")
    public String loginOut(HttpSession httpSession) {
        httpSession.removeAttribute("user");
        return "redirect:/";
    @RequestMapping(value = "/uploadAvatar", method = RequestMethod.POST)
    public @ResponseBody Object uploadAvatar(@RequestParam("photo") MultipartFile file, HttpServletRequest request)
            throws IllegalStateException, IOException {
        Map<String, Object> map = new HashMap<String, Object>();
        String name = file.getOriginalFilename();
        String imgAbsolutePath = MyTool.SaveImg(file, MyTool.getImg(), name);
        map.put("code", 0);
        map.put("message", "上传成功");
        map.put("data", name);
        return map;
    @RequestMapping(value = "/uploadImg", method = RequestMethod.POST)
    public @ResponseBody Object uploadImg(@RequestParam("photo") MultipartFile file, HttpServletRequest request)
    @RequestMapping(value = "/uploadContent", method = RequestMethod.POST)
    public @ResponseBody Object uploadContent(@RequestParam("file") MultipartFile file, HttpServletRequest request)
        String imgAbsolutePath = MyTool.SaveImg(file, MyTool.getXmlFile(), name);
}
package com.shequ.controller;
 
import com.alibaba.fastjson.JSON;
import com.shequ.pojo.Message;
import com.shequ.service.MessageService;
import com.shequ.util.Layui;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
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 java.util.Date;
import java.util.List;
import java.util.Map;
@Controller
public class MessageController {
    @Autowired
    MessageService messageService;
    @ResponseBody
    @RequestMapping(value = "/findAllMessageByPage",produces="application/json;charset=UTF-8")
    public String findAllMessageByPage(@RequestParam("limit") String limit, @RequestParam("page") String page){
        int start = (Integer.parseInt(page) - 1)*Integer.parseInt(limit);
        int pageSize = Integer.parseInt(limit);
        List<Message> message = messageService.findAllMessageByPage(start,pageSize);
        List<Message> messageAll = messageService.findAllMessage();
        Layui l = Layui.data(messageAll.size(), message);
        String result = JSON.toJSONString(l);
        return result;
    }
    @RequestMapping(value = "/insertMessage")
    public String insertMessage(@RequestBody Map map){
        Date date = new Date();
        map.put("time",date);
        System.out.println("map:"+map.toString());
        int n = messageService.insertMessage(map);
        if(n>0){
            return "success";
        }
        return "failure";
    @RequestMapping(value = "/deleteNotices")
    public String deleteNotices(@RequestParam("id") int id){
        int n = messageService.deleteNotices(id);
    @RequestMapping(value = "/updateMessage")
    public String updateMessage(@RequestBody Map map){
        int n = messageService.updateMessage(map);
}
package com.shequ.controller;
 
import com.alibaba.fastjson.JSON;
import com.shequ.pojo.Message;
import com.shequ.pojo.Survey;
import com.shequ.service.SurveyService;
import com.shequ.util.Layui;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
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 java.util.List;
import java.util.Map;
@Controller
public class SurveyController {
   @Autowired
   SurveyService surveyService;
    @ResponseBody
    @RequestMapping(value = "/findAllSurveyByPage",produces="application/json;charset=UTF-8")
    public String findAllSurveyByPage(@RequestParam("limit") String limit, @RequestParam("page") String page) {
        int start = (Integer.parseInt(page) - 1)*Integer.parseInt(limit);
        int pageSize = Integer.parseInt(limit);
        List<Survey> surveys = surveyService.findAllSurveyByPage(start,pageSize);
        List<Survey> surveyAll = surveyService.findAllSurvey();
        Layui l = Layui.data(surveyAll.size(), surveys);
        String result = JSON.toJSONString(l);
        return result;
    }
    @RequestMapping(value = "/findAllSurvey",produces="application/json;charset=UTF-8")
    public String findAllSurvey() {
        List<Survey> surveys = surveyService.findAllSurvey();
        String result = JSON.toJSONString(surveys);
    @RequestMapping(value = "/insertSurvey")
    public String insertSurvey(@RequestBody Map map) {
        int n = surveyService.insertSurvey(map);
        if(n>0){
            return "success";
        }
        return "failure";
    @RequestMapping(value = "/deleteSurveyById")
    public String deleteSurveyById(@RequestParam("id")String id) {
        int n = surveyService.deleteSurveyById(Integer.parseInt(id));
    @RequestMapping(value = "/updateSurveyById")
    public String updateSurveyById(@RequestBody Map map) {
        int n = surveyService.updateSurveyById(map);
}

到此这篇关于SSM+微信小程序实现物业管理系统的文章就介绍到这了,更多相关ssm小程序物业管理系统内容请搜索脚本之家以前的文章或继续浏览下面的相关文章希望大家以后多多支持脚本之家!

相关文章

  • Java二分查找算法与数组处理的应用实例

    Java二分查找算法与数组处理的应用实例

    二分查找法,又叫做折半查找法,它是一种效率较高的查找方法。数组对于每一门编程语言来说都是重要的数据结构之一,当然不同语言对数组的实现及处理也不尽相同。Java 语言中提供的数组是用来存储固定大小的同类型元素
    2022-07-07
  • Java并发控制机制详解

    Java并发控制机制详解

    这篇文章主要为大家详细介绍了Java并发控制机制,什么是Java并发控制机制,Java并发控制机制的作用,感兴趣的小伙伴们可以参考一下
    2016-08-08
  • Java IO网络模型实现解析

    Java IO网络模型实现解析

    这篇文章主要为大家介绍了Java IO网络模型实现解析,有需要的朋友可以借鉴参考下,希望能够有所帮助,祝大家多多进步,早日升职加薪
    2023-03-03
  • Java selenium上传文件的实现

    Java selenium上传文件的实现

    本文主要介绍了Java selenium上传文件的实现,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧
    2022-04-04
  • JDK8 new ReentrantLock((true)加锁流程

    JDK8 new ReentrantLock((true)加锁流程

    这篇文章主要介绍了java面试中常遇到的问题JDK8 new ReentrantLock((true)加锁流程示例解析,有需要的朋友可以借鉴参考下,希望能够有所帮助,祝大家多多进步,早日升职加薪
    2023-07-07
  • SpringBoot使用AES对JSON数据加密和解密的实现方法

    SpringBoot使用AES对JSON数据加密和解密的实现方法

    这篇文章主要介绍了SpringBoot使用AES对JSON数据加密和解密的实现方法,文章通过代码示例介绍的非常详细,对我们的学习或工作有一定的帮助,需要的朋友可以参考下
    2023-08-08
  • java springboot poi 从controller 接收不同类型excel 文件处理

    java springboot poi 从controller 接收不同类型excel 文件处理

    这篇文章主要介绍了java springboot poi 从controller 接收不同类型excel 文件处理,本文给大家介绍的非常详细,具有一定的参考借鉴价值,需要的朋友可以参考下
    2019-10-10
  • Spring Boot虚拟线程Webflux在JWT验证和MySQL查询性能比较

    Spring Boot虚拟线程Webflux在JWT验证和MySQL查询性能比较

    这篇文章主要为大家介绍了Spring Boot虚拟线程与Webflux在JWT验证和MySQL查询上的性能比较,有需要的朋友可以借鉴参考下,希望能够有所帮助,祝大家多多进步,早日升职加薪
    2023-09-09
  • 利用Java代码写一个并行调用模板

    利用Java代码写一个并行调用模板

    这篇文章主要介绍了利用Java代码写一个并行调用模板,文章基于Java的相关内容展开写一个并行调用模板的详细介绍,具有一定的参考价值,需要的小伙伴可以参考一下
    2022-05-05
  • Java中的ConcurrentLinkedQueue松散队列解析

    Java中的ConcurrentLinkedQueue松散队列解析

    这篇文章主要介绍了Java中的ConcurrentLinkedQueue松散队列解析,链表是松散的,链表节点并不都是有效的,允许存在无效节点val=null,但是只有最后一个节点才能next=null,需要的朋友可以参考下
    2023-12-12

最新评论