毕业设计之 --- 基于java web的旅游网站设计

242 篇文章 70 订阅
12 篇文章 3 订阅


0 前言

今天向大家展示学长帮助同学完成的一个毕业设计:基于java web的旅游网站设计与实现。需要的同学点击下方获取源码及论文。

毕设帮助,开题指导,资料分享,疑问解答(见文末)

项目获取方式:

https://blog.csdn.net/fawubio/article/details/125236987

1 课题背景

随着旅游业的迅猛发展,21世纪的中国将会成为世界上最大的旅游国家,对于旅游者而言获取相关的旅游信息以便于做出最优的旅游选择是十分必要的。塞北村镇旅游网站中以帮助客户怎么样才能更快速方便的找自己旅游公司咨询和旅游信息。因此开发塞北村镇旅游网站可以发布塞北村镇旅游信息,让客户自己在网上就可以方便快捷的了解到旅行社的所有旅行动态,大大方便了旅行者对旅游信息的查询和获取,旅行者也更愿意在电子信息平台下进行咨询和消费。。

2 实现功能

2.1 系统整体设计

在这里插入图片描述
塞北村镇旅游网站是基于B/S体系结构的旅游网站。通过全方位综合分析,该系统功能设计相对比较全面,能够满足大部分用户的需求。但是,做到满足每一个客户要求也是不可能的,只能是争取尽可能完善网站功能,到达更好的效果。塞北村镇旅游网站主要是通过各功能模块的介绍,对塞北村镇旅游进行宣传,包括首页,塞北人文,塞北故事等部分。

在这里插入图片描述

2.2 业务流程

进行业务流程分析也是一个重要环节。他的分析应该参照信息流动的整个过程,对每一个环节进行业务处理、数据流图的调查分析。数据流图可以清除的表明计算机软件系统的工作情况,他是一种图形表示。这样,可以简化工作难度,便于开发人员准确表达交流。同时便于开发端,维护端,测试端,应用端的相互交流合作。也就是说,数据流图不仅适合专业人员读取了解方便,也同样适用于非专业人员。在需求分析中是一种便于修改和交流的表达工具。

总体流程:
在这里插入图片描述

客户业务流程:
在这里插入图片描述

3 运行效果

在这里插入图片描述

在这里插入图片描述
在这里插入图片描述

在这里插入图片描述
在这里插入图片描述

在这里插入图片描述

4 部分实现代码

package com.action;

import java.util.Date;
import java.util.List;
import java.util.Map;

import org.apache.struts2.ServletActionContext;
import org.hibernate.Session;

import com.dao.TForumsDAO;
import com.dao.TThreadsDAO;
import com.dao.TTopicDAO;
import com.model.TForums;
import com.model.TThreads;
import com.model.TTopic;
import com.model.TUser;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

public class threadAction extends ActionSupport{
	private TForumsDAO forumsDAO;
	private TTopicDAO topicDAO;
	private TThreadsDAO threadsDAO;
	
	private int pid;
	private int fid;
	private String subject;
	private String content;
	
	private String message;
	private String path;
	public String toAddThread(){
		TForums forums = forumsDAO.findById(fid);
		
		Map request=(Map)ServletActionContext.getContext().get("request");
		request.put("forums", forums);
		return ActionSupport.SUCCESS;
	}
	
	public String threadAdd()
	{
		Map session= ActionContext.getContext().getSession();
		TUser user = (TUser)session.get("user");
		
		Date date = new Date();
		
		TTopic topic = new TTopic();
		topic.setFid(fid);
		topic.setAuthor(user.getUserName());
		topic.setAuthorid(user.getId());
		topic.setSubject(subject);
		topic.setView(0);
		topic.setReplies(0);
		topic.setAddtime(date);
		topicDAO.save(topic);
		
		int pid = topic.getPid();
		TThreads threads = new TThreads();
		threads.setPid(pid);
		threads.setFid(fid);
		threads.setFtype(0);
		threads.setAuthor(user.getUserName());
		threads.setAuthorid(user.getId());
		threads.setSubject(subject);
		threads.setContent(content);
		threads.setAddtime(date);		
		threadsDAO.save(threads);
		
		this.setMessage("主题发布成功");
		this.setPath("threadview.action?pid="+pid);
		return "succeed";
	}
	
	public String threadview()
	{
		String sql="update TTopic set view=view+1 where pid="+pid;
		topicDAO.getHibernateTemplate().bulkUpdate(sql);
		
		TTopic topic = topicDAO.findById(pid);
		
		TForums forums = forumsDAO.findById(topic.getFid());
		
		Session session = threadsDAO.getSessionFactory().openSession();
		String getMain = "select tid,author,subject,content,addtime from t_threads where pid="+pid+" order by addtime limit 1";
		Object[] objThreadsMain = (Object[])session.createSQLQuery(getMain).list().get(0); 
		
		TThreads threadsMain = new TThreads();
		threadsMain.setTid((Integer)objThreadsMain[0]);
		threadsMain.setAuthor((String)objThreadsMain[1]);
		threadsMain.setSubject((String)objThreadsMain[2]);
		threadsMain.setContent((String)objThreadsMain[3]);
		threadsMain.setAddtime((Date)objThreadsMain[4]);
		
		List threads = threadsDAO.getHibernateTemplate().find("from TThreads where pid="+pid+" and ftype=1 order by addtime");
		
		Map request=(Map)ServletActionContext.getContext().get("request");
		
		request.put("topic", topic);
		request.put("forums", forums);
		request.put("threadsMain", threadsMain);
		request.put("threadsList", threads);
		
		session.close();
		return SUCCESS;
	}
	
	public String replace()
	{
		Map session= ActionContext.getContext().getSession();
		TUser user = (TUser)session.get("user");
		
		String sql="update TTopic set replies=replies+1 where pid="+pid;
		topicDAO.getHibernateTemplate().bulkUpdate(sql);
		
		TThreads threads = new TThreads();
		threads.setPid(pid);
		threads.setFid(fid);
		threads.setFtype(1);
		threads.setAuthor(user.getUserName());
		threads.setAuthorid(user.getId());
		threads.setSubject(subject);
		threads.setContent(content);
		threads.setAddtime(new Date());		
		threadsDAO.save(threads);
		
		this.setMessage("主题回复成功");
		this.setPath("threadview.action?pid="+pid);
		return "succeed";
	}
	
	public TTopicDAO getTopicDAO() {
		return topicDAO;
	}
	public void setTopicDAO(TTopicDAO topicDAO) {
		this.topicDAO = topicDAO;
	}
	public TThreadsDAO getThreadsDAO() {
		return threadsDAO;
	}
	public void setThreadsDAO(TThreadsDAO threadsDAO) {
		this.threadsDAO = threadsDAO;
	}

	public TForumsDAO getForumsDAO() {
		return forumsDAO;
	}

	public void setForumsDAO(TForumsDAO forumsDAO) {
		this.forumsDAO = forumsDAO;
	}

	public int getPid() {
		return pid;
	}

	public void setPid(int pid) {
		this.pid = pid;
	}

	public int getFid() {
		return fid;
	}

	public void setFid(int fid) {
		this.fid = fid;
	}

	public String getSubject() {
		return subject;
	}

	public void setSubject(String subject) {
		this.subject = subject;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}
}

项目获取方式:

https://blog.csdn.net/fawubio/article/details/125236987

最后

  • 9
    点赞
  • 160
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值