├── .gitignore ├── .mvn └── wrapper │ ├── MavenWrapperDownloader.java │ ├── maven-wrapper.jar │ └── maven-wrapper.properties ├── README.md ├── mvnw ├── mvnw.cmd ├── pom.xml ├── src ├── main │ ├── .DS_Store │ ├── java │ │ └── com │ │ │ └── test │ │ │ └── tourism │ │ │ ├── TourismApplication.java │ │ │ ├── controller │ │ │ ├── CarController.java │ │ │ ├── FlightController.java │ │ │ ├── HotelController.java │ │ │ ├── MessageController.java │ │ │ ├── SceneryController.java │ │ │ ├── TravelController.java │ │ │ └── UserController.java │ │ │ ├── mapper │ │ │ ├── CarMapper.java │ │ │ ├── FlightMapper.java │ │ │ ├── HotelMapper.java │ │ │ ├── MessageMapper.java │ │ │ ├── SceneryMapper.java │ │ │ ├── TravelMapper.java │ │ │ └── UserMapper.java │ │ │ ├── model │ │ │ ├── Car.java │ │ │ ├── Flight.java │ │ │ ├── Hotel.java │ │ │ ├── Message.java │ │ │ ├── Scenery.java │ │ │ ├── Travel.java │ │ │ └── User.java │ │ │ ├── service │ │ │ ├── CarServiceImpl.java │ │ │ ├── FlightServiceImpl.java │ │ │ ├── HotelServiceImpl.java │ │ │ ├── MessageServiceImpl.java │ │ │ ├── SceneryServiceImpl.java │ │ │ ├── TravelServiceImpl.java │ │ │ └── UserServiceImpl.java │ │ │ ├── util │ │ │ └── JsonResult.java │ │ │ └── vo │ │ │ ├── CarVO.java │ │ │ ├── FlightVO.java │ │ │ ├── HotelVO.java │ │ │ ├── MessageVO.java │ │ │ ├── ResultVO.java │ │ │ ├── SceneryVO.java │ │ │ └── UserVO.java │ └── resources │ │ ├── .DS_Store │ │ ├── application.yml │ │ ├── mapper │ │ ├── CarMapper.xml │ │ ├── FlightMapper.xml │ │ ├── HotelMapper.xml │ │ ├── MessageMapper.xml │ │ ├── SceneryMapper.xml │ │ ├── TravelMapper.xml │ │ └── UserMapper.xml │ │ ├── sql │ │ └── travel.sql │ │ └── static │ │ ├── .DS_Store │ │ ├── css │ │ ├── index.css │ │ └── public.css │ │ ├── images │ │ ├── alipay.jpg │ │ ├── bg5.png │ │ ├── close.png │ │ ├── code.jpg │ │ ├── face.jpg │ │ ├── fly.png │ │ ├── git.png │ │ ├── header.jpg │ │ ├── header.png │ │ ├── layui.png │ │ ├── login_bg.jpg │ │ ├── mayun.png │ │ ├── userface1.jpg │ │ ├── userface2.jpg │ │ ├── userface3.jpg │ │ ├── userface4.jpg │ │ ├── userface5.jpg │ │ └── wechat.jpg │ │ ├── index.html │ │ ├── js │ │ ├── address.js │ │ ├── bodyTab.js │ │ ├── cache.js │ │ ├── cacheUserInfo.js │ │ ├── index.js │ │ └── main.js │ │ ├── json │ │ ├── navs.json │ │ ├── studentList.json │ │ └── systemParameter.json │ │ ├── layui │ │ ├── css │ │ │ ├── layui.css │ │ │ ├── layui.mobile.css │ │ │ └── modules │ │ │ │ ├── code.css │ │ │ │ ├── laydate │ │ │ │ └── default │ │ │ │ │ └── laydate.css │ │ │ │ └── layer │ │ │ │ └── default │ │ │ │ ├── icon-ext.png │ │ │ │ ├── icon.png │ │ │ │ ├── layer.css │ │ │ │ ├── loading-0.gif │ │ │ │ ├── loading-1.gif │ │ │ │ └── loading-2.gif │ │ ├── font │ │ │ ├── iconfont.eot │ │ │ ├── iconfont.svg │ │ │ ├── iconfont.ttf │ │ │ └── iconfont.woff │ │ ├── images │ │ │ └── face │ │ │ │ ├── 0.gif │ │ │ │ ├── 1.gif │ │ │ │ ├── 10.gif │ │ │ │ ├── 11.gif │ │ │ │ ├── 12.gif │ │ │ │ ├── 13.gif │ │ │ │ ├── 14.gif │ │ │ │ ├── 15.gif │ │ │ │ ├── 16.gif │ │ │ │ ├── 17.gif │ │ │ │ ├── 18.gif │ │ │ │ ├── 19.gif │ │ │ │ ├── 2.gif │ │ │ │ ├── 20.gif │ │ │ │ ├── 21.gif │ │ │ │ ├── 22.gif │ │ │ │ ├── 23.gif │ │ │ │ ├── 24.gif │ │ │ │ ├── 25.gif │ │ │ │ ├── 26.gif │ │ │ │ ├── 27.gif │ │ │ │ ├── 28.gif │ │ │ │ ├── 29.gif │ │ │ │ ├── 3.gif │ │ │ │ ├── 30.gif │ │ │ │ ├── 31.gif │ │ │ │ ├── 32.gif │ │ │ │ ├── 33.gif │ │ │ │ ├── 34.gif │ │ │ │ ├── 35.gif │ │ │ │ ├── 36.gif │ │ │ │ ├── 37.gif │ │ │ │ ├── 38.gif │ │ │ │ ├── 39.gif │ │ │ │ ├── 4.gif │ │ │ │ ├── 40.gif │ │ │ │ ├── 41.gif │ │ │ │ ├── 42.gif │ │ │ │ ├── 43.gif │ │ │ │ ├── 44.gif │ │ │ │ ├── 45.gif │ │ │ │ ├── 46.gif │ │ │ │ ├── 47.gif │ │ │ │ ├── 48.gif │ │ │ │ ├── 49.gif │ │ │ │ ├── 5.gif │ │ │ │ ├── 50.gif │ │ │ │ ├── 51.gif │ │ │ │ ├── 52.gif │ │ │ │ ├── 53.gif │ │ │ │ ├── 54.gif │ │ │ │ ├── 55.gif │ │ │ │ ├── 56.gif │ │ │ │ ├── 57.gif │ │ │ │ ├── 58.gif │ │ │ │ ├── 59.gif │ │ │ │ ├── 6.gif │ │ │ │ ├── 60.gif │ │ │ │ ├── 61.gif │ │ │ │ ├── 62.gif │ │ │ │ ├── 63.gif │ │ │ │ ├── 64.gif │ │ │ │ ├── 65.gif │ │ │ │ ├── 66.gif │ │ │ │ ├── 67.gif │ │ │ │ ├── 68.gif │ │ │ │ ├── 69.gif │ │ │ │ ├── 7.gif │ │ │ │ ├── 70.gif │ │ │ │ ├── 71.gif │ │ │ │ ├── 8.gif │ │ │ │ └── 9.gif │ │ ├── lay │ │ │ └── modules │ │ │ │ ├── carousel.js │ │ │ │ ├── code.js │ │ │ │ ├── colorpicker.js │ │ │ │ ├── element.js │ │ │ │ ├── flow.js │ │ │ │ ├── form.js │ │ │ │ ├── jquery.js │ │ │ │ ├── laydate.js │ │ │ │ ├── layedit.js │ │ │ │ ├── layer.js │ │ │ │ ├── laypage.js │ │ │ │ ├── laytpl.js │ │ │ │ ├── mobile.js │ │ │ │ ├── rate.js │ │ │ │ ├── slider.js │ │ │ │ ├── table.js │ │ │ │ ├── tree.js │ │ │ │ ├── upload.js │ │ │ │ └── util.js │ │ ├── layui.all.js │ │ └── layui.js │ │ ├── my-font │ │ ├── demo.css │ │ ├── demo_index.html │ │ ├── iconfont.css │ │ ├── iconfont.eot │ │ ├── iconfont.js │ │ ├── iconfont.svg │ │ ├── iconfont.ttf │ │ ├── iconfont.woff │ │ └── iconfont.woff2 │ │ └── page │ │ ├── 404.html │ │ ├── car │ │ ├── addCar.html │ │ ├── carList.html │ │ ├── carList.js │ │ ├── editCar.html │ │ └── editCar.js │ │ ├── doc │ │ ├── addressDoc.html │ │ ├── bodyTabDoc.html │ │ └── navDoc.html │ │ ├── flight │ │ ├── addFlight.html │ │ ├── editFlight.html │ │ ├── editFlight.js │ │ ├── flightList.html │ │ └── flightList.js │ │ ├── hotel │ │ ├── addHotel.html │ │ ├── editHotel.html │ │ ├── editHotel.js │ │ ├── hotelList.html │ │ └── hotelList.js │ │ ├── login │ │ ├── login.html │ │ └── login.js │ │ ├── main.html │ │ ├── message │ │ ├── addMessage.html │ │ ├── editMessage.html │ │ ├── editMessage.js │ │ ├── messageList.html │ │ └── messageList.js │ │ ├── scenery │ │ ├── addScenery.html │ │ ├── editScenery.html │ │ ├── editScenery.js │ │ ├── sceneryList.html │ │ └── sceneryList.js │ │ └── user │ │ ├── addUser.html │ │ ├── editUser.js │ │ ├── userEdit.html │ │ ├── userList.html │ │ └── userList.js └── test │ └── java │ └── com │ └── test │ └── tourism │ └── TourismApplicationTests.java ├── 截屏2020-01-14下午8.21.33.png ├── 截屏2020-01-14下午8.29.45.png ├── 截屏2020-02-28下午2.24.23.png └── 截屏2020-02-28下午2.29.44.png /.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/** 5 | !**/src/test/** 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | 30 | ### VS Code ### 31 | .vscode/ 32 | -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # tourism 2 | 旅游管理系统,SpringBoot + Mybatis + LayUI 3 | (resources文件夹下有sql文件) 4 | # 效果简单展示 5 | ![image](截屏2020-02-28下午2.29.44.png) 6 | ![image](截屏2020-01-14下午8.29.45.png) 7 | ![image](截屏2020-02-28下午2.24.23.png) 8 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 2.2.2.RELEASE 9 | 10 | 11 | com.test 12 | tourism 13 | 0.0.1-SNAPSHOT 14 | tourism 15 | Demo project for Spring Boot 16 | 17 | 18 | 1.8 19 | 20 | 21 | 22 | 23 | 24 | org.springframework.boot 25 | spring-boot-starter-web 26 | 27 | 28 | 29 | org.springframework.boot 30 | spring-boot-starter-test 31 | test 32 | 33 | 34 | 35 | mysql 36 | mysql-connector-java 37 | runtime 38 | 39 | 40 | org.springframework.boot 41 | spring-boot-starter-test 42 | test 43 | 44 | 45 | 46 | org.springframework.boot 47 | spring-boot-devtools 48 | true 49 | true 50 | 51 | 52 | 53 | org.projectlombok 54 | lombok 55 | 56 | 57 | 58 | com.github.pagehelper 59 | pagehelper-spring-boot-starter 60 | 1.2.5 61 | 62 | 63 | 64 | com.alibaba 65 | druid-spring-boot-starter 66 | 1.1.21 67 | 68 | 69 | 70 | org.mybatis.spring.boot 71 | mybatis-spring-boot-starter 72 | 1.3.2 73 | 74 | 75 | com.alibaba 76 | fastjson 77 | 1.2.8 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | org.springframework.boot 86 | spring-boot-maven-plugin 87 | 88 | 89 | 90 | 91 | -------------------------------------------------------------------------------- /src/main/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/.DS_Store -------------------------------------------------------------------------------- /src/main/java/com/test/tourism/TourismApplication.java: -------------------------------------------------------------------------------- 1 | package com.test.tourism; 2 | 3 | import org.mybatis.spring.annotation.MapperScan; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | 7 | @SpringBootApplication 8 | //@MapperScan("com.test.tourism.mapper") 9 | public class TourismApplication { 10 | 11 | public static void main(String[] args) { 12 | SpringApplication.run(TourismApplication.class, args); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/com/test/tourism/controller/CarController.java: -------------------------------------------------------------------------------- 1 | package com.test.tourism.controller; 2 | 3 | import com.alibaba.fastjson.JSONObject; 4 | import com.github.pagehelper.PageInfo; 5 | import com.test.tourism.model.Car; 6 | import com.test.tourism.model.Scenery; 7 | import com.test.tourism.service.CarServiceImpl; 8 | import com.test.tourism.util.JsonResult; 9 | import com.test.tourism.vo.CarVO; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.web.bind.annotation.CrossOrigin; 12 | import org.springframework.web.bind.annotation.RequestMapping; 13 | import org.springframework.web.bind.annotation.RequestParam; 14 | import org.springframework.web.bind.annotation.RestController; 15 | 16 | import java.util.List; 17 | 18 | @CrossOrigin(origins = "*") 19 | @RestController 20 | public class CarController { 21 | @Autowired 22 | private CarServiceImpl carService; 23 | 24 | @RequestMapping("/findCarByType") 25 | public List findFlightByType(){ 26 | return carService.findAllCar(); 27 | } 28 | 29 | @RequestMapping("/findCarById") 30 | public Car findFlightById(String id){ 31 | return carService.findCarById(id); 32 | } 33 | 34 | @RequestMapping("/findCarLocationById") 35 | public List findCarLocationById(String id){ 36 | return carService.findCarLocationById(id); 37 | } 38 | 39 | @RequestMapping("/findAllCar") 40 | public CarVO findAllCar(@RequestParam(name = "page", required = false) int page, 41 | @RequestParam(name = "limit", required = false) int limit) { 42 | PageInfo carPageInfo = carService.findAllCar(page, limit); 43 | //获取数据的总条数 44 | int total = (int) carPageInfo.getTotal(); 45 | /*设置总条数*/ 46 | CarVO carVO = new CarVO(); 47 | carVO.setCount(total); 48 | carVO.setCarList(carPageInfo.getList()); 49 | return carVO; 50 | } 51 | 52 | //出租车添加 53 | @RequestMapping("/addCar") 54 | public JSONObject addCar(Car car) { 55 | System.out.println(car); 56 | if(carService.addCar(car)!=-1){ 57 | return JsonResult.sendSuccess(); 58 | } 59 | else{ 60 | JSONObject json = new JSONObject(); 61 | json.put("msg","未知错误"); 62 | return json; 63 | } 64 | } 65 | 66 | @RequestMapping("/deleteCarById") 67 | public JSONObject deleteCarById(String id){ 68 | return JsonResult.sendError(); 69 | } 70 | 71 | @RequestMapping("/updateCar") 72 | public JSONObject updateCar(Car car){ 73 | System.out.println(car.toString()); 74 | if(carService.updateCar(car)!=0){ 75 | return JsonResult.sendSuccess(); 76 | } 77 | else{ 78 | return JsonResult.sendError(); 79 | } 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /src/main/java/com/test/tourism/controller/FlightController.java: -------------------------------------------------------------------------------- 1 | package com.test.tourism.controller; 2 | 3 | 4 | import com.alibaba.fastjson.JSONObject; 5 | import com.github.pagehelper.PageInfo; 6 | import com.test.tourism.model.Flight; 7 | import com.test.tourism.model.Scenery; 8 | import com.test.tourism.service.FlightServiceImpl; 9 | import com.test.tourism.util.JsonResult; 10 | import com.test.tourism.vo.FlightVO; 11 | import org.springframework.beans.factory.annotation.Autowired; 12 | import org.springframework.web.bind.annotation.CrossOrigin; 13 | import org.springframework.web.bind.annotation.RequestMapping; 14 | import org.springframework.web.bind.annotation.RequestParam; 15 | import org.springframework.web.bind.annotation.RestController; 16 | 17 | import java.util.List; 18 | 19 | @CrossOrigin(origins = "*") 20 | @RestController 21 | public class FlightController { 22 | @Autowired 23 | private FlightServiceImpl flightService; 24 | 25 | @RequestMapping("/findFlightByType") 26 | public List findFlightByType(){ 27 | return flightService.findAllFlight(); 28 | } 29 | 30 | @RequestMapping("/findFlightById") 31 | public Flight findFlightById(String id){ 32 | return flightService.findFlightById(id); 33 | } 34 | 35 | @RequestMapping("/findFlightCityByName") 36 | public List findFlightCityByName(String fromCity){ 37 | return flightService.findFlightCityByName(fromCity); 38 | } 39 | 40 | @RequestMapping("/findAllFlight") 41 | public FlightVO findAllFlight(@RequestParam(name = "page", required = false) int page, 42 | @RequestParam(name = "limit", required = false) int limit) { 43 | PageInfo flightPageInfo = flightService.findAllFlight(page, limit); 44 | //获取数据的总条数 45 | int total = (int) flightPageInfo.getTotal(); 46 | /*设置总条数*/ 47 | FlightVO flightVO = new FlightVO(); 48 | flightVO.setCount(total); 49 | flightVO.setFlightList(flightPageInfo.getList()); 50 | return flightVO; 51 | } 52 | 53 | //航班添加 54 | @RequestMapping("/addFlight") 55 | public JSONObject addFlight(Flight flight) { 56 | System.out.println(flight); 57 | if(flightService.addFlight(flight)!=-1){ 58 | return JsonResult.sendSuccess(); 59 | } 60 | else{ 61 | JSONObject json = new JSONObject(); 62 | json.put("msg","未知错误"); 63 | return json; 64 | } 65 | } 66 | 67 | //删除景点通过id 68 | @RequestMapping("/deleteFlightById") 69 | public JSONObject deleteFlightById(String id){ 70 | return JsonResult.sendError(); 71 | } 72 | 73 | @RequestMapping("/updateFlight") 74 | public JSONObject updateFlight(Flight flight){ 75 | System.out.println(flight.toString()); 76 | if(flightService.updateFlight(flight)!=0){ 77 | return JsonResult.sendSuccess(); 78 | } 79 | else{ 80 | return JsonResult.sendError(); 81 | } 82 | } 83 | 84 | } 85 | -------------------------------------------------------------------------------- /src/main/java/com/test/tourism/controller/HotelController.java: -------------------------------------------------------------------------------- 1 | package com.test.tourism.controller; 2 | 3 | 4 | import com.alibaba.fastjson.JSONObject; 5 | import com.github.pagehelper.PageInfo; 6 | import com.test.tourism.model.Hotel; 7 | import com.test.tourism.model.Scenery; 8 | import com.test.tourism.service.HotelServiceImpl; 9 | import com.test.tourism.util.JsonResult; 10 | import com.test.tourism.vo.HotelVO; 11 | import org.springframework.beans.factory.annotation.Autowired; 12 | import org.springframework.web.bind.annotation.CrossOrigin; 13 | import org.springframework.web.bind.annotation.RequestMapping; 14 | import org.springframework.web.bind.annotation.RequestParam; 15 | import org.springframework.web.bind.annotation.RestController; 16 | 17 | import java.util.List; 18 | 19 | @CrossOrigin(origins = "*") 20 | @RestController 21 | public class HotelController { 22 | @Autowired 23 | private HotelServiceImpl hotelService; 24 | 25 | @RequestMapping("/findHotelByType") 26 | public List findHotelByType(){ 27 | return hotelService.findAllHotel(); 28 | } 29 | 30 | @RequestMapping("/findHotelById") 31 | public Hotel findHotelById(String id){ 32 | return hotelService.findHotelById(id); 33 | } 34 | 35 | @RequestMapping("/findHotelLocationById") 36 | public List findHotelLocationById(String id){ 37 | return hotelService.findHotelLocationById(id); 38 | } 39 | 40 | @RequestMapping("/findAllHotel") 41 | public HotelVO findAllHotel(@RequestParam(name = "page", required = false) int page, 42 | @RequestParam(name = "limit", required = false) int limit) { 43 | PageInfo hotelPageInfo = hotelService.findAllHotel(page, limit); 44 | //获取数据的总条数 45 | int total = (int) hotelPageInfo.getTotal(); 46 | /*设置总条数*/ 47 | HotelVO hotelVO = new HotelVO(); 48 | hotelVO.setCount(total); 49 | hotelVO.setHotelList(hotelPageInfo.getList()); 50 | return hotelVO; 51 | } 52 | 53 | @RequestMapping("/deleteHotelById") 54 | public JSONObject deleteHotelById(String id){ 55 | return JsonResult.sendError(); 56 | } 57 | 58 | @RequestMapping("/updateHotel") 59 | public JSONObject updateHotel(Hotel hotel){ 60 | System.out.println(hotel.toString()); 61 | if(hotelService.updateHotel(hotel)!=0){ 62 | return JsonResult.sendSuccess(); 63 | } 64 | else{ 65 | return JsonResult.sendError(); 66 | } 67 | } 68 | 69 | //酒店添加 70 | @RequestMapping("/addHotel") 71 | public JSONObject addHotel(Hotel hotel) { 72 | System.out.println(hotel); 73 | if(hotelService.addHotel(hotel)!=-1){ 74 | return JsonResult.sendSuccess(); 75 | } 76 | else{ 77 | JSONObject json = new JSONObject(); 78 | json.put("msg","未知错误"); 79 | return json; 80 | } 81 | } 82 | 83 | } 84 | -------------------------------------------------------------------------------- /src/main/java/com/test/tourism/controller/MessageController.java: -------------------------------------------------------------------------------- 1 | package com.test.tourism.controller; 2 | 3 | import com.alibaba.fastjson.JSONObject; 4 | import com.github.pagehelper.PageInfo; 5 | import com.test.tourism.model.Message; 6 | import com.test.tourism.service.MessageServiceImpl; 7 | import com.test.tourism.util.JsonResult; 8 | import com.test.tourism.vo.MessageVO; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.web.bind.annotation.CrossOrigin; 11 | import org.springframework.web.bind.annotation.RequestMapping; 12 | import org.springframework.web.bind.annotation.RequestParam; 13 | import org.springframework.web.bind.annotation.RestController; 14 | 15 | import java.util.List; 16 | 17 | @CrossOrigin(origins = "*") 18 | @RestController 19 | public class MessageController { 20 | @Autowired 21 | private MessageServiceImpl messageServiceImpl; 22 | //根据游记id查询所有留言 23 | @RequestMapping("/findMessageById") 24 | public List findMessageById(String id){ 25 | return messageServiceImpl.findMessageById(id); 26 | } 27 | //发送一条留言 28 | @RequestMapping("/sendMessage") 29 | public Message sendMessage(Message msg){ 30 | System.out.println(msg); 31 | return messageServiceImpl.sendMessage(msg); 32 | } 33 | //删除一条留言根据message_id 34 | @RequestMapping("/deleteMessageById") 35 | public JSONObject deleteMessageById(String id){ 36 | return messageServiceImpl.deleteMessageById(id); 37 | } 38 | //查询所有的留言 39 | @RequestMapping("/findAllMessage") 40 | public MessageVO findAll(@RequestParam(name = "page", required = false) int page, 41 | @RequestParam(name = "limit", required = false) int limit) { 42 | PageInfo userPageInfo = messageServiceImpl.findAllMessage(page, limit); 43 | //获取数据的总条数 44 | int total = (int) userPageInfo.getTotal(); 45 | /*设置总条数*/ 46 | MessageVO messageVO = new MessageVO(); 47 | messageVO.setCount(total); 48 | messageVO.setMessageList(userPageInfo.getList()); 49 | return messageVO; 50 | } 51 | @RequestMapping("/updateMessage") 52 | public JSONObject updateMessage(Message msg){ 53 | if (messageServiceImpl.updateMessage(msg) != 0) { 54 | return JsonResult.sendSuccess(); 55 | }else{ 56 | return JsonResult.sendError(); 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/main/java/com/test/tourism/controller/SceneryController.java: -------------------------------------------------------------------------------- 1 | package com.test.tourism.controller; 2 | 3 | import com.alibaba.fastjson.JSONObject; 4 | import com.github.pagehelper.PageInfo; 5 | import com.test.tourism.model.Scenery; 6 | import com.test.tourism.model.User; 7 | import com.test.tourism.service.SceneryServiceImpl; 8 | import com.test.tourism.util.JsonResult; 9 | import com.test.tourism.vo.SceneryVO; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.web.bind.annotation.CrossOrigin; 12 | import org.springframework.web.bind.annotation.RequestMapping; 13 | import org.springframework.web.bind.annotation.RequestParam; 14 | import org.springframework.web.bind.annotation.RestController; 15 | 16 | import java.util.List; 17 | @CrossOrigin(origins="*") 18 | @RestController 19 | public class SceneryController { 20 | @Autowired 21 | private SceneryServiceImpl sceneryService; 22 | @RequestMapping("/findByType") 23 | public List findByType(){ 24 | return sceneryService.findAllScenery(); 25 | } 26 | 27 | @RequestMapping("/findById") 28 | public Scenery findByType(String id){ 29 | return sceneryService.findById(id); 30 | } 31 | 32 | @RequestMapping("/findCityByName") 33 | public List findCityByName(String name){ 34 | return sceneryService.findCityByName(name); 35 | } 36 | 37 | @RequestMapping("/findAll") 38 | public SceneryVO findAll(@RequestParam(name = "page", required = false) int page, 39 | @RequestParam(name = "limit", required = false) int limit) { 40 | PageInfo sceneryPageInfo = sceneryService.findAll(page, limit); 41 | //获取数据的总条数 42 | int total = (int) sceneryPageInfo.getTotal(); 43 | /*设置总条数*/ 44 | SceneryVO sceneryVO = new SceneryVO(); 45 | sceneryVO.setCount(total); 46 | sceneryVO.setSceneryList(sceneryPageInfo.getList()); 47 | return sceneryVO; 48 | } 49 | 50 | //景点添加 51 | @RequestMapping("/addScenery") 52 | public JSONObject addScenery(Scenery scenery) { 53 | System.out.println(scenery); 54 | if(sceneryService.addScenery(scenery)!=-1){ 55 | return JsonResult.sendSuccess(); 56 | } 57 | else{ 58 | JSONObject json = new JSONObject(); 59 | json.put("msg","未知错误"); 60 | return json; 61 | } 62 | } 63 | 64 | //删除景点通过id 65 | @RequestMapping("/deleteSceneryById") 66 | public JSONObject deleteSceneryById(String id){ 67 | 68 | // if(sceneryService.deleteSceneryById(id)!=0){ 69 | // return JsonResult.sendSuccess(); 70 | // }else{ 71 | // return JsonResult.sendError(); 72 | // } 73 | return JsonResult.sendError(); 74 | } 75 | 76 | @RequestMapping("/updateScenery") 77 | public JSONObject updateScenery(Scenery scenery){ 78 | System.out.println(scenery.toString()); 79 | if(sceneryService.updateScenery(scenery)!=0){ 80 | return JsonResult.sendSuccess(); 81 | } 82 | else{ 83 | return JsonResult.sendError(); 84 | } 85 | } 86 | 87 | } 88 | -------------------------------------------------------------------------------- /src/main/java/com/test/tourism/controller/TravelController.java: -------------------------------------------------------------------------------- 1 | package com.test.tourism.controller; 2 | 3 | import com.test.tourism.model.Travel; 4 | import com.test.tourism.service.TravelServiceImpl; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.web.bind.annotation.CrossOrigin; 7 | import org.springframework.web.bind.annotation.RequestMapping; 8 | import org.springframework.web.bind.annotation.RestController; 9 | 10 | import java.util.List; 11 | 12 | @CrossOrigin(origins = "*") 13 | @RestController 14 | public class TravelController { 15 | @Autowired 16 | private TravelServiceImpl travelService; 17 | @RequestMapping("findAllTravel") 18 | public List findAllTravel(){ 19 | return travelService.findAllTravel(); 20 | } 21 | 22 | @RequestMapping("findTravelById") 23 | public Travel findAllTravel(String id){ 24 | return travelService.findTravelById(id); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/com/test/tourism/mapper/CarMapper.java: -------------------------------------------------------------------------------- 1 | package com.test.tourism.mapper; 2 | 3 | import com.test.tourism.model.Car; 4 | import org.apache.ibatis.annotations.Mapper; 5 | 6 | import java.util.List; 7 | 8 | @Mapper 9 | public interface CarMapper { 10 | List findAllCar(); 11 | Car findCarById(String id); 12 | 13 | List findCarLocationById(String id); 14 | int deleteCarById(String id); 15 | int updateCar(Car car); 16 | 17 | int addCar(Car car); 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/com/test/tourism/mapper/FlightMapper.java: -------------------------------------------------------------------------------- 1 | package com.test.tourism.mapper; 2 | 3 | import com.test.tourism.model.Flight; 4 | import com.test.tourism.model.Scenery; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | import java.util.List; 8 | 9 | @Mapper 10 | public interface FlightMapper { 11 | List findAllFlight(); 12 | Flight findFlightById(String id); 13 | 14 | List findFlightCityByName(String fromCity); 15 | int deleteFlightById(String id); 16 | int updateFlight(Flight flight); 17 | 18 | int addFlight(Flight flight); 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/com/test/tourism/mapper/HotelMapper.java: -------------------------------------------------------------------------------- 1 | package com.test.tourism.mapper; 2 | 3 | 4 | import com.test.tourism.model.Hotel; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | import java.util.List; 8 | 9 | @Mapper 10 | public interface HotelMapper { 11 | List findAllHotel(); 12 | Hotel findHotelById(String id); 13 | 14 | List findHotelLocationById(String id); 15 | int deleteHotelById(String id); 16 | int updateHotel(Hotel hotel); 17 | 18 | int addHotel(Hotel hotel); 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/com/test/tourism/mapper/MessageMapper.java: -------------------------------------------------------------------------------- 1 | package com.test.tourism.mapper; 2 | 3 | import com.test.tourism.model.Message; 4 | import org.apache.ibatis.annotations.Mapper; 5 | 6 | import java.util.List; 7 | 8 | @Mapper 9 | public interface MessageMapper { 10 | //查询所有的留言根据游记id 11 | List findMessageById(String id); 12 | //发送一条留言到数据库中 13 | int sendMessage(Message msg); 14 | //根据id查询一条留言 15 | Message findById(Integer id); 16 | //根据id 删除一条留言 17 | int deleteMessageById(String id); 18 | //查询所有的留言 19 | List findAllMessage(); 20 | //更新一条留言 21 | int updateMessage(Message msg); 22 | 23 | } -------------------------------------------------------------------------------- /src/main/java/com/test/tourism/mapper/SceneryMapper.java: -------------------------------------------------------------------------------- 1 | package com.test.tourism.mapper; 2 | 3 | import com.test.tourism.model.Scenery; 4 | import org.apache.ibatis.annotations.Mapper; 5 | 6 | import java.util.List; 7 | 8 | @Mapper 9 | public interface SceneryMapper { 10 | List findAllScenery(); 11 | Scenery findById(String id); 12 | //根据城市名字搜索景点 13 | List findCityByName(String name); 14 | int deleteSceneryById(String id); 15 | int updateScenery(Scenery scenery); 16 | int addScenery(Scenery scenery); 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/com/test/tourism/mapper/TravelMapper.java: -------------------------------------------------------------------------------- 1 | package com.test.tourism.mapper; 2 | 3 | import com.test.tourism.model.Travel; 4 | import org.apache.ibatis.annotations.Mapper; 5 | 6 | import java.util.List; 7 | 8 | @Mapper 9 | public interface TravelMapper { 10 | List findAllTravel(); 11 | Travel findTravelById(String id); 12 | } -------------------------------------------------------------------------------- /src/main/java/com/test/tourism/mapper/UserMapper.java: -------------------------------------------------------------------------------- 1 | package com.test.tourism.mapper; 2 | 3 | import com.test.tourism.model.User; 4 | import org.apache.ibatis.annotations.Mapper; 5 | 6 | import java.util.List; 7 | 8 | @Mapper 9 | public interface UserMapper { 10 | //登录 11 | public abstract User login(User user); 12 | 13 | User isRegister(String name); 14 | 15 | int register(User user); 16 | 17 | //查询所有用户 18 | List findAllUser(); 19 | //删除通过id 20 | int deleteById(String id); 21 | 22 | int updateById(User user); 23 | 24 | int insertSelective(User record); 25 | 26 | User selectByPrimaryKey(Integer userId); 27 | 28 | int updateByPrimaryKeySelective(User record); 29 | 30 | int updateByPrimaryKey(User record); 31 | } -------------------------------------------------------------------------------- /src/main/java/com/test/tourism/model/Car.java: -------------------------------------------------------------------------------- 1 | package com.test.tourism.model; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class Car { 7 | private Integer carId; 8 | 9 | private String CarPrice; 10 | 11 | private String carSeats; 12 | 13 | private String carLocation; 14 | 15 | public Integer getCarId() { 16 | return carId; 17 | } 18 | 19 | public void setCarId(Integer carId) { 20 | this.carId = carId; 21 | } 22 | 23 | public String getCarPrice() { 24 | return CarPrice; 25 | } 26 | 27 | public void setCarPrice(String carPrice) { 28 | CarPrice = carPrice; 29 | } 30 | 31 | public String getCarSeats() { 32 | return carSeats; 33 | } 34 | 35 | public void setCarSeats(String carSeats) { 36 | this.carSeats = carSeats; 37 | } 38 | 39 | public String getCarLocation() { 40 | return carLocation; 41 | } 42 | 43 | public void setCarLocation(String carLocation) { 44 | this.carLocation = carLocation; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/com/test/tourism/model/Flight.java: -------------------------------------------------------------------------------- 1 | package com.test.tourism.model; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class Flight { 7 | private Integer flightId; 8 | 9 | private String flightPrice; 10 | 11 | private String flightSeats; 12 | 13 | private String flightFromCity; 14 | 15 | private String flightToCity; 16 | 17 | public Integer getFlightId() { 18 | return flightId; 19 | } 20 | 21 | public void setFlightId(Integer flightId) { 22 | this.flightId = flightId; 23 | } 24 | 25 | public String getFlightPrice() { 26 | return flightPrice; 27 | } 28 | 29 | public void setFlightPrice(String flightPrice) { 30 | this.flightPrice = flightPrice; 31 | } 32 | 33 | public String getFlightSeats() { 34 | return flightSeats; 35 | } 36 | 37 | public void setFlightSeats(String flightSeats) { 38 | this.flightSeats = flightSeats; 39 | } 40 | 41 | public String getFlightFromCity() { 42 | return flightFromCity; 43 | } 44 | 45 | public void setFlightFromCity(String flightFromCity) { 46 | this.flightFromCity = flightFromCity; 47 | } 48 | 49 | public String getFrightToCity() { 50 | return flightToCity; 51 | } 52 | 53 | public void setFrightToCity(String frightToCity) { 54 | this.flightToCity = frightToCity; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/main/java/com/test/tourism/model/Hotel.java: -------------------------------------------------------------------------------- 1 | package com.test.tourism.model; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class Hotel { 7 | private Integer hotelId; 8 | 9 | private String hotelName; 10 | 11 | private String hotelPrice; 12 | 13 | private String hotelLocation; 14 | 15 | private String hotelRooms; 16 | 17 | public Integer getHotelId() { 18 | return hotelId; 19 | } 20 | 21 | public void setHotelId(Integer hotelId) { 22 | this.hotelId = hotelId; 23 | } 24 | 25 | public String getHotelName() { 26 | return hotelName; 27 | } 28 | 29 | public void setHotelName(String hotelName) { 30 | this.hotelName = hotelName; 31 | } 32 | 33 | public String getHotelPrice() { 34 | return hotelPrice; 35 | } 36 | 37 | public void setHotelPrice(String hotelPrice) { 38 | this.hotelPrice = hotelPrice; 39 | } 40 | 41 | public String getHotelLocation() { 42 | return hotelLocation; 43 | } 44 | 45 | public void setHotelLocation(String hotelLocation) { 46 | this.hotelLocation = hotelLocation; 47 | } 48 | 49 | public String getHotelRooms() { 50 | return hotelRooms; 51 | } 52 | 53 | public void setHotelRooms(String hotelRooms) { 54 | this.hotelRooms = hotelRooms; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/main/java/com/test/tourism/model/Message.java: -------------------------------------------------------------------------------- 1 | package com.test.tourism.model; 2 | 3 | import lombok.Data; 4 | 5 | import java.util.Date; 6 | @Data 7 | public class Message { 8 | private Integer messageId; 9 | 10 | private String createTime; 11 | 12 | private String messageContent; 13 | 14 | private String userName; 15 | 16 | private String userHead; 17 | 18 | private Integer travelId; 19 | 20 | public Integer getMessageId() { 21 | return messageId; 22 | } 23 | 24 | public void setMessageId(Integer messageId) { 25 | this.messageId = messageId; 26 | } 27 | 28 | public String getCreateTime() { 29 | return createTime; 30 | } 31 | 32 | public void setCreateTime(String createTime) { 33 | this.createTime = createTime; 34 | } 35 | 36 | public String getMessageContent() { 37 | return messageContent; 38 | } 39 | 40 | public void setMessageContent(String messageContent) { 41 | this.messageContent = messageContent; 42 | } 43 | 44 | public String getUserName() { 45 | return userName; 46 | } 47 | 48 | public void setUserName(String userName) { 49 | this.userName = userName; 50 | } 51 | 52 | public String getUserHead() { 53 | return userHead; 54 | } 55 | 56 | public void setUserHead(String userHead) { 57 | this.userHead = userHead; 58 | } 59 | 60 | public Integer getTravelId() { 61 | return travelId; 62 | } 63 | 64 | public void setTravelId(Integer travelId) { 65 | this.travelId = travelId; 66 | } 67 | } -------------------------------------------------------------------------------- /src/main/java/com/test/tourism/model/Scenery.java: -------------------------------------------------------------------------------- 1 | package com.test.tourism.model; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class Scenery { 7 | private Integer sceneryId; 8 | 9 | private String sceneryCity; 10 | 11 | private String sceneryTitle; 12 | 13 | private String sceneryIntroduce; 14 | 15 | private String sceneryPrice; 16 | 17 | private String sceneryRoute; 18 | 19 | private String sceneryCover; 20 | 21 | private String sceneryImgs; 22 | 23 | private String sceneryType; 24 | 25 | public Integer getSceneryId() { 26 | return sceneryId; 27 | } 28 | 29 | public void setSceneryId(Integer sceneryId) { 30 | this.sceneryId = sceneryId; 31 | } 32 | 33 | public String getSceneryCity() { 34 | return sceneryCity; 35 | } 36 | 37 | public void setSceneryCity(String sceneryCity) { 38 | this.sceneryCity = sceneryCity; 39 | } 40 | 41 | public String getSceneryTitle() { 42 | return sceneryTitle; 43 | } 44 | 45 | public void setSceneryTitle(String sceneryTitle) { 46 | this.sceneryTitle = sceneryTitle; 47 | } 48 | 49 | public String getSceneryIntroduce() { 50 | return sceneryIntroduce; 51 | } 52 | 53 | public void setSceneryIntroduce(String sceneryIntroduce) { 54 | this.sceneryIntroduce = sceneryIntroduce; 55 | } 56 | 57 | public String getSceneryPrice() { 58 | return sceneryPrice; 59 | } 60 | 61 | public void setSceneryPrice(String sceneryPrice) { 62 | this.sceneryPrice = sceneryPrice; 63 | } 64 | 65 | public String getSceneryRoute() { 66 | return sceneryRoute; 67 | } 68 | 69 | public void setSceneryRoute(String sceneryRoute) { 70 | this.sceneryRoute = sceneryRoute; 71 | } 72 | 73 | public String getSceneryCover() { 74 | return sceneryCover; 75 | } 76 | 77 | public void setSceneryCover(String sceneryCover) { 78 | this.sceneryCover = sceneryCover; 79 | } 80 | 81 | public String getSceneryImgs() { 82 | return sceneryImgs; 83 | } 84 | 85 | public void setSceneryImgs(String sceneryImgs) { 86 | this.sceneryImgs = sceneryImgs; 87 | } 88 | 89 | public String getSceneryType() { 90 | return sceneryType; 91 | } 92 | 93 | public void setSceneryType(String sceneryType) { 94 | this.sceneryType = sceneryType; 95 | } 96 | 97 | @Override 98 | public String toString() { 99 | return "Scenery{" + 100 | "sceneryId=" + sceneryId + 101 | ", sceneryCity='" + sceneryCity + '\'' + 102 | ", sceneryTitle='" + sceneryTitle + '\'' + 103 | ", sceneryIntroduce='" + sceneryIntroduce + '\'' + 104 | ", sceneryPrice='" + sceneryPrice + '\'' + 105 | ", sceneryRoute='" + sceneryRoute + '\'' + 106 | ", sceneryCover='" + sceneryCover + '\'' + 107 | ", sceneryImgs='" + sceneryImgs + '\'' + 108 | ", sceneryType='" + sceneryType + '\'' + 109 | '}'; 110 | } 111 | } 112 | -------------------------------------------------------------------------------- /src/main/java/com/test/tourism/model/Travel.java: -------------------------------------------------------------------------------- 1 | package com.test.tourism.model; 2 | 3 | import lombok.Data; 4 | 5 | import java.util.Date; 6 | @Data 7 | public class Travel { 8 | private Integer travelId; 9 | 10 | private String travelName; 11 | 12 | private String createTime; 13 | 14 | private String travelTitle; 15 | 16 | private String travelCover; 17 | 18 | private String travelImgs; 19 | 20 | private String travelDetail; 21 | 22 | public Integer getTravelId() { 23 | return travelId; 24 | } 25 | 26 | public void setTravelId(Integer travelId) { 27 | this.travelId = travelId; 28 | } 29 | 30 | public String getTravelName() { 31 | return travelName; 32 | } 33 | 34 | public void setTravelName(String travelName) { 35 | this.travelName = travelName; 36 | } 37 | 38 | public String getCreateTime() { 39 | return createTime; 40 | } 41 | 42 | public void setCreateTime(String createTime) { 43 | this.createTime = createTime; 44 | } 45 | 46 | public String getTravelTitle() { 47 | return travelTitle; 48 | } 49 | 50 | public void setTravelTitle(String travelTitle) { 51 | this.travelTitle = travelTitle; 52 | } 53 | 54 | public String getTravelCover() { 55 | return travelCover; 56 | } 57 | 58 | public void setTravelCover(String travelCover) { 59 | this.travelCover = travelCover; 60 | } 61 | 62 | public String getTravelImgs() { 63 | return travelImgs; 64 | } 65 | 66 | public void setTravelImgs(String travelImgs) { 67 | this.travelImgs = travelImgs; 68 | } 69 | 70 | public String getTravelDetail() { 71 | return travelDetail; 72 | } 73 | 74 | public void setTravelDetail(String travelDetail) { 75 | this.travelDetail = travelDetail; 76 | } 77 | } -------------------------------------------------------------------------------- /src/main/java/com/test/tourism/model/User.java: -------------------------------------------------------------------------------- 1 | package com.test.tourism.model; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class User { 7 | private Integer userId; 8 | 9 | private String userName; 10 | 11 | private String userPassword; 12 | 13 | private String createTime; 14 | 15 | private String userType; 16 | 17 | public Integer getUserId() { 18 | return userId; 19 | } 20 | 21 | public void setUserId(Integer userId) { 22 | this.userId = userId; 23 | } 24 | 25 | public String getUserName() { 26 | return userName; 27 | } 28 | 29 | public void setUserName(String userName) { 30 | this.userName = userName; 31 | } 32 | 33 | public String getUserPassword() { 34 | return userPassword; 35 | } 36 | 37 | public void setUserPassword(String userPassword) { 38 | this.userPassword = userPassword; 39 | } 40 | 41 | public String getCreateTime() { 42 | return createTime; 43 | } 44 | 45 | public void setCreateTime(String createTime) { 46 | this.createTime = createTime; 47 | } 48 | 49 | public String getUserType() { 50 | return userType; 51 | } 52 | 53 | public void setUserType(String userType) { 54 | this.userType = userType; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/main/java/com/test/tourism/service/CarServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.test.tourism.service; 2 | 3 | import com.github.pagehelper.PageHelper; 4 | import com.github.pagehelper.PageInfo; 5 | import com.test.tourism.mapper.CarMapper; 6 | import com.test.tourism.model.Car; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.stereotype.Service; 9 | 10 | import java.util.List; 11 | 12 | @Service 13 | public class CarServiceImpl implements CarMapper { 14 | 15 | @Autowired 16 | private CarMapper carMapper; 17 | 18 | @Override 19 | public List findAllCar() { 20 | return carMapper.findAllCar(); 21 | } 22 | 23 | @Override 24 | public Car findCarById(String id) { 25 | return carMapper.findCarById(id); 26 | } 27 | 28 | @Override 29 | public List findCarLocationById(String id) { 30 | return carMapper.findCarLocationById(id); 31 | } 32 | 33 | @Override 34 | public int deleteCarById(String id) { 35 | return carMapper.deleteCarById(id); 36 | } 37 | 38 | @Override 39 | public int addCar(Car car) { 40 | return carMapper.addCar(car); 41 | } 42 | 43 | @Override 44 | public int updateCar(Car car) { 45 | return carMapper.updateCar(car); 46 | } 47 | public PageInfo findAllCar(int pageNum, int pageSize) { 48 | //将参数传给这个方法就可以实现物理分页了,非常简单。 49 | PageHelper.startPage(pageNum, pageSize); 50 | List carList = carMapper.findAllCar(); 51 | PageInfo result = new PageInfo(carList); 52 | return result; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/com/test/tourism/service/FlightServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.test.tourism.service; 2 | 3 | import com.github.pagehelper.PageHelper; 4 | import com.github.pagehelper.PageInfo; 5 | import com.test.tourism.mapper.FlightMapper; 6 | import com.test.tourism.model.Flight; 7 | import com.test.tourism.model.Scenery; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.stereotype.Service; 10 | 11 | import java.util.List; 12 | 13 | @Service 14 | public class FlightServiceImpl implements FlightMapper { 15 | 16 | @Autowired 17 | private FlightMapper flightMapper; 18 | 19 | @Override 20 | public List findAllFlight() { 21 | return flightMapper.findAllFlight(); 22 | } 23 | 24 | @Override 25 | public Flight findFlightById(String id) { 26 | return flightMapper.findFlightById(id); 27 | } 28 | 29 | @Override 30 | public List findFlightCityByName(String fromCity) { 31 | return flightMapper.findFlightCityByName(fromCity); 32 | } 33 | 34 | @Override 35 | public int deleteFlightById(String id) { 36 | return flightMapper.deleteFlightById(id); 37 | } 38 | 39 | @Override 40 | public int addFlight(Flight flight) { 41 | return flightMapper.addFlight(flight); 42 | } 43 | 44 | @Override 45 | public int updateFlight(Flight flight) { 46 | return flightMapper.updateFlight(flight); 47 | } 48 | public PageInfo findAllFlight(int pageNum, int pageSize) { 49 | //将参数传给这个方法就可以实现物理分页了,非常简单。 50 | PageHelper.startPage(pageNum, pageSize); 51 | List flightList = flightMapper.findAllFlight(); 52 | PageInfo result = new PageInfo(flightList); 53 | return result; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/com/test/tourism/service/HotelServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.test.tourism.service; 2 | 3 | import com.github.pagehelper.PageHelper; 4 | import com.github.pagehelper.PageInfo; 5 | import com.test.tourism.mapper.HotelMapper; 6 | import com.test.tourism.model.Hotel; 7 | import com.test.tourism.model.Scenery; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.stereotype.Service; 10 | 11 | import java.util.List; 12 | 13 | @Service 14 | public class HotelServiceImpl implements HotelMapper { 15 | 16 | @Autowired 17 | private HotelMapper hotelMapper; 18 | 19 | @Override 20 | public List findAllHotel() { 21 | return hotelMapper.findAllHotel(); 22 | } 23 | 24 | @Override 25 | public int addHotel(Hotel hotel) { 26 | return hotelMapper.addHotel(hotel); 27 | } 28 | 29 | @Override 30 | public Hotel findHotelById(String id) { 31 | return hotelMapper.findHotelById(id); 32 | } 33 | 34 | @Override 35 | public List findHotelLocationById(String id) { 36 | return hotelMapper.findHotelLocationById(id); 37 | } 38 | 39 | @Override 40 | public int deleteHotelById(String id) { 41 | return hotelMapper.deleteHotelById(id); 42 | } 43 | 44 | @Override 45 | public int updateHotel(Hotel hotel) { 46 | return hotelMapper.updateHotel(hotel); 47 | } 48 | 49 | public PageInfo findAllHotel(int pageNum, int pageSize) { 50 | //将参数传给这个方法就可以实现物理分页了,非常简单。 51 | PageHelper.startPage(pageNum, pageSize); 52 | List hotelList = hotelMapper.findAllHotel(); 53 | PageInfo result = new PageInfo(hotelList); 54 | return result; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/main/java/com/test/tourism/service/MessageServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.test.tourism.service; 2 | 3 | import com.alibaba.fastjson.JSONObject; 4 | import com.github.pagehelper.PageHelper; 5 | import com.github.pagehelper.PageInfo; 6 | import com.test.tourism.mapper.MessageMapper; 7 | import com.test.tourism.model.Message; 8 | import com.test.tourism.model.Scenery; 9 | import com.test.tourism.util.JsonResult; 10 | import org.springframework.stereotype.Service; 11 | 12 | import javax.annotation.Resource; 13 | import java.util.List; 14 | @Service 15 | public class MessageServiceImpl { 16 | @Resource 17 | private MessageMapper messageMapper; 18 | 19 | public List findMessageById(String id) { 20 | return messageMapper.findMessageById(id); 21 | } 22 | 23 | public PageInfo findAllMessage(int pageNum, int pageSize) { 24 | //将参数传给这个方法就可以实现物理分页了,非常简单。 25 | PageHelper.startPage(pageNum, pageSize); 26 | List messageList = messageMapper.findAllMessage(); 27 | PageInfo result = new PageInfo(messageList); 28 | return result; 29 | } 30 | 31 | public Message sendMessage(Message msg) { 32 | //表示留言成功 33 | 34 | //返回留言成功的那条数据的key 35 | int key = messageMapper.sendMessage(msg); 36 | // System.out.println(key); 37 | return messageMapper.findById(msg.getMessageId()); 38 | 39 | } 40 | 41 | public JSONObject deleteMessageById(String id){ 42 | //i表示返回执行成功的条数 43 | int i = messageMapper.deleteMessageById(id); 44 | //表示删除成功 45 | System.out.println(i); 46 | if(i!=0){ 47 | 48 | return JsonResult.sendSuccess(); 49 | } 50 | else{ 51 | return JsonResult.sendError(); 52 | } 53 | } 54 | //跟新一条留言 55 | public int updateMessage(Message msg){ 56 | return messageMapper.updateMessage(msg); 57 | } 58 | 59 | } 60 | -------------------------------------------------------------------------------- /src/main/java/com/test/tourism/service/SceneryServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.test.tourism.service; 2 | 3 | import com.github.pagehelper.PageHelper; 4 | import com.github.pagehelper.PageInfo; 5 | import com.test.tourism.mapper.SceneryMapper; 6 | import com.test.tourism.model.Scenery; 7 | import com.test.tourism.model.User; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.stereotype.Service; 10 | 11 | import java.util.List; 12 | 13 | @Service 14 | public class SceneryServiceImpl implements SceneryMapper { 15 | @Autowired 16 | private SceneryMapper sceneryMapper; 17 | @Override 18 | public List findAllScenery() { 19 | return sceneryMapper.findAllScenery(); 20 | } 21 | 22 | @Override 23 | public Scenery findById(String id) { 24 | return sceneryMapper.findById(id); 25 | } 26 | 27 | @Override 28 | public List findCityByName(String name) { 29 | return sceneryMapper.findCityByName(name); 30 | } 31 | 32 | //根据id删除景点 33 | @Override 34 | public int deleteSceneryById(String id) { 35 | return sceneryMapper.deleteSceneryById(id); 36 | } 37 | 38 | @Override 39 | public int addScenery(Scenery scenery) { 40 | return sceneryMapper.addScenery(scenery); 41 | } 42 | 43 | @Override 44 | public int updateScenery(Scenery scenery) { 45 | 46 | return sceneryMapper.updateScenery(scenery); 47 | } 48 | 49 | public PageInfo findAll(int pageNum, int pageSize) { 50 | //将参数传给这个方法就可以实现物理分页了,非常简单。 51 | PageHelper.startPage(pageNum, pageSize); 52 | List sceneryList = sceneryMapper.findAllScenery(); 53 | PageInfo result = new PageInfo(sceneryList); 54 | return result; 55 | } 56 | } 57 | 58 | 59 | -------------------------------------------------------------------------------- /src/main/java/com/test/tourism/service/TravelServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.test.tourism.service; 2 | 3 | import com.test.tourism.mapper.TravelMapper; 4 | import com.test.tourism.model.Travel; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import java.util.List; 9 | @Service 10 | public class TravelServiceImpl implements TravelMapper { 11 | @Autowired 12 | private TravelMapper travelMapper; 13 | @Override 14 | public List findAllTravel() { 15 | return travelMapper.findAllTravel(); 16 | } 17 | 18 | @Override 19 | public Travel findTravelById(String id) { 20 | return travelMapper.findTravelById(id); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/com/test/tourism/service/UserServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.test.tourism.service; 2 | 3 | import com.alibaba.fastjson.JSONObject; 4 | import com.github.pagehelper.PageHelper; 5 | import com.github.pagehelper.PageInfo; 6 | import com.test.tourism.mapper.UserMapper; 7 | import com.test.tourism.model.User; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.stereotype.Service; 10 | 11 | import java.util.List; 12 | 13 | @Service 14 | public class UserServiceImpl implements UserMapper{ 15 | @Autowired 16 | private UserMapper userMapper; 17 | 18 | @Override 19 | public User login(User user) { 20 | return userMapper.login(user); 21 | 22 | } 23 | 24 | @Override 25 | public User isRegister(String name) { 26 | return userMapper.isRegister(name); 27 | } 28 | 29 | @Override 30 | public int deleteById(String id) { 31 | return userMapper.deleteById(id); 32 | 33 | } 34 | 35 | @Override 36 | public int updateById(User user) { 37 | return userMapper.updateById(user); 38 | } 39 | 40 | @Override 41 | public int register(User user) { 42 | return userMapper.register(user); 43 | } 44 | 45 | @Override 46 | public List findAllUser() { 47 | return userMapper.findAllUser(); 48 | } 49 | 50 | public PageInfo findAll(int pageNum, int pageSize) { 51 | //将参数传给这个方法就可以实现物理分页了,非常简单。 52 | PageHelper.startPage(pageNum, pageSize); 53 | List userList = userMapper.findAllUser(); 54 | PageInfo result = new PageInfo(userList); 55 | return result; 56 | } 57 | 58 | 59 | @Override 60 | public int insertSelective(User record) { 61 | return 0; 62 | } 63 | 64 | @Override 65 | public User selectByPrimaryKey(Integer userId) { 66 | return null; 67 | } 68 | 69 | @Override 70 | public int updateByPrimaryKeySelective(User record) { 71 | return 0; 72 | } 73 | 74 | @Override 75 | public int updateByPrimaryKey(User record) { 76 | return 0; 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /src/main/java/com/test/tourism/util/JsonResult.java: -------------------------------------------------------------------------------- 1 | package com.test.tourism.util; 2 | 3 | import com.alibaba.fastjson.JSONObject; 4 | 5 | public class JsonResult { 6 | public static JSONObject sendSuccess(){ 7 | 8 | JSONObject json = new JSONObject(); 9 | json.put("msg","success"); 10 | return json; 11 | } 12 | public static JSONObject sendError(){ 13 | 14 | JSONObject json = new JSONObject(); 15 | json.put("msg","error"); 16 | return json; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/com/test/tourism/vo/CarVO.java: -------------------------------------------------------------------------------- 1 | package com.test.tourism.vo; 2 | 3 | import com.fasterxml.jackson.annotation.JsonProperty; 4 | import com.test.tourism.model.Car; 5 | import lombok.Data; 6 | 7 | import java.util.List; 8 | 9 | @Data 10 | public class CarVO { 11 | 12 | private Integer code=0; 13 | 14 | private Integer count; 15 | 16 | private Integer status=200; 17 | 18 | private String msg="success"; 19 | 20 | @JsonProperty("data") 21 | private List carList; 22 | 23 | public Integer getCode() { 24 | return code; 25 | } 26 | 27 | public void setCode(Integer code) { 28 | this.code = code; 29 | } 30 | 31 | public Integer getCount() { 32 | return count; 33 | } 34 | 35 | public void setCount(Integer count) { 36 | this.count = count; 37 | } 38 | 39 | public Integer getStatus() { 40 | return status; 41 | } 42 | 43 | public void setStatus(Integer status) { 44 | this.status = status; 45 | } 46 | 47 | public String getMsg() { 48 | return msg; 49 | } 50 | 51 | public void setMsg(String msg) { 52 | this.msg = msg; 53 | } 54 | 55 | public List getCarList() { 56 | return carList; 57 | } 58 | 59 | public void setCarList(List carList) { 60 | this.carList = carList; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/com/test/tourism/vo/FlightVO.java: -------------------------------------------------------------------------------- 1 | package com.test.tourism.vo; 2 | 3 | import com.fasterxml.jackson.annotation.JsonProperty; 4 | import com.test.tourism.model.Flight; 5 | import lombok.Data; 6 | 7 | import java.util.List; 8 | 9 | @Data 10 | public class FlightVO { 11 | 12 | private Integer code=0; 13 | 14 | private Integer count; 15 | 16 | private Integer status=200; 17 | 18 | private String msg="success"; 19 | 20 | @JsonProperty("data") 21 | private List flightList; 22 | 23 | public Integer getCode() { 24 | return code; 25 | } 26 | 27 | public void setCode(Integer code) { 28 | this.code = code; 29 | } 30 | 31 | public Integer getCount() { 32 | return count; 33 | } 34 | 35 | public void setCount(Integer count) { 36 | this.count = count; 37 | } 38 | 39 | public Integer getStatus() { 40 | return status; 41 | } 42 | 43 | public void setStatus(Integer status) { 44 | this.status = status; 45 | } 46 | 47 | public String getMsg() { 48 | return msg; 49 | } 50 | 51 | public void setMsg(String msg) { 52 | this.msg = msg; 53 | } 54 | 55 | public List getFlightList() { 56 | return flightList; 57 | } 58 | 59 | public void setFlightList(List flightList) { 60 | this.flightList = flightList; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/com/test/tourism/vo/HotelVO.java: -------------------------------------------------------------------------------- 1 | package com.test.tourism.vo; 2 | 3 | import com.fasterxml.jackson.annotation.JsonProperty; 4 | import com.test.tourism.model.Hotel; 5 | import lombok.Data; 6 | 7 | import java.util.List; 8 | @Data 9 | public class HotelVO { 10 | 11 | private Integer code=0; 12 | 13 | private Integer count; 14 | 15 | private Integer status=200; 16 | 17 | private String msg="success"; 18 | 19 | @JsonProperty("data") 20 | private List hotelList; 21 | 22 | public Integer getCode() { 23 | return code; 24 | } 25 | 26 | public void setCode(Integer code) { 27 | this.code = code; 28 | } 29 | 30 | public Integer getCount() { 31 | return count; 32 | } 33 | 34 | public void setCount(Integer count) { 35 | this.count = count; 36 | } 37 | 38 | public Integer getStatus() { 39 | return status; 40 | } 41 | 42 | public void setStatus(Integer status) { 43 | this.status = status; 44 | } 45 | 46 | public String getMsg() { 47 | return msg; 48 | } 49 | 50 | public void setMsg(String msg) { 51 | this.msg = msg; 52 | } 53 | 54 | public List getHotelList() { 55 | return hotelList; 56 | } 57 | 58 | public void setHotelList(List hotelList) { 59 | this.hotelList = hotelList; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/main/java/com/test/tourism/vo/MessageVO.java: -------------------------------------------------------------------------------- 1 | package com.test.tourism.vo; 2 | 3 | import com.fasterxml.jackson.annotation.JsonProperty; 4 | import com.test.tourism.model.Message; 5 | import lombok.Data; 6 | 7 | import java.util.List; 8 | @Data 9 | public class MessageVO { 10 | 11 | private Integer code=0; 12 | 13 | private Integer count; 14 | 15 | private Integer status=200; 16 | 17 | private String msg="success"; 18 | 19 | @JsonProperty("data") 20 | private List messageList ; 21 | 22 | public Integer getCode() { 23 | return code; 24 | } 25 | 26 | public void setCode(Integer code) { 27 | this.code = code; 28 | } 29 | 30 | public Integer getCount() { 31 | return count; 32 | } 33 | 34 | public void setCount(Integer count) { 35 | this.count = count; 36 | } 37 | 38 | public Integer getStatus() { 39 | return status; 40 | } 41 | 42 | public void setStatus(Integer status) { 43 | this.status = status; 44 | } 45 | 46 | public String getMsg() { 47 | return msg; 48 | } 49 | 50 | public void setMsg(String msg) { 51 | this.msg = msg; 52 | } 53 | 54 | public List getMessageList() { 55 | return messageList; 56 | } 57 | 58 | public void setMessageList(List messageList) { 59 | this.messageList = messageList; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/main/java/com/test/tourism/vo/ResultVO.java: -------------------------------------------------------------------------------- 1 | package com.test.tourism.vo; 2 | 3 | import com.fasterxml.jackson.annotation.JsonProperty; 4 | import com.test.tourism.model.User; 5 | import lombok.Data; 6 | 7 | import java.util.List; 8 | @Data 9 | public class ResultVO { 10 | 11 | private Integer code=0; 12 | 13 | private Integer count; 14 | 15 | private Integer status=200; 16 | 17 | private String msg="success"; 18 | 19 | @JsonProperty("data") 20 | private List userList; 21 | 22 | public Integer getCode() { 23 | return code; 24 | } 25 | 26 | public void setCode(Integer code) { 27 | this.code = code; 28 | } 29 | 30 | public Integer getCount() { 31 | return count; 32 | } 33 | 34 | public void setCount(Integer count) { 35 | this.count = count; 36 | } 37 | 38 | public Integer getStatus() { 39 | return status; 40 | } 41 | 42 | public void setStatus(Integer status) { 43 | this.status = status; 44 | } 45 | 46 | public String getMsg() { 47 | return msg; 48 | } 49 | 50 | public void setMsg(String msg) { 51 | this.msg = msg; 52 | } 53 | 54 | public List getUserList() { 55 | return userList; 56 | } 57 | 58 | public void setUserList(List userList) { 59 | this.userList = userList; 60 | } 61 | 62 | // @JsonProperty("data2") 63 | // private List messageList ; 64 | } 65 | -------------------------------------------------------------------------------- /src/main/java/com/test/tourism/vo/SceneryVO.java: -------------------------------------------------------------------------------- 1 | package com.test.tourism.vo; 2 | 3 | import com.fasterxml.jackson.annotation.JsonProperty; 4 | import com.test.tourism.model.Scenery; 5 | import lombok.Data; 6 | 7 | import java.util.List; 8 | @Data 9 | public class SceneryVO { 10 | 11 | private Integer code=0; 12 | 13 | private Integer count; 14 | 15 | private Integer status=200; 16 | 17 | private String msg="success"; 18 | 19 | @JsonProperty("data") 20 | private List sceneryList; 21 | 22 | public Integer getCode() { 23 | return code; 24 | } 25 | 26 | public void setCode(Integer code) { 27 | this.code = code; 28 | } 29 | 30 | public Integer getCount() { 31 | return count; 32 | } 33 | 34 | public void setCount(Integer count) { 35 | this.count = count; 36 | } 37 | 38 | public Integer getStatus() { 39 | return status; 40 | } 41 | 42 | public void setStatus(Integer status) { 43 | this.status = status; 44 | } 45 | 46 | public String getMsg() { 47 | return msg; 48 | } 49 | 50 | public void setMsg(String msg) { 51 | this.msg = msg; 52 | } 53 | 54 | public List getSceneryList() { 55 | return sceneryList; 56 | } 57 | 58 | public void setSceneryList(List sceneryList) { 59 | this.sceneryList = sceneryList; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/main/java/com/test/tourism/vo/UserVO.java: -------------------------------------------------------------------------------- 1 | package com.test.tourism.vo; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class UserVO { 7 | private Integer userId; 8 | 9 | private String userName; 10 | 11 | private String userPassword; 12 | 13 | private String createTime; 14 | 15 | private String userType; 16 | 17 | public Integer getUserId() { 18 | return userId; 19 | } 20 | 21 | public void setUserId(Integer userId) { 22 | this.userId = userId; 23 | } 24 | 25 | public String getUserName() { 26 | return userName; 27 | } 28 | 29 | public void setUserName(String userName) { 30 | this.userName = userName; 31 | } 32 | 33 | public String getUserPassword() { 34 | return userPassword; 35 | } 36 | 37 | public void setUserPassword(String userPassword) { 38 | this.userPassword = userPassword; 39 | } 40 | 41 | public String getCreateTime() { 42 | return createTime; 43 | } 44 | 45 | public void setCreateTime(String createTime) { 46 | this.createTime = createTime; 47 | } 48 | 49 | public String getUserType() { 50 | return userType; 51 | } 52 | 53 | public void setUserType(String userType) { 54 | this.userType = userType; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/main/resources/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/.DS_Store -------------------------------------------------------------------------------- /src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 3999 3 | spring: 4 | datasource: 5 | druid: 6 | url: jdbc:mysql://localhost:3306/travel?useUnicode=true&characterEncoding=UTF-8&allowMultiQueries=true&useSSL=false&serverTimezone=UTC 7 | username: root 8 | password: kyx950523 9 | driver-class-name: com.mysql.cj.jdbc.Driver 10 | type: com.alibaba.druid.pool.DruidDataSource 11 | mybatis: 12 | mapper-locations: classpath:mapper/*.xml 13 | type-aliases-package: com.test.tourism.model 14 | configuration: 15 | map-underscore-to-camel-case: true 16 | #pagehelper 17 | pagehelper: 18 | helperDialect: mysql 19 | reasonable: false 20 | supportMethodsArguments: true 21 | params: count=countSql 22 | returnPageInfo: check 23 | 24 | # 25 | logging: 26 | level: 27 | com.travel.mapper: debug -------------------------------------------------------------------------------- /src/main/resources/mapper/CarMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 12 | 13 | 14 | 17 | 18 | 19 | delete from car where car_id=#{id} 20 | 21 | 22 | update car set car_price=#{carPrice},car_seats=#{carSeats}, 23 | car_location=#{carLocation} 24 | where car_id=#{carId} 25 | 26 | 27 | 28 | insert into car (car_price, car_seats, car_location) 29 | values (#{carPrice},#{CarSeats},#{carLocation}) 30 | 31 | 32 | -------------------------------------------------------------------------------- /src/main/resources/mapper/FlightMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 12 | 13 | 14 | insert into flight (flight_price, flight_seats, flight_fromCity, flight_toCity) 15 | values (#{flightPrice},#{flightSeats},#{flightFromCity},#{flightToCity}) 16 | 17 | 18 | 19 | 22 | 23 | 24 | delete from flight where flight_id=#{id} 25 | 26 | 27 | update flight set flight_price=#{flightPrice},flight_seats=#{flightSeats}, 28 | flight_fromCity=#{flightFromCity},flight_toCity=#{flightToCity} 29 | where flight_id=#{flightId} 30 | 31 | -------------------------------------------------------------------------------- /src/main/resources/mapper/HotelMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 12 | 13 | 14 | insert into hotel (hotel_name, hotel_price, hotel_location, hotel_rooms) 15 | values (#{hotelName},#{hotelPrice},#{hotelLocation},#{hotelRooms}) 16 | 17 | 18 | 19 | 22 | 23 | 24 | delete from hotel where hotel_id=#{id} 25 | 26 | 27 | update hotel set hotel_name=#{hotelName},hotel_price=#{hotelPrice}, 28 | hotel_location=#{hotelLocation},hotel_rooms=#{hotelRooms} 29 | where hotel_id=#{hotelId} 30 | 31 | -------------------------------------------------------------------------------- /src/main/resources/mapper/MessageMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 9 | 10 | 11 | 12 | insert into message (create_time, message_content, 13 | user_name, user_head, 14 | travel_id) 15 | values ( now(), #{messageContent}, 16 | #{userName}, #{userHead}, 17 | #{travelId}) 18 | 19 | 20 | 24 | 25 | 26 | delete from message where message_id=#{id} 27 | 28 | 29 | 30 | 34 | 35 | 36 | update message set message_content=#{messageContent} where message_id=#{messageId} 37 | 38 | -------------------------------------------------------------------------------- /src/main/resources/mapper/SceneryMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 12 | 13 | 14 | 17 | 18 | 19 | delete from scenery where scenery_id=#{id} 20 | 21 | 22 | update scenery set scenery_city=#{sceneryCity},scenery_title=#{sceneryTitle}, 23 | scenery_introduce=#{sceneryIntroduce},scenery_price=#{sceneryPrice},scenery_route=#{sceneryRoute} 24 | where scenery_id=#{sceneryId} 25 | 26 | 27 | 28 | insert into scenery (scenery_city, scenery_title, scenery_price, scenery_route) 29 | values (#{sceneryCity},#{sceneryTitle},#{sceneryPrice},#{sceneryRoute}) 30 | 31 | -------------------------------------------------------------------------------- /src/main/resources/mapper/TravelMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 10 | -------------------------------------------------------------------------------- /src/main/resources/mapper/UserMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | user_id, user_name, user_password 11 | 12 | 18 | 19 | 20 | insert into user 21 | 22 | 23 | user_id, 24 | 25 | 26 | user_name, 27 | 28 | 29 | user_password, 30 | 31 | 32 | 33 | 34 | #{userId,jdbcType=INTEGER}, 35 | 36 | 37 | #{userName,jdbcType=VARCHAR}, 38 | 39 | 40 | #{userPassword,jdbcType=VARCHAR}, 41 | 42 | 43 | 44 | 45 | update user 46 | 47 | 48 | user_name = #{userName,jdbcType=VARCHAR}, 49 | 50 | 51 | user_password = #{userPassword,jdbcType=VARCHAR}, 52 | 53 | 54 | where user_id = #{userId,jdbcType=INTEGER} 55 | 56 | 57 | 58 | 59 | 62 | 63 | 66 | 67 | 68 | insert into user (user_name, user_password,create_time,user_type 69 | ) 70 | values (#{userName}, #{userPassword},now(),"user" 71 | ) 72 | 73 | 74 | 77 | 78 | 79 | delete from user 80 | where user_id = #{userId} 81 | 82 | 83 | 84 | update user 85 | set user_name = #{userName,jdbcType=VARCHAR}, 86 | user_password = #{userPassword,jdbcType=VARCHAR} 87 | where user_id = #{userId} 88 | 89 | 90 | -------------------------------------------------------------------------------- /src/main/resources/static/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/.DS_Store -------------------------------------------------------------------------------- /src/main/resources/static/images/alipay.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/images/alipay.jpg -------------------------------------------------------------------------------- /src/main/resources/static/images/bg5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/images/bg5.png -------------------------------------------------------------------------------- /src/main/resources/static/images/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/images/close.png -------------------------------------------------------------------------------- /src/main/resources/static/images/code.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/images/code.jpg -------------------------------------------------------------------------------- /src/main/resources/static/images/face.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/images/face.jpg -------------------------------------------------------------------------------- /src/main/resources/static/images/fly.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/images/fly.png -------------------------------------------------------------------------------- /src/main/resources/static/images/git.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/images/git.png -------------------------------------------------------------------------------- /src/main/resources/static/images/header.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/images/header.jpg -------------------------------------------------------------------------------- /src/main/resources/static/images/header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/images/header.png -------------------------------------------------------------------------------- /src/main/resources/static/images/layui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/images/layui.png -------------------------------------------------------------------------------- /src/main/resources/static/images/login_bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/images/login_bg.jpg -------------------------------------------------------------------------------- /src/main/resources/static/images/mayun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/images/mayun.png -------------------------------------------------------------------------------- /src/main/resources/static/images/userface1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/images/userface1.jpg -------------------------------------------------------------------------------- /src/main/resources/static/images/userface2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/images/userface2.jpg -------------------------------------------------------------------------------- /src/main/resources/static/images/userface3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/images/userface3.jpg -------------------------------------------------------------------------------- /src/main/resources/static/images/userface4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/images/userface4.jpg -------------------------------------------------------------------------------- /src/main/resources/static/images/userface5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/images/userface5.jpg -------------------------------------------------------------------------------- /src/main/resources/static/images/wechat.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/images/wechat.jpg -------------------------------------------------------------------------------- /src/main/resources/static/js/address.js: -------------------------------------------------------------------------------- 1 | layui.define(["form","jquery"],function(exports){ 2 | var form = layui.form, 3 | $ = layui.jquery, 4 | Address = { 5 | provinces : function() { 6 | //加载省数据 7 | var proHtml = '',that = this; 8 | $.get("../../json/address.json", function (data) { 9 | for (var i = 0; i < data.length; i++) { 10 | proHtml += ''; 11 | } 12 | //初始化省数据 13 | $("select[name=province]").append(proHtml); 14 | form.render(); 15 | form.on('select(province)', function (proData) { 16 | $("select[name=area]").html(''); 17 | var value = proData.value; 18 | if (value > 0) { 19 | that.citys(data[$(this).index() - 1].childs); 20 | } else { 21 | $("select[name=city]").attr("disabled", "disabled"); 22 | } 23 | }); 24 | }) 25 | }, 26 | //加载市数据 27 | citys : function(citys) { 28 | var cityHtml = '',that = this; 29 | for (var i = 0; i < citys.length; i++) { 30 | cityHtml += ''; 31 | } 32 | $("select[name=city]").html(cityHtml).removeAttr("disabled"); 33 | form.render(); 34 | form.on('select(city)', function (cityData) { 35 | var value = cityData.value; 36 | if (value > 0) { 37 | that.areas(citys[$(this).index() - 1].childs); 38 | } else { 39 | $("select[name=area]").attr("disabled", "disabled"); 40 | } 41 | }); 42 | }, 43 | //加载县/区数据 44 | areas : function(areas) { 45 | var areaHtml = ''; 46 | for (var i = 0; i < areas.length; i++) { 47 | areaHtml += ''; 48 | } 49 | $("select[name=area]").html(areaHtml).removeAttr("disabled"); 50 | form.render(); 51 | } 52 | }; 53 | exports("address",Address); 54 | }) -------------------------------------------------------------------------------- /src/main/resources/static/js/cacheUserInfo.js: -------------------------------------------------------------------------------- 1 | layui.config({ 2 | base : "../../js/" 3 | }).use(['form','jquery',"address"],function() { 4 | var form = layui.form, 5 | $ = layui.jquery, 6 | address = layui.address; 7 | 8 | //判断是否设置过头像,如果设置过则修改顶部、左侧和个人资料中的头像,否则使用默认头像 9 | if(window.sessionStorage.getItem('userFace')){ 10 | $("#userFace").attr("src",window.sessionStorage.getItem('userFace')); 11 | $(".userAvatar").attr("src",$(".userAvatar").attr("src").split("images/")[0] + "images/" + window.sessionStorage.getItem('userFace').split("images/")[1]); 12 | }else{ 13 | $("#userFace").attr("src","../../images/face.jpg"); 14 | } 15 | 16 | //判断是否修改过用户信息,如果修改过则填充修改后的信息 17 | var menuText = $("#top_tabs",parent.document).text(); //判断打开的窗口是否存在“个人资料”页面 18 | var citys,areas; 19 | if(window.sessionStorage.getItem('userInfo')){ 20 | //获取省信息 21 | address.provinces(); 22 | var userInfo = JSON.parse(window.sessionStorage.getItem('userInfo')); 23 | var citys; 24 | $(".realName").val(userInfo.realName); //用户名 25 | $(".userSex input[value="+userInfo.sex+"]").attr("checked","checked"); //性别 26 | $(".userPhone").val(userInfo.userPhone); //手机号 27 | $(".userBirthday").val(userInfo.userBirthday); //出生年月 28 | //填充省份信息,同时调取市级信息列表 29 | $.get("../../json/address.json", function (addressData) { 30 | $(".userAddress select[name='province']").val(userInfo.province); //省 31 | var value = userInfo.province; 32 | if (value > 0) { 33 | address.citys(addressData[$(".userAddress select[name='province'] option[value='"+userInfo.province+"']").index()-1].childs); 34 | citys = addressData[$(".userAddress select[name='province'] option[value='"+userInfo.province+"']").index()-1].childs; 35 | } else { 36 | $('.userAddress select[name=city]').attr("disabled","disabled"); 37 | } 38 | $(".userAddress select[name='city']").val(userInfo.city); //市 39 | //填充市级信息,同时调取区县信息列表 40 | var value = userInfo.city; 41 | if (value > 0) { 42 | address.areas(citys[$(".userAddress select[name=city] option[value='"+userInfo.city+"']").index()-1].childs); 43 | } else { 44 | $('.userAddress select[name=area]').attr("disabled","disabled"); 45 | } 46 | $(".userAddress select[name='area']").val(userInfo.area); //区 47 | form.render(); 48 | }) 49 | for(key in userInfo){ 50 | if(key.indexOf("like") != -1){ 51 | $(".userHobby input[name='"+key+"']").attr("checked","checked"); 52 | } 53 | } 54 | $(".userEmail").val(userInfo.userEmail); //用户邮箱 55 | $(".myself").val(userInfo.myself); //自我评价 56 | form.render(); 57 | } 58 | }) -------------------------------------------------------------------------------- /src/main/resources/static/js/main.js: -------------------------------------------------------------------------------- 1 | //获取系统时间 2 | var newDate = ''; 3 | getLangDate(); 4 | //值小于10时,在前面补0 5 | function dateFilter(date){ 6 | if(date < 10){return "0"+date;} 7 | return date; 8 | } 9 | function getLangDate(){ 10 | var dateObj = new Date(); //表示当前系统时间的Date对象 11 | var year = dateObj.getFullYear(); //当前系统时间的完整年份值 12 | var month = dateObj.getMonth()+1; //当前系统时间的月份值 13 | var date = dateObj.getDate(); //当前系统时间的月份中的日 14 | var day = dateObj.getDay(); //当前系统时间中的星期值 15 | var weeks = ["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]; 16 | var week = weeks[day]; //根据星期值,从数组中获取对应的星期字符串 17 | var hour = dateObj.getHours(); //当前系统时间的小时值 18 | var minute = dateObj.getMinutes(); //当前系统时间的分钟值 19 | var second = dateObj.getSeconds(); //当前系统时间的秒钟值 20 | var timeValue = "" +((hour >= 12) ? (hour >= 18) ? "晚上" : "下午" : "上午" ); //当前时间属于上午、晚上还是下午 21 | newDate = dateFilter(year)+"年"+dateFilter(month)+"月"+dateFilter(date)+"日 "+" "+dateFilter(hour)+":"+dateFilter(minute)+":"+dateFilter(second); 22 | document.getElementById("nowTime").innerHTML = timeValue+"好! 欢迎使用景点管理系统。当前时间为: "+newDate+" "+week; 23 | setTimeout("getLangDate()",1000); 24 | } 25 | 26 | layui.use(['form','element','layer','jquery'],function(){ 27 | var form = layui.form, 28 | layer = parent.layer === undefined ? layui.layer : top.layer, 29 | element = layui.element; 30 | $ = layui.jquery; 31 | //上次登录时间【此处应该从接口获取,实际使用中请自行更换】 32 | $(".loginTime").html(newDate.split("日")[0]+"日
"+newDate.split("日")[1]); 33 | //icon动画 34 | $(".panel a").hover(function(){ 35 | $(this).find(".layui-anim").addClass("layui-anim-scaleSpring"); 36 | },function(){ 37 | $(this).find(".layui-anim").removeClass("layui-anim-scaleSpring"); 38 | }) 39 | $(".panel a").click(function(){ 40 | parent.addTab($(this)); 41 | }) 42 | 43 | //系统基本参数 44 | if(window.sessionStorage.getItem("systemParameter")){ 45 | var systemParameter = JSON.parse(window.sessionStorage.getItem("systemParameter")); 46 | fillParameter(systemParameter); 47 | }else{ 48 | $.ajax({ 49 | url : "../json/systemParameter.json", 50 | type : "get", 51 | dataType : "json", 52 | success : function(data){ 53 | fillParameter(data); 54 | } 55 | }) 56 | } 57 | 58 | 59 | 60 | 61 | 62 | //填充数据方法 63 | function fillParameter(data){ 64 | //判断字段数据是否存在 65 | function nullData(data){ 66 | if(data == '' || data == "undefined"){ 67 | return "未定义"; 68 | }else{ 69 | return data; 70 | } 71 | } 72 | $(".version").text(nullData(data.version)); //当前版本 73 | $(".author").text(nullData(data.author)); //开发作者 74 | $(".homePage").text(nullData(data.homePage)); //网站首页 75 | $(".server").text(nullData(data.server)); //服务器环境 76 | $(".dataBase").text(nullData(data.dataBase)); //数据库版本 77 | $(".maxUpload").text(nullData(data.maxUpload)); //最大上传限制 78 | $(".userRights").text(nullData(data.userRights));//当前用户权限 79 | $(".introduce").text(nullData(data.introduce)) 80 | } 81 | 82 | 83 | 84 | //外部图标 85 | // $.get(iconUrl,function(data){ 86 | // $(".outIcons span").text(data.split(".icon-").length-1); 87 | // }) 88 | 89 | }) 90 | -------------------------------------------------------------------------------- /src/main/resources/static/json/navs.json: -------------------------------------------------------------------------------- 1 | { 2 | "contentManagement": [ 3 | { 4 | "title": "游客管理", 5 | "icon": "", 6 | "href": "page/user/userList.html", 7 | "spread": false 8 | 9 | }, 10 | { 11 | "title": "旅游管理", 12 | "icon": "", 13 | "href": "", 14 | "spread": false, 15 | "children": [ 16 | { 17 | "title": "国内外旅游线路", 18 | "icon": "", 19 | "href": "page/scenery/sceneryList.html", 20 | "spread": false 21 | }, 22 | { 23 | "title": "机票预定", 24 | "icon": "", 25 | "href": "page/flight/flightList.html", 26 | "spread": false 27 | }, 28 | { 29 | "title": "酒店预定", 30 | "icon": "", 31 | "href": "page/hotel/hotelList.html", 32 | "spread": false 33 | }, 34 | { 35 | "title": "出租车预定", 36 | "icon": "", 37 | "href": "page/car/carList.html", 38 | "spread": false 39 | } 40 | ] 41 | }, 42 | { 43 | "title": "留言管理", 44 | "icon": "", 45 | "href": "page/message/messageList.html", 46 | "spread": false 47 | } 48 | ] 49 | 50 | } 51 | 52 | 53 | -------------------------------------------------------------------------------- /src/main/resources/static/json/studentList.json: -------------------------------------------------------------------------------- 1 | { 2 | "code": 0, 3 | "msg": "", 4 | "count": 15, 5 | "data": [ 6 | { 7 | 8 | "studentId":"1", 9 | "studentName":"康育鑫", 10 | "studentNumber":"SA19225203", 11 | "studentGrade":"2019级软设2", 12 | "studentSex":"男", 13 | "studentPhoneNumber":"17850085595", 14 | "studentAddress":"苏州", 15 | "studentBirthday":"1995-05-23", 16 | "createTime":"2020-01-08 21:31:48", 17 | "updateTime":"2018-01-08 21:31:48" 18 | } 19 | ] 20 | } 21 | 22 | -------------------------------------------------------------------------------- /src/main/resources/static/json/systemParameter.json: -------------------------------------------------------------------------------- 1 | { 2 | "cmsName": "kyx的旅游后台管理", 3 | "version": "v1.0", 4 | "author": "康育鑫", 5 | "homePage": "index.html", 6 | "server": "LayUI框架,后台:Java1.8,SpringBoot + Mybatis框架", 7 | "dataBase": "MySQL5.8", 8 | "userRights": "普通管理员", 9 | "powerby": "copyright @2019 康育鑫" 10 | } -------------------------------------------------------------------------------- /src/main/resources/static/layui/css/modules/code.css: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.5 MIT License By https://www.layui.com */ 2 | html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #e2e2e2;border-left-width:6px;background-color:#F2F2F2;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:32px;line-height:32px;border-bottom:1px solid #e2e2e2}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 5px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none} -------------------------------------------------------------------------------- /src/main/resources/static/layui/css/modules/layer/default/icon-ext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/css/modules/layer/default/icon-ext.png -------------------------------------------------------------------------------- /src/main/resources/static/layui/css/modules/layer/default/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/css/modules/layer/default/icon.png -------------------------------------------------------------------------------- /src/main/resources/static/layui/css/modules/layer/default/loading-0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/css/modules/layer/default/loading-0.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/css/modules/layer/default/loading-1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/css/modules/layer/default/loading-1.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/css/modules/layer/default/loading-2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/css/modules/layer/default/loading-2.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/font/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/font/iconfont.eot -------------------------------------------------------------------------------- /src/main/resources/static/layui/font/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/font/iconfont.ttf -------------------------------------------------------------------------------- /src/main/resources/static/layui/font/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/font/iconfont.woff -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/0.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/1.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/10.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/10.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/11.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/11.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/12.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/12.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/13.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/13.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/14.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/14.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/15.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/15.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/16.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/16.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/17.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/17.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/18.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/18.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/19.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/19.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/2.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/20.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/20.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/21.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/21.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/22.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/22.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/23.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/23.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/24.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/24.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/25.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/25.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/26.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/26.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/27.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/27.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/28.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/28.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/29.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/29.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/3.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/30.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/30.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/31.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/31.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/32.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/32.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/33.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/33.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/34.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/34.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/35.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/35.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/36.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/36.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/37.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/37.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/38.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/38.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/39.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/39.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/4.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/40.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/40.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/41.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/41.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/42.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/42.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/43.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/43.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/44.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/44.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/45.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/45.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/46.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/46.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/47.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/47.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/48.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/48.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/49.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/49.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/5.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/50.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/50.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/51.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/51.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/52.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/52.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/53.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/53.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/54.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/54.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/55.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/55.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/56.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/56.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/57.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/57.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/58.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/58.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/59.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/59.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/6.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/60.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/60.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/61.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/61.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/62.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/62.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/63.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/63.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/64.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/64.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/65.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/65.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/66.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/66.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/67.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/67.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/68.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/68.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/69.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/69.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/7.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/7.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/70.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/70.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/71.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/71.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/8.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/8.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/images/face/9.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/layui/images/face/9.gif -------------------------------------------------------------------------------- /src/main/resources/static/layui/lay/modules/carousel.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.5 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var i=layui.$,n=(layui.hint(),layui.device(),{config:{},set:function(e){var n=this;return n.config=i.extend({},n.config,e),n},on:function(e,i){return layui.onevent.call(this,t,e,i)}}),t="carousel",a="layui-this",l=">*[carousel-item]>*",o="layui-carousel-left",r="layui-carousel-right",d="layui-carousel-prev",s="layui-carousel-next",u="layui-carousel-arrow",c="layui-carousel-ind",m=function(e){var t=this;t.config=i.extend({},t.config,n.config,e),t.render()};m.prototype.config={width:"600px",height:"280px",full:!1,arrow:"hover",indicator:"inside",autoplay:!0,interval:3e3,anim:"",trigger:"click",index:0},m.prototype.render=function(){var e=this,n=e.config;n.elem=i(n.elem),n.elem[0]&&(e.elemItem=n.elem.find(l),n.index<0&&(n.index=0),n.index>=e.elemItem.length&&(n.index=e.elemItem.length-1),n.interval<800&&(n.interval=800),n.full?n.elem.css({position:"fixed",width:"100%",height:"100%",zIndex:9999}):n.elem.css({width:n.width,height:n.height}),n.elem.attr("lay-anim",n.anim),e.elemItem.eq(n.index).addClass(a),e.elemItem.length<=1||(e.indicator(),e.arrow(),e.autoplay(),e.events()))},m.prototype.reload=function(e){var n=this;clearInterval(n.timer),n.config=i.extend({},n.config,e),n.render()},m.prototype.prevIndex=function(){var e=this,i=e.config,n=i.index-1;return n<0&&(n=e.elemItem.length-1),n},m.prototype.nextIndex=function(){var e=this,i=e.config,n=i.index+1;return n>=e.elemItem.length&&(n=0),n},m.prototype.addIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index+e,n.index>=i.elemItem.length&&(n.index=0)},m.prototype.subIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index-e,n.index<0&&(n.index=i.elemItem.length-1)},m.prototype.autoplay=function(){var e=this,i=e.config;i.autoplay&&(e.timer=setInterval(function(){e.slide()},i.interval))},m.prototype.arrow=function(){var e=this,n=e.config,t=i(['",'"].join(""));n.elem.attr("lay-arrow",n.arrow),n.elem.find("."+u)[0]&&n.elem.find("."+u).remove(),n.elem.append(t),t.on("click",function(){var n=i(this),t=n.attr("lay-type");e.slide(t)})},m.prototype.indicator=function(){var e=this,n=e.config,t=e.elemInd=i(['
    ',function(){var i=[];return layui.each(e.elemItem,function(e){i.push("")}),i.join("")}(),"
