?博主介紹:?
大家好,我是一名在Java圈混跡十余年的程序員,精通Java編程語言,同時也熟練掌握微信小程序、Python和Android等技術(shù),能夠為大家提供全方位的技術(shù)支持和交流。
我擅長在JavaWeb、SSH、SSM、SpringBoot等框架下進行項目開發(fā),具有豐富的項目經(jīng)驗和開發(fā)技能。我的代碼風格規(guī)范、優(yōu)美、易讀性強,同時也注重性能優(yōu)化、代碼重構(gòu)等方面的實踐和經(jīng)驗總結(jié)。
我有豐富的成品Java畢設(shè)項目經(jīng)驗,能夠為學生提供各類個性化的開題框架和實際運作方案。同時我也提供相關(guān)的學習資料、程序開發(fā)、技術(shù)解答、代碼講解、文檔報告等專業(yè)服務。??文末獲取源碼聯(lián)系??
?????精彩專欄推薦訂閱?????不然下次找不到喲
Java項目精品實戰(zhàn)案例(300套)
旅游資源網(wǎng)站源碼下載地址:
https://download.csdn.net/download/weixin_54828627/87863041
一、效果演示
基于java+ssm+Vue旅游資源網(wǎng)站演示視頻
二、前言介紹
本論文主要論述了如何使用JAVA語言開發(fā)一個旅游資源網(wǎng)站 ,本系統(tǒng)將嚴格按照軟件開發(fā)流程進行各個階段的工作,采用B/S架構(gòu),面向?qū)ο缶幊趟枷脒M行項目開發(fā)。在引言中,作者將論述旅游資源網(wǎng)站的當前背景以及系統(tǒng)開發(fā)的目的,后續(xù)章節(jié)將嚴格按照軟件開發(fā)流程,對系統(tǒng)進行各個階段分析設(shè)計。
本系統(tǒng)的使用可以實現(xiàn)旅游資源網(wǎng)站管理的信息化,可以方便管理員進行更加方便快捷的管理,可以提高管理人員的工作效率。
三、主要技術(shù)
技術(shù)名 | 作用 |
---|---|
SSM | 后端框架 |
Vue | 前端框架 |
MySQL | 數(shù)據(jù)庫 |
四、系統(tǒng)設(shè)計(部分)
4.1、主要功能模塊設(shè)計?????????
旅游資源網(wǎng)站的主要使用者分為管理員和用戶,實現(xiàn)功能包括管理員:首頁、個人中心、用戶管理、景點信息管理、購票信息管理、酒店信息管理、客房類型管理、客房信息管理、客房預訂管理、交流論壇、系統(tǒng)管理,用戶:首頁、個人中心、購票信息管理、客房預訂管理、我的收藏管理,前臺首頁;首頁、景點信息、酒店信息、客房信息、交流論壇、紅色文化、個人中心、后臺管理、客服等功能。由于本網(wǎng)站的功能模塊設(shè)計比較全面,所以使得整個旅游資源網(wǎng)站信息管理的過程得以實現(xiàn)。
4.2、登錄流程設(shè)計
五、運行截圖
5.1、前臺首頁功能模塊
旅游資源網(wǎng)站 ,在系統(tǒng)首頁可以查看首頁、景點信息、酒店信息、客房信息、交流論壇、紅色文化、個人中心、后臺管理、客服等內(nèi)容,如圖5-1所示。
圖5-1系統(tǒng)功能界面圖???
5.1.1、用戶登錄、用戶注冊
圖5-2用戶登錄、用戶注冊界面圖
5.1.2、景點信息
?圖5-3景點信息界面圖
5.1.3、酒店信息
圖5-4酒店信息界面圖
5.2、管理員功能模塊
管理員登錄,通過填寫用戶名、密碼、角色進行登錄,如圖5-5所示。
圖5-5管理員登錄界面圖
管理員登錄進入旅游資源網(wǎng)站可以查看首頁、個人中心、用戶管理、景點信息管理、購票信息管理、酒店信息管理、客房類型管理、客房信息管理、客房預訂管理、交流論壇、系統(tǒng)管理等信息。
5.2.1、用戶管理
?圖5-6用戶管理界面圖
5.2.2、景點信息管理
圖5-7景點信息管理界面圖
5.2.3、酒店信息管理
圖5-8酒店信息管理界面圖
5.2.4、客房類型管理
圖5-9客房類型管理界面圖
5.2.5、客房信息管理
圖5-10客房信息管理界面圖
5.2.6、輪播圖
圖5-11輪播圖管理界面圖
5.2.7、客房預訂管理
圖5-12客房預訂管理界面圖
5.3、用戶功能模塊
用戶登錄進入旅游資源網(wǎng)站可以查看首頁、個人中心、購票信息管理、客房預訂管理、我的收藏管理等內(nèi)容。
5.3.1、個人信息
圖5-13個人信息界面圖
5.3.2、客房預訂管理
圖5-14客房預訂管理界面圖
六、數(shù)據(jù)庫設(shè)計(部分)
本旅游資源網(wǎng)站采用的是MYSQL數(shù)據(jù)庫,數(shù)據(jù)存儲快,因為旅游資源網(wǎng)站 ,主要的就是對信息的管理,信息內(nèi)容比較多,這就需要好好的設(shè)計一個好的數(shù)據(jù)庫,分類要清楚,不能添加信息的時候,造成信息太過混亂,設(shè)計好的數(shù)據(jù)庫首先就需要先把各個實體之間的關(guān)系表達明確,系統(tǒng)的E-R圖如下圖所示:
1、酒店信息管理實體圖如圖4-5所示:
圖4-5 酒店信息管理實體圖
2、用戶管理實體圖如圖4-6所示:
?
七、代碼參考
package com.controller;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;
import com.entity.ChatEntity;
import com.entity.view.ChatView;
import com.service.ChatService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;
/**
* 客服聊天表
* 后端接口
* @author
* @email
* @date 2021-03-03 13:33:00
*/
@RestController
@RequestMapping("/chat")
public class ChatController {
@Autowired
private ChatService chatService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,ChatEntity chat, HttpServletRequest request){
if(!request.getSession().getAttribute("role").toString().equals("管理員")) {
chat.setUserid((Long)request.getSession().getAttribute("userId"));
}
EntityWrapper<ChatEntity> ew = new EntityWrapper<ChatEntity>();
PageUtils page = chatService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, chat), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,ChatEntity chat, HttpServletRequest request){
if(!request.getSession().getAttribute("role").toString().equals("管理員")) {
chat.setUserid((Long)request.getSession().getAttribute("userId"));
}
EntityWrapper<ChatEntity> ew = new EntityWrapper<ChatEntity>();
PageUtils page = chatService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, chat), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( ChatEntity chat){
EntityWrapper<ChatEntity> ew = new EntityWrapper<ChatEntity>();
ew.allEq(MPUtil.allEQMapPre( chat, "chat"));
return R.ok().put("data", chatService.selectListView(ew));
}
/**
* 查詢
*/
@RequestMapping("/query")
public R query(ChatEntity chat){
EntityWrapper< ChatEntity> ew = new EntityWrapper< ChatEntity>();
ew.allEq(MPUtil.allEQMapPre( chat, "chat"));
ChatView chatView = chatService.selectView(ew);
return R.ok("查詢客服聊天表成功").put("data", chatView);
}
/**
* 后端詳情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
ChatEntity chat = chatService.selectById(id);
return R.ok().put("data", chat);
}
/**
* 前端詳情
*/
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
ChatEntity chat = chatService.selectById(id);
return R.ok().put("data", chat);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody ChatEntity chat, HttpServletRequest request){
chat.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(chat);
if(StringUtils.isNotBlank(chat.getAsk())) {
chatService.updateForSet("isreply=0", new EntityWrapper<ChatEntity>().eq("userid", request.getSession().getAttribute("userId")));
chat.setUserid((Long)request.getSession().getAttribute("userId"));
chat.setIsreply(1);
}
if(StringUtils.isNotBlank(chat.getReply())) {
chatService.updateForSet("isreply=0", new EntityWrapper<ChatEntity>().eq("userid", chat.getUserid()));
chat.setAdminid((Long)request.getSession().getAttribute("userId"));
}
chatService.insert(chat);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody ChatEntity chat, HttpServletRequest request){
chat.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(chat);
chat.setUserid((Long)request.getSession().getAttribute("userId"));
if(StringUtils.isNotBlank(chat.getAsk())) {
chatService.updateForSet("isreply=0", new EntityWrapper<ChatEntity>().eq("userid", request.getSession().getAttribute("userId")));
chat.setUserid((Long)request.getSession().getAttribute("userId"));
chat.setIsreply(1);
}
if(StringUtils.isNotBlank(chat.getReply())) {
chatService.updateForSet("isreply=0", new EntityWrapper<ChatEntity>().eq("userid", chat.getUserid()));
chat.setAdminid((Long)request.getSession().getAttribute("userId"));
}
chatService.insert(chat);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody ChatEntity chat, HttpServletRequest request){
//ValidatorUtils.validateEntity(chat);
chatService.updateById(chat);//全部更新
return R.ok();
}
/**
* 刪除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
chatService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
/**
* 提醒接口
*/
@RequestMapping("/remind/{columnName}/{type}")
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
map.put("column", columnName);
map.put("type", type);
if(type.equals("2")) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar c = Calendar.getInstance();
Date remindStartDate = null;
Date remindEndDate = null;
if(map.get("remindstart")!=null) {
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindStart);
remindStartDate = c.getTime();
map.put("remindstart", sdf.format(remindStartDate));
}
if(map.get("remindend")!=null) {
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindEnd);
remindEndDate = c.getTime();
map.put("remindend", sdf.format(remindEndDate));
}
}
Wrapper<ChatEntity> wrapper = new EntityWrapper<ChatEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
int count = chatService.selectCount(wrapper);
return R.ok().put("count", count);
}
}
八?、技術(shù)交流
大家點贊、收藏、關(guān)注、評論啦 、查看文章結(jié)尾????獲取聯(lián)系方式????
精彩專欄推薦訂閱:在下方專欄????????????????
Java項目精品實戰(zhàn)案例(300套)
文章來源:http://www.zghlxwxcb.cn/news/detail-471863.html
???文章來源地址http://www.zghlxwxcb.cn/news/detail-471863.html
到了這里,關(guān)于基于SSM+Vue的旅游資源網(wǎng)站設(shè)計與實現(xiàn)的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!