Java开发旅游网站
Java小项目之:旅游网站
旅游网站应用到的技术:
1.Hibernate
2.Tomcat Servlet
3.Jsp,javaScript,jquery , Ajax,EL表达式
创新互联公司2013年开创至今,是专业互联网技术服务公司,拥有项目成都做网站、网站建设网站策划,项目实施与项目整合能力。我们以让每一个梦想脱颖而出为使命,1280元绥棱做网站,已为上家服务,为绥棱各地企业和个人服务,联系电话:18980820575
前台功能:
1用户的注册和登录,
2旅游线路的报名(一人只能报一条线路);
3用户对每条旅游线路的评论。
4查询一个城市的所有线路
5查询单一的一条线路
后台管理功能:
1旅游线路的增删改查
2对用户评论的删除或回复
3删除查询用户
部分代码展示:
package biz;
import java.util.List;
import java.util.Set;
import org.hibernate.Transaction;
import util.HibernateUtil;
import dao.ManagerDAO;
import dao.ManagerDAOImpl;
import entity.Manage;
import entity.User;
import entity.Word;
public class ManagerBizImpl implements ManagerBiz {
private ManagerDAO manageDAO = new ManagerDAOImpl();
private final int PAGESIZE = 3;
public boolean queryManage(Manage manage) {
return manageDAO.queryManage(manage);
}
public boolean saveManage(Manage manage) {
Transaction ts = HibernateUtil.getCurrentSession().beginTransaction();
boolean b = manageDAO.saveManage(manage);
ts.commit();
return b;
}
public Set queryAllUser(int page) {
Set users = manageDAO.queryAllUser(page, PAGESIZE);
return users;
}
public int queryUserCount() {
int count = manageDAO.queryUserCount();
int totalPage = 0;
if(count % PAGESIZE == 0) {
totalPage = count / PAGESIZE;
} else {
totalPage = (count / PAGESIZE) + 1;
}
return totalPage;
}
public Set queryUserByUsername(String username) {
return manageDAO.queryUserByUsername(username);
}
public boolean deleteUserByUsername(Integer id) {
Transaction ts = HibernateUtil.getCurrentSession().beginTransaction();
boolean b = manageDAO.deleteUserByUsername(id);
ts.commit();
return b;
}
public List getAllWords(int page) {
return manageDAO.queryAllWords(page, PAGESIZE);
}
public boolean updateWord(Integer id, String restore) {
Transaction ts = HibernateUtil.getCurrentSession().beginTransaction();
boolean b = manageDAO.updateWord(id, restore);
ts.commit();
return b;
}
public boolean deleteWordById(Integer id) {
Transaction ts = HibernateUtil.getCurrentSession().beginTransaction();
boolean b = manageDAO.deleteWordById(id);
ts.commit();
return b;
}
public Word queryWordById(Integer id) {
return manageDAO.queryWordById(id);
}
public int queryWordCount() {
int count = manageDAO.queryWordCount();
int totalPage = 0;
if(count % PAGESIZE == 0) {
totalPage = count / PAGESIZE;
} else {
totalPage = (count / PAGESIZE) + 1;
}
return totalPage;
}
}
当前文章:Java开发旅游网站
URL网址:http://pwwzsj.com/article/gcpeep.html