"].join(""));n.elem.attr("lay-indicator",n.indicator),n.elem.find("."+c)[0]&&n.elem.find("."+c).remove(),n.elem.append(t),"updown"===n.anim&&t.css("margin-top",-(t.height()/2)),t.find("li").on("hover"===n.trigger?"mouseover":n.trigger,function(){var t=i(this),a=t.index();a>n.index?e.slide("add",a-n.index):a/g,">").replace(/'/g,"'").replace(/"/g,""")),c.html('
  1. '+o.replace(/[\r\t\n]+/g,"
  2. ")+"
"),c.find(">.layui-code-h3")[0]||c.prepend('

'+(c.attr("lay-title")||e.title||"code")+(e.about?'layui.code':"")+"

");var d=c.find(">.layui-code-ol");c.addClass("layui-box layui-code-view"),(c.attr("lay-skin")||e.skin)&&c.addClass("layui-code-"+(c.attr("lay-skin")||e.skin)),(d.find("li").length/100|0)>0&&d.css("margin-left",(d.find("li").length/100|0)+"px"),(c.attr("lay-height")||e.height)&&d.css("max-height",c.attr("lay-height")||e.height)})})}).addcss("modules/code.css","skincodecss"); -------------------------------------------------------------------------------- /src/main/resources/static/layui/lay/modules/flow.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.5 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var l=layui.$,o=function(e){},t='';o.prototype.load=function(e){var o,i,n,r,a=this,c=0;e=e||{};var f=l(e.elem);if(f[0]){var m=l(e.scrollElem||document),u=e.mb||50,s=!("isAuto"in e)||e.isAuto,v=e.end||"没有更多了",y=e.scrollElem&&e.scrollElem!==document,d="加载更多",h=l('");f.find(".layui-flow-more")[0]||f.append(h);var p=function(e,t){e=l(e),h.before(e),t=0==t||null,t?h.html(v):h.find("a").html(d),i=t,o=null,n&&n()},g=function(){o=!0,h.find("a").html(t),"function"==typeof e.done&&e.done(++c,p)};if(g(),h.find("a").on("click",function(){l(this);i||o||g()}),e.isLazyimg)var n=a.lazyimg({elem:e.elem+" img",scrollElem:e.scrollElem});return s?(m.on("scroll",function(){var e=l(this),t=e.scrollTop();r&&clearTimeout(r),i||(r=setTimeout(function(){var i=y?e.height():l(window).height(),n=y?e.prop("scrollHeight"):document.documentElement.scrollHeight;n-t-i<=u&&(o||g())},100))}),a):a}},o.prototype.lazyimg=function(e){var o,t=this,i=0;e=e||{};var n=l(e.scrollElem||document),r=e.elem||"img",a=e.scrollElem&&e.scrollElem!==document,c=function(e,l){var o=n.scrollTop(),r=o+l,c=a?function(){return e.offset().top-n.offset().top+o}():e.offset().top;if(c>=o&&c<=r&&!e.attr("src")){var m=e.attr("lay-src");layui.img(m,function(){var l=t.lazyimg.elem.eq(i);e.attr("src",m).removeAttr("lay-src"),l[0]&&f(l),i++})}},f=function(e,o){var f=a?(o||n).height():l(window).height(),m=n.scrollTop(),u=m+f;if(t.lazyimg.elem=l(r),e)c(e,f);else for(var s=0;su)break}};if(f(),!o){var m;n.on("scroll",function(){var e=l(this);m&&clearTimeout(m),m=setTimeout(function(){f(null,e)},50)}),o=!0}return f},e("flow",new o)}); -------------------------------------------------------------------------------- /src/main/resources/static/layui/lay/modules/laytpl.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.5 MIT License By https://www.layui.com */ 2 | ;layui.define(function(e){"use strict";var r={open:"{{",close:"}}"},c={exp:function(e){return new RegExp(e,"g")},query:function(e,c,t){var o=["#([\\s\\S])+?","([^{#}])*?"][e||0];return n((c||"")+r.open+o+r.close+(t||""))},escape:function(e){return String(e||"").replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")},error:function(e,r){var c="Laytpl Error:";return"object"==typeof console&&console.error(c+e+"\n"+(r||"")),c+e}},n=c.exp,t=function(e){this.tpl=e};t.pt=t.prototype,window.errors=0,t.pt.parse=function(e,t){var o=this,p=e,a=n("^"+r.open+"#",""),l=n(r.close+"$","");e=e.replace(/\s+|\r|\t|\n/g," ").replace(n(r.open+"#"),r.open+"# ").replace(n(r.close+"}"),"} "+r.close).replace(/\\/g,"\\\\").replace(n(r.open+"!(.+?)!"+r.close),function(e){return e=e.replace(n("^"+r.open+"!"),"").replace(n("!"+r.close),"").replace(n(r.open+"|"+r.close),function(e){return e.replace(/(.)/g,"\\$1")})}).replace(/(?="|')/g,"\\").replace(c.query(),function(e){return e=e.replace(a,"").replace(l,""),'";'+e.replace(/\\/g,"")+';view+="'}).replace(c.query(1),function(e){var c='"+(';return e.replace(/\s/g,"")===r.open+r.close?"":(e=e.replace(n(r.open+"|"+r.close),""),/^=/.test(e)&&(e=e.replace(/^=/,""),c='"+_escape_('),c+e.replace(/\\/g,"")+')+"')}),e='"use strict";var view = "'+e+'";return view;';try{return o.cache=e=new Function("d, _escape_",e),e(t,c.escape)}catch(u){return delete o.cache,c.error(u,p)}},t.pt.render=function(e,r){var n,t=this;return e?(n=t.cache?t.cache(e,c.escape):t.parse(t.tpl,e),r?void r(n):n):c.error("no data")};var o=function(e){return"string"!=typeof e?c.error("Template not found"):new t(e)};o.config=function(e){e=e||{};for(var c in e)r[c]=e[c]},o.v="1.2.0",e("laytpl",o)}); -------------------------------------------------------------------------------- /src/main/resources/static/layui/lay/modules/rate.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.5 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var a=layui.jquery,i={config:{},index:layui.rate?layui.rate.index+1e4:0,set:function(e){var i=this;return i.config=a.extend({},i.config,e),i},on:function(e,a){return layui.onevent.call(this,n,e,a)}},l=function(){var e=this,a=e.config;return{setvalue:function(a){e.setvalue.call(e,a)},config:a}},n="rate",t="layui-rate",o="layui-icon-rate",s="layui-icon-rate-solid",u="layui-icon-rate-half",r="layui-icon-rate-solid layui-icon-rate-half",c="layui-icon-rate-solid layui-icon-rate",f="layui-icon-rate layui-icon-rate-half",v=function(e){var l=this;l.index=++i.index,l.config=a.extend({},l.config,i.config,e),l.render()};v.prototype.config={length:5,text:!1,readonly:!1,half:!1,value:0,theme:""},v.prototype.render=function(){var e=this,i=e.config,l=i.theme?'style="color: '+i.theme+';"':"";i.elem=a(i.elem),parseInt(i.value)!==i.value&&(i.half||(i.value=Math.ceil(i.value)-i.value<.5?Math.ceil(i.value):Math.floor(i.value)));for(var n='
    ",u=1;u<=i.length;u++){var r='
  • ";i.half&&parseInt(i.value)!==i.value&&u==Math.ceil(i.value)?n=n+'
  • ":n+=r}n+="
