The popularity of computers and the advent of the Internet era make the release and dissemination of information more convenient and fast. Users can access multiple application systems through the browser on the computer to obtain some management systems that can meet the needs of users. The website system is sometimes more like a large "display platform". Users can select the required information to enter the system to view the home page, scenic spot information, hotel information, room information, travel routes, local characteristics, personal center, background management, etc.
Environmental needs
1. Running environment: java jdk 1.8 is the most stable JDK and the most used JDK version.
2.IDE environment: both IDEA and Eclipse are available. Recommend IDEA;
3.tomcat environment: Tomcat 7/Tomcat 8/Tomcat 9
4. Hardware environment: windows 7/8/10 1G memory or above; Or Mac OS;
5. Database: MySql 5.7;
6. Maven project: Yes;
Technology stack
Back end: Spring+SpringMVC+Mybatis+Springboot
Front end: vue+CSS+JavaScript+jQuery+elementui
Front desk homepage function module
- Tourism management system, you can view the home page, scenic spot information, hotel information, room information, tourist routes, local characteristics, personal center, background management and other contents on the front page
- Login and user registration. You can fill in account, name, password and other information on the user registration page to register
- Scenic spot information, you can view the local scenic spot information through the scenic spot information module
- Hotel information can be viewed by category, home stay, star level, hotel area, hotel area, hotel address, hotel address and contact number
- Travel route: on the travel plan page, purchase or click me to collect by filling in the plan number, departure city, travel route, booking instructions, travel days, price, clicks and other information
1. Administrator account: abo Password: abo
2. The development environment is Eclipse/idea, and the database is developed by mysql using the java language.
3. Run SpringbootSchemaApplication Java to open the home page
4. Modify in the database connection src main resources application.yml
5.maven package version apache-maven-3.3.9
Development language: Java
Framework: spring boot
Front end framework: vue.js
JDK version: JDK1.8+
Server: tomcat8+
Database tool: Navicat
Software development: idea supports eclipse
The administrator can fill in the home page, personal center, user management, scenic spot information, hotel information, guest room information, tourist routes, local characteristics, system management and other functional modules to perform corresponding operations by clicking background management
/** * Login related */ @RequestMapping("users") @RestController public class UserController{ @Autowired private UserService userService; @Autowired private TokenService tokenService; /** * Sign in */ @IgnoreAuth @PostMapping(value = "/login") public R login(String username, String password, String captcha, HttpServletRequest request) { UserEntity user = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", username)); if(user==null || !user.getPassword().equals(password)) { return R.error("Incorrect account or password"); } String token = tokenService.generateToken(user.getId(),username, "users", user.getRole()); return R.ok().put("token", token); } /** * register */ @IgnoreAuth @PostMapping(value = "/register") public R register(@RequestBody UserEntity user){ // ValidatorUtils.validateEntity(user); if(userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername())) !=null) { return R.error("User already exists"); } userService.insert(user); return R.ok(); } /** * sign out */ @GetMapping(value = "logout") public R logout(HttpServletRequest request) { request.getSession().invalidate(); return R.ok("Exit succeeded"); } /** * Password Reset */ @IgnoreAuth @RequestMapping(value = "/resetPass") public R resetPass(String username, HttpServletRequest request){ UserEntity user = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", username)); if(user==null) { return R.error("The account does not exist"); } user.setPassword("123456"); userService.update(user,null); return R.ok("Password has been reset to: 123456"); } /** * list */ @RequestMapping("/page") public R page(@RequestParam Map<String, Object> params,UserEntity user){ EntityWrapper<UserEntity> ew = new EntityWrapper<UserEntity>(); PageUtils page = userService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.allLike(ew, user), params), params)); return R.ok().put("data", page); } /** * list */ @RequestMapping("/list") public R list( UserEntity user){ EntityWrapper<UserEntity> ew = new EntityWrapper<UserEntity>(); ew.allEq(MPUtil.allEQMapPre( user, "user")); return R.ok().put("data", userService.selectListView(ew)); } /** * information */ @RequestMapping("/info/{id}") public R info(@PathVariable("id") String id){ UserEntity user = userService.selectById(id); return R.ok().put("data", user); } /** * Get the user's session user information */ @RequestMapping("/session") public R getCurrUser(HttpServletRequest request){ Long id = (Long)request.getSession().getAttribute("userId"); UserEntity user = userService.selectById(id); return R.ok().put("data", user); } /** * preservation */ @PostMapping("/save") public R save(@RequestBody UserEntity user){ // ValidatorUtils.validateEntity(user); if(userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername())) !=null) { return R.error("User already exists"); } userService.insert(user); return R.ok(); } /** * modify */ @RequestMapping("/update") public R update(@RequestBody UserEntity user){ // ValidatorUtils.validateEntity(user); userService.updateById(user);//Update All return R.ok(); } /** * delete */ @RequestMapping("/delete") public R delete(@RequestBody Long[] ids){ userService.deleteBatchIds(Arrays.asList(ids)); return R.ok(); } }
catalogue
1 Introduction 1
1.1 Background 1
1.2 Research status 1
1.3 Preliminary design method and implementation plan 2
1.4 Research content 2
2 System development environment 4
2.1 Introduction to Tools 4
2.2 Environment configuration 4
2.3 Introduction to B/S Structure 4
2.4 MySQL Database 5
2.5 Framework introduction 5
3 System Analysis 6
3.1 System feasibility analysis 6
3.1.1 Economic feasibility 6
3.1.2 Technical feasibility 6
3.1.3 Operational Feasibility 6
3.2 System Status Analysis 6
3.3 Functional Requirements Analysis 7
3.4 System design rules and operation environment 8
3.5 System Process Analysis 8
3.5.1 Operation process 8
3.5.2 Process of adding information 9
3.5.3 Information deletion process 10
4 System Design 11
4.1 Main functions of system design 11
4.2 Database design 11
4.2.1 Database design specifications 11
4.2.2 E/R Figure 11
4.2.3 Data Sheet 12
5 System Realization 25
5.1 System function module25
5.2 Background module27
5.2.1 Administrator function module27
5.2.2 User function module30
6 System Testing 33
6.1 Functional test33
6.2 Availability test33
6.3 Performance test34
6.4 Analysis of test results34
7 Conclusion 35
References 36
Acknowledgements 37