Community property management system based on java SpringBoot framework

Posted by Brit on Sun, 06 Mar 2022 03:35:43 +0100

The community property management system is divided into two roles: community owner and community property manager. After logging in to the system, the community owner can complain, maintain and report, view bills, log in and register, etc; After logging into the system, the administrator can manage users, and can manage parking spaces, houses, payment, community services, etc. The community property management system is developed in Java language, uses the development platform of IDEA, and publishes the project through Tomcat server. The architecture used is B/S architecture.

System function design

1. The login module community property management system faces two roles: administrator and community owner. Both of them log in to the system through a login portal. Through the login module, the user can log in to the system after entering the account password and selecting the login role, and carry out corresponding management operations according to the user's authority.

2. My maintenance module the function of my maintenance module for the owner is to submit maintenance information. The owner can add maintenance information and view the corresponding maintenance information; Through the maintenance management under the function module of their own community service, the administrator can view the maintenance information submitted by the owner, and maintain and modify the maintenance information.

3. User system module user system module is a module for administrators. The main function of this module is user management. Administrators can add owners through this module. The added owner information includes user name, mobile phone number, gender, etc; Through this module, the administrator can disable the user's parking space and house, and manage house allocation, parking space allocation, payment management, etc. The administrator can also modify the owner information and delete the owner information.

4. Housing system module housing system module is a module for administrators. The main functions of this module are building management, unit management and housing management; Building management includes adding, modifying and deleting buildings in the community; Cell management is a module that manages all cell information in the cell. The administrator can add cell information, modify cell information, delete cell information, etc; Housing management is to manage all housing information in the community, including adding room name, room area, status and other information.

5. Parking space system module the main function of the parking space system module is to manage the parking space information. The administrator can add all the parking space information and query the parking space information conditionally. The administrator can also allocate the parking space information, modify and delete the parking space information.

6. Payment system module payment system module is also a module for administrators. Its main functions include payment type and payment management. Payment types include the types of property charges, including water charges, electricity charges, property charges, etc; Payment management includes checking whether the owner pays this month and confirming the owner's payment.

7. Personal center module personal center module is a module for both administrators and users. Through this module, both administrators and users can manage and maintain personal information.

Code display of administrator control layer

@RestController
public class AdminController {
    @Autowired
    AdminService service;
    private static final Logger LOG = LoggerFactory.getLogger(AdminController.class);

    @PostMapping("/admin/loginByPassword")
    public ResBody loginByPassword(@RequestBody Map<String, Object> params,
                                   HttpSession session) {
        ResBody resBody = new ResBody();
        String email = params.get("email").toString();
        String password = params.get("password").toString();
        Admin admin = service.findAdmin(email,password);
        if (admin == null){
            resBody.setCode(500);
            resBody.setMsg("Login failed, please login again");
        }else {
            session.setAttribute("admin",admin);
            LOG.info(admin.toString());
            resBody.setCode(200);
            resBody.setMsg("Login successful");
        }
        return resBody;
    }

    @PostMapping("/admin/updatePass")
    public ResBody updatePass(@RequestBody Map<String, Object> params,
                              HttpSession session) {
        ResBody resBody = new ResBody();
        String newPsw = params.get("newPsw").toString();
        Admin admin = (Admin) session.getAttribute("admin");
        admin.setPassword(newPsw);
        int i = service.updatePass(admin.getId(),newPsw);
        if (i != 1){
            resBody.setCode(500);
            resBody.setMsg("Modification failed, background error");
        }else {
            session.setAttribute("admin",admin);
            LOG.info(admin.toString());
            resBody.setCode(200);
            resBody.setMsg("Modified successfully");
        }
        return resBody;
    }

Demo video

Community property management system based on springboot framework

Topics: Java MySQL Spring Boot