"+(i.text?''+i.value+"星":"")+"";var c=i.elem,f=c.next("."+t);f[0]&&f.remove(),e.elemTemp=a(n),i.span=e.elemTemp.next("span"),i.setText&&i.setText(i.value),c.html(e.elemTemp),c.addClass("layui-inline"),i.readonly||e.action()},v.prototype.setvalue=function(e){var a=this,i=a.config;i.value=e,a.render()},v.prototype.action=function(){var e=this,i=e.config,l=e.elemTemp,n=l.find("i").width();l.children("li").each(function(e){var t=e+1,v=a(this);v.on("click",function(e){if(i.value=t,i.half){var o=e.pageX-a(this).offset().left;o<=n/2&&(i.value=i.value-.5)}i.text&&l.next("span").text(i.value+"星"),i.choose&&i.choose(i.value),i.setText&&i.setText(i.value)}),v.on("mousemove",function(e){if(l.find("i").each(function(){a(this).addClass(o).removeClass(r)}),l.find("i:lt("+t+")").each(function(){a(this).addClass(s).removeClass(f)}),i.half){var c=e.pageX-a(this).offset().left;c<=n/2&&v.children("i").addClass(u).removeClass(s)}}),v.on("mouseleave",function(){l.find("i").each(function(){a(this).addClass(o).removeClass(r)}),l.find("i:lt("+Math.floor(i.value)+")").each(function(){a(this).addClass(s).removeClass(f)}),i.half&&parseInt(i.value)!==i.value&&l.children("li:eq("+Math.floor(i.value)+")").children("i").addClass(u).removeClass(c)})})},v.prototype.events=function(){var e=this;e.config},i.render=function(e){var a=new v(e);return l.call(a)},e(n,i)}); -------------------------------------------------------------------------------- /src/main/resources/static/layui/lay/modules/tree.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.5 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var o=layui.$,a=layui.hint(),i="layui-tree-enter",r=function(e){this.options=e},t={arrow:["",""],checkbox:["",""],radio:["",""],branch:["",""],leaf:""};r.prototype.init=function(e){var o=this;e.addClass("layui-box layui-tree"),o.options.skin&&e.addClass("layui-tree-skin-"+o.options.skin),o.tree(e),o.on(e)},r.prototype.tree=function(e,a){var i=this,r=i.options,n=a||r.nodes;layui.each(n,function(a,n){var l=n.children&&n.children.length>0,c=o('
    '),s=o(["
  • ",function(){return l?''+(n.spread?t.arrow[1]:t.arrow[0])+"":""}(),function(){return r.check?''+("checkbox"===r.check?t.checkbox[0]:"radio"===r.check?t.radio[0]:"")+"":""}(),function(){return'"+(''+(l?n.spread?t.branch[1]:t.branch[0]:t.leaf)+"")+(""+(n.name||"未命名")+"")}(),"
  • "].join(""));l&&(s.append(c),i.tree(c,n.children)),e.append(s),"function"==typeof r.click&&i.click(s,n),i.spread(s,n),r.drag&&i.drag(s,n)})},r.prototype.click=function(e,o){var a=this,i=a.options;e.children("a").on("click",function(e){layui.stope(e),i.click(o)})},r.prototype.spread=function(e,o){var a=this,i=(a.options,e.children(".layui-tree-spread")),r=e.children("ul"),n=e.children("a"),l=function(){e.data("spread")?(e.data("spread",null),r.removeClass("layui-show"),i.html(t.arrow[0]),n.find(".layui-icon").html(t.branch[0])):(e.data("spread",!0),r.addClass("layui-show"),i.html(t.arrow[1]),n.find(".layui-icon").html(t.branch[1]))};r[0]&&(i.on("click",l),n.on("dblclick",l))},r.prototype.on=function(e){var a=this,r=a.options,t="layui-tree-drag";e.find("i").on("selectstart",function(e){return!1}),r.drag&&o(document).on("mousemove",function(e){var i=a.move;if(i.from){var r=(i.to,o('
    '));e.preventDefault(),o("."+t)[0]||o("body").append(r);var n=o("."+t)[0]?o("."+t):r;n.addClass("layui-show").html(i.from.elem.children("a").html()),n.css({left:e.pageX+10,top:e.pageY+10})}}).on("mouseup",function(){var e=a.move;e.from&&(e.from.elem.children("a").removeClass(i),e.to&&e.to.elem.children("a").removeClass(i),a.move={},o("."+t).remove())})},r.prototype.move={},r.prototype.drag=function(e,a){var r=this,t=(r.options,e.children("a")),n=function(){var t=o(this),n=r.move;n.from&&(n.to={item:a,elem:e},t.addClass(i))};t.on("mousedown",function(){var o=r.move;o.from={item:a,elem:e}}),t.on("mouseenter",n).on("mousemove",n).on("mouseleave",function(){var e=o(this),a=r.move;a.from&&(delete a.to,e.removeClass(i))})},e("tree",function(e){var i=new r(e=e||{}),t=o(e.elem);return t[0]?void i.init(t):a.error("layui.tree 没有找到"+e.elem+"元素")})}); -------------------------------------------------------------------------------- /src/main/resources/static/layui/lay/modules/util.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.4.5 MIT License By https://www.layui.com */ 2 | ;layui.define("jquery",function(t){"use strict";var e=layui.$,i={fixbar:function(t){var i,a,n="layui-fixbar",r="layui-fixbar-top",o=e(document),l=e("body");t=e.extend({showHeight:200},t),t.bar1=t.bar1===!0?"":t.bar1,t.bar2=t.bar2===!0?"":t.bar2,t.bgcolor=t.bgcolor?"background-color:"+t.bgcolor:"";var c=[t.bar1,t.bar2,""],g=e(['
      ',t.bar1?'
    • '+c[0]+"
    • ":"",t.bar2?'
    • '+c[1]+"
    • ":"",'
    • '+c[2]+"
    • ","
    "].join("")),s=g.find("."+r),u=function(){var e=o.scrollTop();e>=t.showHeight?i||(s.show(),i=1):i&&(s.hide(),i=0)};e("."+n)[0]||("object"==typeof t.css&&g.css(t.css),l.append(g),u(),g.find("li").on("click",function(){var i=e(this),a=i.attr("lay-type");"top"===a&&e("html,body").animate({scrollTop:0},200),t.click&&t.click.call(this,a)}),o.on("scroll",function(){clearTimeout(a),a=setTimeout(function(){u()},100)}))},countdown:function(t,e,i){var a=this,n="function"==typeof e,r=new Date(t).getTime(),o=new Date(!e||n?(new Date).getTime():e).getTime(),l=r-o,c=[Math.floor(l/864e5),Math.floor(l/36e5)%24,Math.floor(l/6e4)%60,Math.floor(l/1e3)%60];n&&(i=e);var g=setTimeout(function(){a.countdown(t,o+1e3,i)},1e3);return i&&i(l>0?c:[0,0,0,0],e,g),l<=0&&clearTimeout(g),g},timeAgo:function(t,e){var i=this,a=[[],[]],n=(new Date).getTime()-new Date(t).getTime();return n>6912e5?(n=new Date(t),a[0][0]=i.digit(n.getFullYear(),4),a[0][1]=i.digit(n.getMonth()+1),a[0][2]=i.digit(n.getDate()),e||(a[1][0]=i.digit(n.getHours()),a[1][1]=i.digit(n.getMinutes()),a[1][2]=i.digit(n.getSeconds())),a[0].join("-")+" "+a[1].join(":")):n>=864e5?(n/1e3/60/60/24|0)+"天前":n>=36e5?(n/1e3/60/60|0)+"小时前":n>=12e4?(n/1e3/60|0)+"分钟前":n<0?"未来":"刚刚"},digit:function(t,e){var i="";t=String(t),e=e||2;for(var a=t.length;a/g,">").replace(/'/g,"'").replace(/"/g,""")}};!function(t,e,i){"$:nomunge";function a(){n=e[l](function(){r.each(function(){var e=t(this),i=e.width(),a=e.height(),n=t.data(this,g);(i!==n.w||a!==n.h)&&e.trigger(c,[n.w=i,n.h=a])}),a()},o[s])}var n,r=t([]),o=t.resize=t.extend(t.resize,{}),l="setTimeout",c="resize",g=c+"-special-event",s="delay",u="throttleWindow";o[s]=250,o[u]=!0,t.event.special[c]={setup:function(){if(!o[u]&&this[l])return!1;var e=t(this);r=r.add(e),t.data(this,g,{w:e.width(),h:e.height()}),1===r.length&&a()},teardown:function(){if(!o[u]&&this[l])return!1;var e=t(this);r=r.not(e),e.removeData(g),r.length||clearTimeout(n)},add:function(e){function a(e,a,r){var o=t(this),l=t.data(this,g)||{};l.w=a!==i?a:o.width(),l.h=r!==i?r:o.height(),n.apply(this,arguments)}if(!o[u]&&this[l])return!1;var n;return t.isFunction(e)?(n=e,a):(n=e.handler,void(e.handler=a))}}}(e,window),t("util",i)}); -------------------------------------------------------------------------------- /src/main/resources/static/my-font/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/my-font/iconfont.eot -------------------------------------------------------------------------------- /src/main/resources/static/my-font/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/my-font/iconfont.ttf -------------------------------------------------------------------------------- /src/main/resources/static/my-font/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/my-font/iconfont.woff -------------------------------------------------------------------------------- /src/main/resources/static/my-font/iconfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/src/main/resources/static/my-font/iconfont.woff2 -------------------------------------------------------------------------------- /src/main/resources/static/page/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 404--layui后台管理模板 2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
    17 |
    18 | 19 | 20 |
    21 |
    22 | 23 |

    我勒个去,页面被外星人挟持了!

    24 |
    25 |
    26 | 27 | 28 | -------------------------------------------------------------------------------- /src/main/resources/static/page/car/addCar.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 考勤列表 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
    19 |
    20 |
    21 |
    22 | 23 | 24 |
    25 | 26 |
    27 | 28 |
    29 |
    30 | 31 |
    32 | 33 |
    34 | 35 |
    36 |
    37 | 38 |
    39 | 40 |
    41 | 42 |
    43 |
    44 | 45 | 46 | 47 |
    48 | 49 |
    50 | 51 | 52 | 53 |
    54 |
    55 | 56 |
    57 |
    58 | 59 | 69 | 70 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /src/main/resources/static/page/car/carList.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
    18 | 19 |
    20 | 21 | 22 |
    23 |
    24 | 25 |
    26 | 搜索 27 |
    28 | 29 |
    30 | 添加出租车 31 |
    32 | 33 | 34 | 35 | 36 | 37 |
    38 | 39 |
    40 | 41 | 42 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /src/main/resources/static/page/car/carList.js: -------------------------------------------------------------------------------- 1 | layui.use(['form','layer','laydate','table','laytpl'],function(){ 2 | var form = layui.form, 3 | layer = parent.layer === undefined ? layui.layer : top.layer, 4 | $ = layui.jquery, 5 | laydate = layui.laydate, 6 | laytpl = layui.laytpl, 7 | table = layui.table; 8 | 9 | //新闻列表 10 | var tableIns = table.render({ 11 | elem: '#carList', 12 | url : '/findAllCar', 13 | cellMinWidth : 95, 14 | page : true, 15 | height : "full-100", 16 | limit : 20, 17 | limits:[10,15,20,25], 18 | id : "carListTable", 19 | cols:[[ 20 | {type: 'checkbox', fixed:'left', }, 21 | {type:'numbers',title:'序号'}, 22 | {field: 'carId', title: 'ID', width:80, align:"center"}, 23 | {field: 'carPrice', title: '价格',width:80,align:"center"}, 24 | {field: 'carSeats', title: '座位数',align:'center'}, 25 | {field: 'carLocation', title: '地址',align:'center'}, 26 | {title: '操作', templet:'#carOperate',width:120,fixed:"right",align:"center"} 27 | ]] 28 | }); 29 | 30 | function addCar(){ 31 | var index = layui.layer.open({ 32 | title : "添加出租车", 33 | type : 2, 34 | content : "addCar.html", 35 | }) 36 | layui.layer.full(index); 37 | //改变窗口大小时,重置弹窗的宽高,防止超出可视区域(如F12调出debug的操作) 38 | $(window).on("resize",function(){ 39 | layui.layer.full(index); 40 | }) 41 | } 42 | 43 | 44 | $(".addCar_btn").click(function(){ 45 | addCar(); 46 | }) 47 | 48 | 49 | //编辑机票 50 | function editCar(edit){ 51 | var index = layui.layer.open({ 52 | title : "编辑", 53 | type : 2, 54 | content : "editCar.html", 55 | success : function(layero, index){ 56 | var body = layui.layer.getChildFrame('body', index); 57 | if(edit){ 58 | body.find(".carId").val(edit.carId); 59 | body.find(".carPrice").val(edit.carPrice); 60 | body.find(".carSeats").val(edit.carSeats); 61 | body.find(".carLocation").val(edit.carLocation); 62 | form.render(); 63 | } 64 | setTimeout(function(){ 65 | layui.layer.tips('点击此处返回出租车列表', '.layui-layer-setwin .layui-layer-close', { 66 | tips: 3 67 | }); 68 | },500) 69 | } 70 | }) 71 | layui.layer.full(index); 72 | //改变窗口大小时,重置弹窗的宽高,防止超出可视区域(如F12调出debug的操作) 73 | $(window).on("resize",function(){ 74 | layui.layer.full(index); 75 | }) 76 | } 77 | 78 | //列表操作 79 | table.on('tool(carList)', function(obj){ 80 | var layEvent = obj.event, 81 | data = obj.data; 82 | 83 | if(layEvent === 'edit'){ //编辑 84 | 85 | editCar(data); 86 | 87 | } else if(layEvent === 'del'){ //删除 88 | layer.confirm('确定删除此出租车?',{icon:3, title:'提示信息'},function(index){ 89 | $.post("/deleteCarById",{ 90 | id : data.carId //将需要删除的newsId作为参数传入 91 | },function(data){ 92 | // tableIns.reload(); 93 | layer.close(index); 94 | layer.msg("权限不够!"); 95 | 96 | }) 97 | }); 98 | } else if(layEvent === 'look'){ //预览 99 | layer.alert("此功能需要前台展示,实际开发中传入对应的必要参数进行文章内容页面访问") 100 | } 101 | }); 102 | 103 | 104 | }) -------------------------------------------------------------------------------- /src/main/resources/static/page/car/editCar.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
    18 |
    19 |
    20 |
    21 | 22 | 23 | 29 | 30 | 31 |
    32 | 33 |
    34 | 35 |
    36 |
    37 | 38 |
    39 | 40 |
    41 | 42 |
    43 |
    44 | 45 | 46 |
    47 | 48 |
    49 | 50 |
    51 |
    52 | 53 | 54 |
    55 | 56 |
    57 | 58 | 59 |
    60 | 61 |
    62 | 63 | 64 | 74 | 75 | 103 | 104 | 105 | -------------------------------------------------------------------------------- /src/main/resources/static/page/car/editCar.js: -------------------------------------------------------------------------------- 1 | layui.use(['form','layer','layedit','laydate','upload'],function(){ 2 | var form = layui.form 3 | layer = parent.layer === undefined ? layui.layer : top.layer, 4 | laypage = layui.laypage, 5 | upload = layui.upload, 6 | layedit = layui.layedit, 7 | laydate = layui.laydate, 8 | $ = layui.jquery; 9 | 10 | //用于同步编辑器内容到textarea 11 | layedit.sync(editIndex); 12 | 13 | 14 | //格式化时间 15 | function filterTime(val){ 16 | if(val < 10){ 17 | return "0" + val; 18 | }else{ 19 | return val; 20 | } 21 | } 22 | 23 | //创建一个编辑器 24 | var editIndex = layedit.build('news_content',{ 25 | height : 535, 26 | uploadImage : { 27 | url : "../../json/newsImg.json" 28 | } 29 | }); 30 | 31 | 32 | 33 | }) -------------------------------------------------------------------------------- /src/main/resources/static/page/doc/addressDoc.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 三级联动使用文档--layui后台管理模板 2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
    17 | address模块是封装的一个省市区三级联动的功能,可以和form、layer等模块一样通过模块化引入进行使用。唯一的不同就是模块的存放路径和使用时的配置。下面将对此区别进行详细的描述。 18 |
    19 |
    20 | 模块加载名称:address 21 |
    22 |
    23 | 核心方法 24 |
    25 |

    语法:layui.address()

    26 |
    27 | 		layui.use('address', function(){
    28 | 		  var layui.address();
    29 | 		});
    30 | 	
    31 |

    上面说过,模块相对页面的存放路径不同,使用时也需要进行不同的配置。如果页面和此模块属于同级关系,则不用进行任何配置,直接引入即可使用。如果它们不属于同级关系,则需要通过查找address.js文件相对xx.js文件的相对路径进行配置,如:address.js文件与a文件夹属于同级,而a文件夹中包含b文件夹,b文件夹中包含xx.js,通过xx.js引入address模块则进行下面的配置

    32 |
    33 | 		layui.config({
    34 | 		  base : "../../js/"  //如果a文件夹中直接就是xx.js文件,则为“../js/”
    35 | 		}).extend({
    36 | 		  "address" : "address"
    37 | 		})
    38 | 	
    39 |
    40 | HTML数据格式 41 |
    42 |

    下面是HTML数据格式,其中select的name值和lay-filter值是固定不可改变的,因为模块中是通过查找对应name的select进行的赋值,通过form.on("select(filter)")执行选择的方法,所以这两个值是不可以随意更改的。如果需要改变请将模块源码中对应的值一同修改。另外需要注意的是“市”、“区/县”的select需要添加一个disabled属性,主要是为了避免在没有选择省份的情况下先选择市、区造成错误。

    43 |
    44 | 		//省份select
    45 | 		<select name="province" lay-filter="province">
    46 | 		  <option value="">请选择省</option>
    47 | 		</select>
    48 | 		//市select
    49 | 		<select name="city" lay-filter="city" disabled>
    50 | 		  <option value="">请选择市</option>
    51 | 		</select>
    52 | 		//区/县select
    53 | 		<select name="area" lay-filter="area" disabled>
    54 | 		  <option value="">请选择县/区</option>
    55 | 		</select>
    56 | 	
    57 |
    58 | JSON数据格式 59 |
    60 |

    其中code为地区id,用于给option赋值;name为地区名称,用于设置option的text;childs为当前区域的下级地区。

    61 |
    62 | 		[{
    63 | 		  "code": "11",
    64 | 		  "name": "北京市",
    65 | 		  "childs": [{
    66 | 		      "code": "1101",
    67 | 		      "name": "市辖区",
    68 | 		      "childs": [{
    69 | 		          "code": "110101",
    70 | 		          "name": "东城区"
    71 | 		      }]
    72 | 		  }]
    73 | 		}]
    74 | 	
    75 | 76 | 83 | 84 | -------------------------------------------------------------------------------- /src/main/resources/static/page/doc/navDoc.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 三级菜单使用文档--layui后台管理模板 2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
    17 | 其实本模版中的三级菜单的展示方式和实际开发中的做法是不一样的,下面将说一下本模版中的做法 18 |
    19 |
    20 | 实际开发 21 |
    22 |

    在实际的开发中,无论是顶部菜单还是左侧菜单都应该是通过接口获取的。首先获取顶部菜单,然后点击顶级菜单通过传参再次访问接口来获取二级、三级菜单。

    23 |
    24 | 本模版的做法 25 |
    26 |

    由于顶部菜单是大分类,不会有太多,所以在本模版中是直接写死的,代码如下【具体请看index.html第25-36行】:

    27 |
    28 | 		<dd data-menu="seraphApi"><a href="javascript:;"><i class="layui-icon" data-icon="&#xe705;">&#xe705;</i><cite>使用文档</cite></a></dd>
    29 | 		请注意这里面的“data-menu”属性,此属性值需要和json中的字段名对应以便能够进行通过此属性查找对应的子菜单
    30 | 	
    31 |

    然后通过index.js中的代码进行循环渲染,就成了当前大家看到的这个样子了,js代码如下【具体请看index.js中的第18-38行】:

    32 |
    33 | 		function getData(json){
    34 | 		    $.get("接口路径",function(data){
    35 | 		        if(json == "contentManagement"){   //此处即实际开发中传递的参数
    36 | 		            dataStr = data.contentManagement;   //获取到当前顶级菜单下的子菜单渲染到左侧
    37 | 		            tab.render();
    38 | 		        }
    39 | 		    })
    40 | 		}
    41 | 	
    42 |
    43 |

    如果不动大框架的前提下,请严格按照菜单数据格式返回数据,菜单数据格式请参考:bodyTab模块去看看菜单数据格式

    44 |
    45 | 46 | 47 | 65 | 66 | -------------------------------------------------------------------------------- /src/main/resources/static/page/flight/addFlight.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 考勤列表 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
    19 |
    20 |
    21 |
    22 | 23 |
    24 | 25 |
    26 | 27 |
    28 |
    29 | 30 |
    31 | 32 |
    33 | 34 |
    35 |
    36 | 37 |
    38 | 39 |
    40 | 41 |
    42 |
    43 | 44 |
    45 | 46 |
    47 | 48 |
    49 |
    50 | 51 | 52 | 53 |
    54 | 55 |
    56 | 57 | 58 | 59 |
    60 |
    61 | 62 |
    63 |
    64 | 65 | 75 | 76 | 101 | 102 | 103 | -------------------------------------------------------------------------------- /src/main/resources/static/page/flight/editFlight.js: -------------------------------------------------------------------------------- 1 | layui.use(['form','layer','layedit','laydate','upload'],function(){ 2 | var form = layui.form 3 | layer = parent.layer === undefined ? layui.layer : top.layer, 4 | laypage = layui.laypage, 5 | upload = layui.upload, 6 | layedit = layui.layedit, 7 | laydate = layui.laydate, 8 | $ = layui.jquery; 9 | 10 | //用于同步编辑器内容到textarea 11 | layedit.sync(editIndex); 12 | 13 | 14 | //格式化时间 15 | function filterTime(val){ 16 | if(val < 10){ 17 | return "0" + val; 18 | }else{ 19 | return val; 20 | } 21 | } 22 | 23 | 24 | //创建一个编辑器 25 | var editIndex = layedit.build('news_content',{ 26 | height : 535, 27 | uploadImage : { 28 | url : "../../json/newsImg.json" 29 | } 30 | }); 31 | 32 | 33 | 34 | }) -------------------------------------------------------------------------------- /src/main/resources/static/page/flight/flightList.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
    18 | 19 |
    20 | 21 | 22 |
    23 |
    24 | 25 |
    26 | 搜索 27 |
    28 | 29 |
    30 | 添加航班 31 |
    32 | 33 | 34 | 35 | 36 | 37 |
    38 | 39 |
    40 | 41 | 42 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /src/main/resources/static/page/flight/flightList.js: -------------------------------------------------------------------------------- 1 | layui.use(['form','layer','laydate','table','laytpl'],function(){ 2 | var form = layui.form, 3 | layer = parent.layer === undefined ? layui.layer : top.layer, 4 | $ = layui.jquery, 5 | laydate = layui.laydate, 6 | laytpl = layui.laytpl, 7 | table = layui.table; 8 | 9 | //新闻列表 10 | var tableIns = table.render({ 11 | elem: '#flightList', 12 | url : '/findAllFlight', 13 | cellMinWidth : 95, 14 | page : true, 15 | height : "full-100", 16 | limit : 20, 17 | limits:[10,15,20,25], 18 | id : "flightListTable", 19 | cols:[[ 20 | {type: 'checkbox', fixed:'left', }, 21 | {type:'numbers',title:'序号'}, 22 | {field: 'flightId', title: 'ID', width:80, align:"center"}, 23 | {field: 'flightPrice', title: '价格',width:80,align:"center"}, 24 | {field: 'flightSeats', title: '座位数',align:'center'}, 25 | {field: 'flightFromCity', title: '出发地',align:'center'}, 26 | {field: 'flightToCity', title: '目的地',width:120, align:'center'}, 27 | {title: '操作', templet:'#flightOperate',width:120,fixed:"right",align:"center"} 28 | ]] 29 | }); 30 | 31 | function addFlight(){ 32 | var index = layui.layer.open({ 33 | title : "添加航班", 34 | type : 2, 35 | content : "addFlight.html", 36 | }) 37 | layui.layer.full(index); 38 | //改变窗口大小时,重置弹窗的宽高,防止超出可视区域(如F12调出debug的操作) 39 | $(window).on("resize",function(){ 40 | layui.layer.full(index); 41 | }) 42 | } 43 | 44 | 45 | $(".addFlight_btn").click(function(){ 46 | addFlight(); 47 | }) 48 | 49 | 50 | //编辑机票 51 | function editFlight(edit){ 52 | var index = layui.layer.open({ 53 | title : "编辑", 54 | type : 2, 55 | content : "editFlight.html", 56 | success : function(layero, index){ 57 | var body = layui.layer.getChildFrame('body', index); 58 | if(edit){ 59 | body.find(".flightId").val(edit.flightId); 60 | body.find(".flightPrice").val(edit.flightPrice); 61 | body.find(".flightSeats").val(edit.flightSeats); 62 | body.find(".flightFromCity").val(edit.flightFromCity); 63 | body.find(".flightToCity").val(edit.flightToCity); 64 | 65 | form.render(); 66 | } 67 | setTimeout(function(){ 68 | layui.layer.tips('点击此处返回机票列表', '.layui-layer-setwin .layui-layer-close', { 69 | tips: 3 70 | }); 71 | },500) 72 | } 73 | }) 74 | layui.layer.full(index); 75 | //改变窗口大小时,重置弹窗的宽高,防止超出可视区域(如F12调出debug的操作) 76 | $(window).on("resize",function(){ 77 | layui.layer.full(index); 78 | }) 79 | } 80 | 81 | //列表操作 82 | table.on('tool(flightList)', function(obj){ 83 | var layEvent = obj.event, 84 | data = obj.data; 85 | 86 | if(layEvent === 'edit'){ //编辑 87 | 88 | editFlight(data); 89 | 90 | } else if(layEvent === 'del'){ //删除 91 | layer.confirm('确定删除此机票?',{icon:3, title:'提示信息'},function(index){ 92 | $.post("/deleteFlightById",{ 93 | id : data.flightId //将需要删除的newsId作为参数传入 94 | },function(data){ 95 | // tableIns.reload(); 96 | layer.close(index); 97 | layer.msg("权限不够!"); 98 | 99 | }) 100 | }); 101 | } else if(layEvent === 'look'){ //预览 102 | layer.alert("此功能需要前台展示,实际开发中传入对应的必要参数进行文章内容页面访问") 103 | } 104 | }); 105 | 106 | 107 | }) -------------------------------------------------------------------------------- /src/main/resources/static/page/hotel/addHotel.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 考勤列表 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
    19 |
    20 |
    21 |
    22 | 23 |
    24 | 25 |
    26 | 27 |
    28 |
    29 | 30 |
    31 | 32 |
    33 | 34 |
    35 |
    36 | 37 |
    38 | 39 |
    40 | 41 |
    42 |
    43 | 44 |
    45 | 46 |
    47 | 48 |
    49 |
    50 | 51 | 52 | 53 |
    54 | 55 |
    56 | 57 | 58 | 59 |
    60 |
    61 | 62 |
    63 |
    64 | 65 | 75 | 76 | 101 | 102 | 103 | -------------------------------------------------------------------------------- /src/main/resources/static/page/hotel/editHotel.js: -------------------------------------------------------------------------------- 1 | layui.use(['form','layer','layedit','laydate','upload'],function(){ 2 | var form = layui.form 3 | layer = parent.layer === undefined ? layui.layer : top.layer, 4 | laypage = layui.laypage, 5 | upload = layui.upload, 6 | layedit = layui.layedit, 7 | laydate = layui.laydate, 8 | $ = layui.jquery; 9 | 10 | //用于同步编辑器内容到textarea 11 | layedit.sync(editIndex); 12 | 13 | 14 | //格式化时间 15 | function filterTime(val){ 16 | if(val < 10){ 17 | return "0" + val; 18 | }else{ 19 | return val; 20 | } 21 | } 22 | 23 | //预览 24 | form.on("submit(look)",function(){ 25 | layer.alert("此功能需要前台展示,实际开发中传入对应的必要参数进行文章内容页面访问"); 26 | return false; 27 | }) 28 | 29 | //创建一个编辑器 30 | var editIndex = layedit.build('news_content',{ 31 | height : 535, 32 | uploadImage : { 33 | url : "../../json/newsImg.json" 34 | } 35 | }); 36 | 37 | 38 | 39 | 40 | }) -------------------------------------------------------------------------------- /src/main/resources/static/page/hotel/hotelList.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
    18 | 19 |
    20 | 21 | 22 |
    23 |
    24 | 25 |
    26 | 搜索 27 |
    28 | 29 |
    30 | 添加酒店 31 |
    32 | 33 | 34 | 35 | 36 | 37 |
    38 | 39 |
    40 | 41 | 42 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /src/main/resources/static/page/hotel/hotelList.js: -------------------------------------------------------------------------------- 1 | layui.use(['form','layer','laydate','table','laytpl'],function(){ 2 | var form = layui.form, 3 | layer = parent.layer === undefined ? layui.layer : top.layer, 4 | $ = layui.jquery, 5 | laydate = layui.laydate, 6 | laytpl = layui.laytpl, 7 | table = layui.table; 8 | 9 | //新闻列表 10 | var tableIns = table.render({ 11 | elem: '#hotelList', 12 | url : '/findAllHotel', 13 | cellMinWidth : 95, 14 | page : true, 15 | height : "full-100", 16 | limit : 20, 17 | limits:[10,15,20,25], 18 | id : "hotelListTable", 19 | cols:[[ 20 | {type: 'checkbox', fixed:'left', }, 21 | {type:'numbers',title:'序号'}, 22 | {field: 'hotelId', title: 'ID', width:80, align:"center"}, 23 | {field: 'hotelName', title: '酒店名',width:80,align:"center"}, 24 | {field: 'hotelPrice', title: '价格',align:'center'}, 25 | {field: 'hotelLocation', title: '地址',align:'center'}, 26 | {field: 'hotelRooms', title: '房间数',width:120, align:'center'}, 27 | {title: '操作', templet:'#hotelOperate',width:120,fixed:"right",align:"center"} 28 | ]] 29 | }); 30 | 31 | 32 | //编辑机票 33 | function editHotel(edit){ 34 | var index = layui.layer.open({ 35 | title : "编辑", 36 | type : 2, 37 | content : "editHotel.html", 38 | success : function(layero, index){ 39 | var body = layui.layer.getChildFrame('body', index); 40 | if(edit){ 41 | body.find(".hotelId").val(edit.hotelId); 42 | body.find(".hotelName").val(edit.hotelName); 43 | body.find(".hotelPrice").val(edit.hotelPrice); 44 | body.find(".hotelLocation").val(edit.hotelLocation); 45 | body.find(".hotelRooms").val(edit.hotelRooms); 46 | 47 | form.render(); 48 | } 49 | setTimeout(function(){ 50 | layui.layer.tips('点击此处返回酒店列表', '.layui-layer-setwin .layui-layer-close', { 51 | tips: 3 52 | }); 53 | },500) 54 | } 55 | }) 56 | layui.layer.full(index); 57 | //改变窗口大小时,重置弹窗的宽高,防止超出可视区域(如F12调出debug的操作) 58 | $(window).on("resize",function(){ 59 | layui.layer.full(index); 60 | }) 61 | } 62 | 63 | //添加酒店 64 | function addHotel(){ 65 | var index = layui.layer.open({ 66 | title : "添加酒店", 67 | type : 2, 68 | content : "addHotel.html", 69 | }) 70 | layui.layer.full(index); 71 | //改变窗口大小时,重置弹窗的宽高,防止超出可视区域(如F12调出debug的操作) 72 | $(window).on("resize",function(){ 73 | layui.layer.full(index); 74 | }) 75 | } 76 | 77 | 78 | $(".addHotel_btn").click(function(){ 79 | addHotel(); 80 | }) 81 | 82 | //列表操作 83 | table.on('tool(hotelList)', function(obj){ 84 | var layEvent = obj.event, 85 | data = obj.data; 86 | 87 | if(layEvent === 'edit'){ //编辑 88 | 89 | editHotel(data); 90 | 91 | } else if(layEvent === 'del'){ //删除 92 | layer.confirm('确定删除此酒店?',{icon:3, title:'提示信息'},function(index){ 93 | $.post("/deleteHotelById",{ 94 | id : data.hotelId //将需要删除的newsId作为参数传入 95 | },function(data){ 96 | // tableIns.reload(); 97 | layer.close(index); 98 | layer.msg("权限不够!"); 99 | 100 | }) 101 | }); 102 | } else if(layEvent === 'look'){ //预览 103 | layer.alert("此功能需要前台展示,实际开发中传入对应的必要参数进行文章内容页面访问") 104 | } 105 | }); 106 | 107 | 108 | }) -------------------------------------------------------------------------------- /src/main/resources/static/page/login/login.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 登录--旅游管理系统 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
    21 | 22 | 23 |

    旅游后台管理系统

    24 |
    25 | 26 | 27 |
    28 |
    29 | 30 | 31 |
    32 | 33 | 37 | 38 | 39 |
    40 | 41 |
    42 | 47 |
    48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /src/main/resources/static/page/login/login.js: -------------------------------------------------------------------------------- 1 | layui.use(['form','layer','jquery'],function(){ 2 | var form = layui.form, 3 | layer = parent.layer === undefined ? layui.layer : top.layer 4 | $ = layui.jquery; 5 | 6 | $(".loginBody .seraph").click(function(){ 7 | layer.msg("这只是做个样式,至于功能,你见过哪个后台能这样登录的?还是老老实实的找管理员去注册吧",{ 8 | time:5000 9 | }); 10 | }) 11 | 12 | //登录按钮 13 | form.on("submit(login)",function(data){ 14 | $(this).text("登录中...").attr("disabled","disabled").addClass("layui-disabled"); 15 | 16 | $.ajax({ 17 | type: "POST", 18 | url: "/login", 19 | data: data.field, 20 | success: function(msg){ 21 | if(msg.msg=="success"){ 22 | localStorage.setItem("admin",data.field.userName); 23 | location.href="/index.html"; 24 | layer.msg("登录成功!") 25 | }else{ 26 | $(".login").text("登录") 27 | $(".login").removeAttr("disabled"); 28 | $(".login").removeClass("layui-disabled"); 29 | 30 | layer.msg("密码错误!") 31 | } 32 | } 33 | }); 34 | 35 | 36 | }) 37 | 38 | //表单输入效果 39 | $(".loginBody .input-item").click(function(e){ 40 | e.stopPropagation(); 41 | $(this).addClass("layui-input-focus").find(".layui-input").focus(); 42 | }) 43 | $(".loginBody .layui-form-item .layui-input").focus(function(){ 44 | $(this).parent().addClass("layui-input-focus"); 45 | }) 46 | $(".loginBody .layui-form-item .layui-input").blur(function(){ 47 | $(this).parent().removeClass("layui-input-focus"); 48 | if($(this).val() != ''){ 49 | $(this).parent().addClass("layui-input-active"); 50 | }else{ 51 | $(this).parent().removeClass("layui-input-active"); 52 | } 53 | }) 54 | }) 55 | -------------------------------------------------------------------------------- /src/main/resources/static/page/main.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 首页--layui后台管理模板 2.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
    17 |
    18 |
    19 |
    20 | 21 |
    22 |
    23 |
    系统基本参数
    24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 |
    当前版本
    开发作者
    网站首页
    技术栈
    数据库版本
    当前用户权限
    58 | 59 |
    60 |
    61 |
    62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /src/main/resources/static/page/message/addMessage.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 考勤列表 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
    19 |
    20 |
    21 |
    22 | 23 |
    24 | 25 |
    26 | 27 |
    28 |
    29 | 30 |
    31 | 32 |
    33 | 34 |
    35 |
    36 | 37 | 38 |
    39 | 40 |
    41 | 42 |
    43 |
    44 | 45 | 46 | 47 |
    48 | 49 |
    50 | 51 | 52 | 53 |
    54 |
    55 | 56 |
    57 |
    58 | 59 | 69 | 70 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /src/main/resources/static/page/message/editMessage.js: -------------------------------------------------------------------------------- 1 | layui.use(['form','layer','layedit','laydate','upload'],function(){ 2 | var form = layui.form 3 | layer = parent.layer === undefined ? layui.layer : top.layer, 4 | laypage = layui.laypage, 5 | upload = layui.upload, 6 | layedit = layui.layedit, 7 | laydate = layui.laydate, 8 | $ = layui.jquery; 9 | 10 | //用于同步编辑器内容到textarea 11 | layedit.sync(editIndex); 12 | 13 | //上传缩略图 14 | upload.render({ 15 | elem: '.thumbBox', 16 | url: '../../json/userface.json', 17 | method : "get", //此处是为了演示之用,实际使用中请将此删除,默认用post方式提交 18 | done: function(res, index, upload){ 19 | var num = parseInt(4*Math.random()); //生成0-4的随机数,随机显示一个头像信息 20 | $('.thumbImg').attr('src',res.data[num].src); 21 | $('.thumbBox').css("background","#fff"); 22 | } 23 | }); 24 | 25 | //格式化时间 26 | function filterTime(val){ 27 | if(val < 10){ 28 | return "0" + val; 29 | }else{ 30 | return val; 31 | } 32 | } 33 | //定时发布 34 | var time = new Date(); 35 | var submitTime = time.getFullYear()+'-'+filterTime(time.getMonth()+1)+'-'+filterTime(time.getDate())+' '+filterTime(time.getHours())+':'+filterTime(time.getMinutes())+':'+filterTime(time.getSeconds()); 36 | laydate.render({ 37 | elem: '#release', 38 | type: 'datetime', 39 | trigger : "click", 40 | done : function(value, date, endDate){ 41 | submitTime = value; 42 | } 43 | }); 44 | form.on("radio(release)",function(data){ 45 | if(data.elem.title == "定时发布"){ 46 | $(".releaseDate").removeClass("layui-hide"); 47 | $(".releaseDate #release").attr("lay-verify","required"); 48 | }else{ 49 | $(".releaseDate").addClass("layui-hide"); 50 | $(".releaseDate #release").removeAttr("lay-verify"); 51 | submitTime = time.getFullYear()+'-'+(time.getMonth()+1)+'-'+time.getDate()+' '+time.getHours()+':'+time.getMinutes()+':'+time.getSeconds(); 52 | } 53 | }); 54 | 55 | form.verify({ 56 | newsName : function(val){ 57 | if(val == ''){ 58 | return "文章标题不能为空"; 59 | } 60 | }, 61 | content : function(val){ 62 | if(val == ''){ 63 | return "文章内容不能为空"; 64 | } 65 | } 66 | }) 67 | form.on("submit(addNews)",function(data){ 68 | //截取文章内容中的一部分文字放入文章摘要 69 | var abstract = layedit.getText(editIndex).substring(0,50); 70 | //弹出loading 71 | var index = top.layer.msg('数据提交中,请稍候',{icon: 16,time:false,shade:0.8}); 72 | // 实际使用时的提交信息 73 | // $.post("上传路径",{ 74 | // newsName : $(".newsName").val(), //文章标题 75 | // abstract : $(".abstract").val(), //文章摘要 76 | // content : layedit.getContent(editIndex).split('')[0], //文章内容 77 | // newsImg : $(".thumbImg").attr("src"), //缩略图 78 | // classify : '1', //文章分类 79 | // newsStatus : $('.newsStatus select').val(), //发布状态 80 | // newsTime : submitTime, //发布时间 81 | // newsTop : data.filed.newsTop == "on" ? "checked" : "", //是否置顶 82 | // },function(res){ 83 | // 84 | // }) 85 | setTimeout(function(){ 86 | top.layer.close(index); 87 | top.layer.msg("文章添加成功!"); 88 | layer.closeAll("iframe"); 89 | //刷新父页面 90 | parent.location.reload(); 91 | },500); 92 | return false; 93 | }) 94 | 95 | //预览 96 | form.on("submit(look)",function(){ 97 | layer.alert("此功能需要前台展示,实际开发中传入对应的必要参数进行文章内容页面访问"); 98 | return false; 99 | }) 100 | 101 | //创建一个编辑器 102 | var editIndex = layedit.build('news_content',{ 103 | height : 535, 104 | uploadImage : { 105 | url : "../../json/newsImg.json" 106 | } 107 | }); 108 | 109 | }) -------------------------------------------------------------------------------- /src/main/resources/static/page/message/messageList.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
    18 |
    19 | 20 | 21 |
    22 |
    23 | 24 |
    25 | 搜索 26 |
    27 | 28 |
    29 | 添加留言 30 |
    31 | 32 | 33 | 34 | 35 | 36 |
    37 | 38 |
    39 | 40 | 41 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /src/main/resources/static/page/scenery/addScenery.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 考勤列表 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
    19 |
    20 |
    21 |
    22 | 23 |
    24 | 25 |
    26 | 27 |
    28 |
    29 | 30 |
    31 | 32 |
    33 | 34 |
    35 |
    36 | 37 |
    38 | 39 |
    40 | 41 |
    42 |
    43 | 44 |
    45 | 46 |
    47 | 48 |
    49 |
    50 | 51 | 52 | 53 |
    54 | 55 |
    56 | 57 | 58 | 59 |
    60 |
    61 | 62 |
    63 |
    64 | 65 | 75 | 76 | 101 | 102 | 103 | -------------------------------------------------------------------------------- /src/main/resources/static/page/scenery/editScenery.js: -------------------------------------------------------------------------------- 1 | layui.use(['form','layer','layedit','laydate','upload'],function(){ 2 | var form = layui.form 3 | layer = parent.layer === undefined ? layui.layer : top.layer, 4 | laypage = layui.laypage, 5 | upload = layui.upload, 6 | layedit = layui.layedit, 7 | laydate = layui.laydate, 8 | $ = layui.jquery; 9 | 10 | //用于同步编辑器内容到textarea 11 | layedit.sync(editIndex); 12 | 13 | 14 | //格式化时间 15 | function filterTime(val){ 16 | if(val < 10){ 17 | return "0" + val; 18 | }else{ 19 | return val; 20 | } 21 | } 22 | 23 | //预览 24 | form.on("submit(look)",function(){ 25 | layer.alert("此功能需要前台展示,实际开发中传入对应的必要参数进行文章内容页面访问"); 26 | return false; 27 | }) 28 | 29 | //创建一个编辑器 30 | var editIndex = layedit.build('news_content',{ 31 | height : 535, 32 | uploadImage : { 33 | url : "../../json/newsImg.json" 34 | } 35 | }); 36 | 37 | 38 | 39 | 40 | }) -------------------------------------------------------------------------------- /src/main/resources/static/page/scenery/sceneryList.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
    18 | 19 |
    20 | 21 | 22 |
    23 |
    24 | 25 |
    26 | 搜索 27 |
    28 | 29 |
    30 | 添加景点 31 |
    32 | 33 | 34 |
    35 | 36 |
    37 | 38 | 39 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /src/main/resources/static/page/scenery/sceneryList.js: -------------------------------------------------------------------------------- 1 | layui.use(['form','layer','laydate','table','laytpl'],function(){ 2 | var form = layui.form, 3 | layer = parent.layer === undefined ? layui.layer : top.layer, 4 | $ = layui.jquery, 5 | laydate = layui.laydate, 6 | laytpl = layui.laytpl, 7 | table = layui.table; 8 | 9 | //新闻列表 10 | var tableIns = table.render({ 11 | elem: '#sceneryList', 12 | url : '/findAll', 13 | cellMinWidth : 95, 14 | page : true, 15 | height : "full-100", 16 | limit : 20, 17 | limits:[10,15,20,25], 18 | id : "sceneryListTable", 19 | cols:[[ 20 | {type: 'checkbox', fixed:'left', }, 21 | {type:'numbers',title:'序号'}, 22 | {field: 'sceneryId', title: 'ID', width:80, align:"center"}, 23 | {field: 'sceneryCity', title: '城市',width:80,align:"center"}, 24 | {field: 'sceneryTitle', title: '标题',align:'center'}, 25 | {field: 'sceneryIntroduce', title: '介绍',align:'center',hide:true}, 26 | {field: 'sceneryPrice', title: '价格',width:120, align:'center'}, 27 | {field: 'sceneryRoute', title: '路线', align:'center'}, 28 | {title: '操作', templet:'#sceneryOperate',width:120,fixed:"right",align:"center"} 29 | ]] 30 | }); 31 | 32 | //添加景点 33 | function addScenery(){ 34 | var index = layui.layer.open({ 35 | title : "添加景点", 36 | type : 2, 37 | content : "addScenery.html", 38 | }) 39 | layui.layer.full(index); 40 | //改变窗口大小时,重置弹窗的宽高,防止超出可视区域(如F12调出debug的操作) 41 | $(window).on("resize",function(){ 42 | layui.layer.full(index); 43 | }) 44 | } 45 | 46 | 47 | $(".addScenery_btn").click(function(){ 48 | addScenery(); 49 | }) 50 | 51 | 52 | //编辑景点 53 | function editScenery(edit){ 54 | var index = layui.layer.open({ 55 | title : "编辑", 56 | type : 2, 57 | content : "editScenery.html", 58 | success : function(layero, index){ 59 | var body = layui.layer.getChildFrame('body', index); 60 | if(edit){ 61 | body.find(".sceneryId").val(edit.sceneryId); 62 | body.find(".sceneryCity").val(edit.sceneryCity); 63 | body.find(".sceneryTitle").val(edit.sceneryTitle); 64 | body.find(".sceneryPrice").val(edit.sceneryPrice); 65 | body.find(".sceneryRoute").val(edit.sceneryRoute); 66 | body.find(".sceneryIntroduce").val(edit.sceneryIntroduce); 67 | 68 | form.render(); 69 | } 70 | setTimeout(function(){ 71 | layui.layer.tips('点击此处返回景点列表', '.layui-layer-setwin .layui-layer-close', { 72 | tips: 3 73 | }); 74 | },500) 75 | } 76 | }) 77 | layui.layer.full(index); 78 | //改变窗口大小时,重置弹窗的宽高,防止超出可视区域(如F12调出debug的操作) 79 | $(window).on("resize",function(){ 80 | layui.layer.full(index); 81 | }) 82 | } 83 | 84 | //列表操作 85 | table.on('tool(sceneryList)', function(obj){ 86 | var layEvent = obj.event, 87 | data = obj.data; 88 | 89 | if(layEvent === 'edit'){ //编辑 90 | 91 | editScenery(data); 92 | 93 | } else if(layEvent === 'del'){ //删除 94 | layer.confirm('确定删除此景点?',{icon:3, title:'提示信息'},function(index){ 95 | $.post("/deleteSceneryById",{ 96 | id : data.sceneryId //将需要删除的newsId作为参数传入 97 | },function(data){ 98 | // tableIns.reload(); 99 | layer.close(index); 100 | layer.msg("权限不够!"); 101 | 102 | }) 103 | }); 104 | } else if(layEvent === 'look'){ //预览 105 | layer.alert("此功能需要前台展示,实际开发中传入对应的必要参数进行文章内容页面访问") 106 | } 107 | }); 108 | 109 | 110 | }) -------------------------------------------------------------------------------- /src/main/resources/static/page/user/addUser.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 考勤列表 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
    19 |
    20 |
    21 |
    22 | 23 | 24 | 25 |
    26 | 27 |
    28 | 29 |
    30 |
    31 | 32 |
    33 | 34 |
    35 | 36 |
    37 |
    38 | 39 | 40 | 41 |
    42 | 43 |
    44 | 45 | 46 | 47 |
    48 |
    49 | 50 |
    51 |
    52 | 53 | 63 | 64 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /src/main/resources/static/page/user/editUser.js: -------------------------------------------------------------------------------- 1 | layui.use(['form','layer','layedit','laydate','upload'],function(){ 2 | var form = layui.form 3 | layer = parent.layer === undefined ? layui.layer : top.layer, 4 | laypage = layui.laypage, 5 | upload = layui.upload, 6 | layedit = layui.layedit, 7 | laydate = layui.laydate, 8 | $ = layui.jquery; 9 | 10 | //用于同步编辑器内容到textarea 11 | layedit.sync(editIndex); 12 | 13 | //上传缩略图 14 | upload.render({ 15 | elem: '.thumbBox', 16 | url: '../../json/userface.json', 17 | method : "get", //此处是为了演示之用,实际使用中请将此删除,默认用post方式提交 18 | done: function(res, index, upload){ 19 | var num = parseInt(4*Math.random()); //生成0-4的随机数,随机显示一个头像信息 20 | $('.thumbImg').attr('src',res.data[num].src); 21 | $('.thumbBox').css("background","#fff"); 22 | } 23 | }); 24 | 25 | //格式化时间 26 | function filterTime(val){ 27 | if(val < 10){ 28 | return "0" + val; 29 | }else{ 30 | return val; 31 | } 32 | } 33 | //定时发布 34 | var time = new Date(); 35 | var submitTime = time.getFullYear()+'-'+filterTime(time.getMonth()+1)+'-'+filterTime(time.getDate())+' '+filterTime(time.getHours())+':'+filterTime(time.getMinutes())+':'+filterTime(time.getSeconds()); 36 | laydate.render({ 37 | elem: '#release', 38 | type: 'datetime', 39 | trigger : "click", 40 | done : function(value, date, endDate){ 41 | submitTime = value; 42 | } 43 | }); 44 | 45 | 46 | 47 | //预览 48 | form.on("submit(look)",function(){ 49 | layer.alert("此功能需要前台展示,实际开发中传入对应的必要参数进行文章内容页面访问"); 50 | return false; 51 | }) 52 | 53 | //创建一个编辑器 54 | var editIndex = layedit.build('news_content',{ 55 | height : 535, 56 | uploadImage : { 57 | url : "../../json/newsImg.json" 58 | } 59 | }); 60 | 61 | }) -------------------------------------------------------------------------------- /src/main/resources/static/page/user/userEdit.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 考勤列表 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
    19 |
    20 |
    21 |
    22 | 23 | 24 | 30 | 31 | 32 |
    33 | 34 |
    35 | 36 |
    37 |
    38 | 39 |
    40 | 41 |
    42 | 43 |
    44 |
    45 | 46 | 47 | 48 |
    49 | 50 |
    51 | 52 | 53 | 54 |
    55 |
    56 | 57 |
    58 |
    59 | 60 | 70 | 71 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /src/main/resources/static/page/user/userList.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | layui后台管理模板 2.0 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
    18 |
    19 | 20 | 21 |
    22 |
    23 | 24 |
    25 | 搜索 26 |
    27 | 28 |
    29 | 添加游客 30 |
    31 | 32 | 33 | 34 | 35 | 36 |
    37 |
    38 | 39 | 40 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /src/test/java/com/test/tourism/TourismApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.test.tourism; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.beans.factory.annotation.Autowired; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | 7 | import javax.sql.DataSource; 8 | import java.sql.SQLException; 9 | 10 | @SpringBootTest 11 | class TourismApplicationTests { 12 | 13 | @Autowired 14 | DataSource dataSource; 15 | 16 | @Test 17 | void contextLoads() throws SQLException { 18 | System.out.println(dataSource.getClass()); 19 | System.out.println(dataSource.getConnection()); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /截屏2020-01-14下午8.21.33.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/截屏2020-01-14下午8.21.33.png -------------------------------------------------------------------------------- /截屏2020-01-14下午8.29.45.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/截屏2020-01-14下午8.29.45.png -------------------------------------------------------------------------------- /截屏2020-02-28下午2.24.23.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/截屏2020-02-28下午2.24.23.png -------------------------------------------------------------------------------- /截屏2020-02-28下午2.29.44.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kangyuxin/tourism/bc892f8ad3cd241951e7e9510be39ee61c5a4941/截屏2020-02-28下午2.29.44.png --------------------------------------------------------------------------------