項(xiàng)目背景
根據(jù)旅游行業(yè)的這種現(xiàn)狀,提出解決問題的一個(gè)可行性方法,實(shí)現(xiàn)了旅游管理的網(wǎng)絡(luò)化。
項(xiàng)目總體介紹
旅游系統(tǒng)設(shè)計(jì)分為前后網(wǎng)站和后臺管理系統(tǒng),功能點(diǎn)包含旅游景點(diǎn)信息分類展示、景點(diǎn)詳情(地理位置、特色景點(diǎn)概述等)、下單預(yù)訂等功能;
角色分為管理員和普通用戶。
用戶可以對旅游線路及其詳細(xì)信息進(jìn)行查詢、預(yù)定旅游線路等。詳細(xì)如下:
- 用戶注冊,登錄
- 查看和預(yù)訂旅游路線 (未登錄只能查看,下同)
- 查看和預(yù)訂旅游景點(diǎn)
- 查看和預(yù)訂餐飲住宿
- 查看和預(yù)訂旅游車票
- 查看和預(yù)訂旅游保險(xiǎn)
- 查看和預(yù)訂旅游攻略
- 留言評論
- .....
管理員可以修改旅游線路信息、刪除和增加旅游線路、增加和修改公告信息、留言評論管理等等,詳細(xì)如下;
- 系統(tǒng)用戶登錄
- 用戶管理
- 內(nèi)容管理(包含上面所有的信息發(fā)布,管理,增刪改查...)
- 用戶訂單管理
- 數(shù)據(jù)統(tǒng)計(jì)(包括用戶分析,路線分析,景點(diǎn)分析,酒店分析等等)
- ....
項(xiàng)目搭建環(huán)境
> java jdk版本:1.8及以上
> 后臺框架:java spring springmvc mybatis springbotoot等
> 前端框架:html css javascript vue等
> 開發(fā)工具: idea或者eclipse都可
> 數(shù)據(jù)庫: mysql 5.7及以上
> 服務(wù)器: tomcat
> 更多內(nèi)容可查看:http://projecthelp.top
部分核心代碼
import org.springframework.stereotype.Service;
import xyz.shiguangliang.mybatis.dao.UserMapper;
import xyz.shiguangliang.mybatis.domain.User;
import xyz.shiguangliang.service.UserService;
import xyz.shiguangliang.util.query.QueryInfo;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
import java.util.Objects;
@Service
public class UserServiceImpl implements UserService {
@Resource
private UserMapper userMapper;
//登錄
@Override
public User login(String username, String password) {
User user = userMapper.selectLogin(username,password);
if (user != null) {
//登錄次數(shù)加一
if (user.getIntimes() != null) {
user.setIntimes(user.getIntimes() + 1);
}else {
user.setIntimes(1);
}
//更新登錄時(shí)間
user.setLastlogin(new Date());
return user;
}
return null;
}
//注冊
@Override
public boolean register(User user) {
int i = 0;
//檢測用戶是否存在
User user1 = userMapper.selectUsername(user.getUsername());
if (user1 == null) {
i = userMapper.insert(user);
}
return i > 0;
}
//用戶列表
@Override
public QueryInfo getUserList(String query, Integer pagenum,Integer pagesize) {
QueryInfo queryInfo = new QueryInfo();
int start;
int end;
if (pagenum == null||pagesize == null){
pagenum =0;
pagesize = 3;
}
start = (pagenum-1)*pagesize;
end = pagesize;
int userSize = userMapper.selectUserListLimitSize(query,start,end);
List<User> users = userMapper.selectUserListLimit(query,start,end);
queryInfo.setList(users);
queryInfo.setTotal(userSize);
return queryInfo;
}
//刪除用戶
@Override
public int deleteUser(Integer tid) {
return userMapper.deleteByPrimaryKey(tid);
}
//通過id查找用戶
@Override
public User findById(Integer tid) {
return userMapper.selectByPrimaryKey(tid);
}
//更新用戶
@Override
public int updateUser(User user) {
if (user.getPassword()==null|| Objects.equals(user.getPassword(), "")){
user.setPassword(userMapper.selectByPrimaryKey(user.getTid()).getPassword());
}
return userMapper.updateByPrimaryKey(user);
}
//通過用戶名查找用戶
@Override
public User findByUsername(String username) {
return userMapper.selectUsername(username);
}
//獲取用戶權(quán)限
@Override
public int getPower(String username) {
return userMapper.selectUsername(username).getPower();
}
}
useMapper.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="xyz.shiguangliang.mybatis.dao.UserMapper">
<resultMap id="BaseResultMap" type="xyz.shiguangliang.mybatis.domain.User">
<id column="tid" jdbcType="INTEGER" property="tid" />
<result column="username" jdbcType="VARCHAR" property="username" />
<result column="password" jdbcType="VARCHAR" property="password" />
<result column="teachername" jdbcType="VARCHAR" property="teachername" />
<result column="dno" jdbcType="INTEGER" property="dno" />
<result column="power" jdbcType="INTEGER" property="power" />
<result column="intimes" jdbcType="INTEGER" property="intimes" />
<result column="lastlogin" jdbcType="TIMESTAMP" property="lastlogin" />
</resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from teacher
where tid = #{tid,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="xyz.shiguangliang.mybatis.domain.User">
insert into teacher (tid, username, password,
teachername, dno, power,
intimes, lastlogin)
values (#{tid,jdbcType=INTEGER}, #{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR},
#{teachername,jdbcType=VARCHAR}, #{dno,jdbcType=INTEGER}, #{power,jdbcType=INTEGER},
#{intimes,jdbcType=INTEGER}, #{lastlogin,jdbcType=TIMESTAMP})
</insert>
<update id="updateByPrimaryKey" parameterType="xyz.shiguangliang.mybatis.domain.User">
update teacher
set username = #{username,jdbcType=VARCHAR},
password = #{password,jdbcType=VARCHAR},
teachername = #{teachername,jdbcType=VARCHAR},
dno = #{dno,jdbcType=INTEGER},
power = #{power,jdbcType=INTEGER},
intimes = #{intimes,jdbcType=INTEGER},
lastlogin = #{lastlogin,jdbcType=TIMESTAMP}
where tid = #{tid,jdbcType=INTEGER}
</update>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select tid, username, password, teachername, dno, power, intimes, lastlogin
from teacher
where tid = #{tid,jdbcType=INTEGER}
</select>
<select id="selectAll" resultMap="BaseResultMap">
select tid, username, password, teachername, dno, power, intimes, lastlogin
from teacher
</select>
<select id="selectLogin" resultType="xyz.shiguangliang.mybatis.domain.User">
select tid, username, password, teachername, dno, power, intimes, lastlogin
from teacher
where username = #{username} and password = #{password}
</select>
<select id="selectUsername" resultType="xyz.shiguangliang.mybatis.domain.User">
select tid, username, password, teachername, dno, power, intimes, lastlogin
from teacher
where username = #{username}
</select>
<select id="selectUserListLimit" resultType="xyz.shiguangliang.mybatis.domain.User">
select tid, username, password, teachername, dno, power, intimes, lastlogin
from teacher
where
/*條件判斷*/
<if test="#{query} != null and #{query} != ''">
/*模糊查詢*/
<bind name="query2" value="'%' + query + '%'"/>
username like #{query2}
</if>
LIMIT #{start},#{end}
</select>
<select id="selectUserListLimitSize" resultType="java.lang.Integer">
select count(*)
from teacher
where
/*條件判斷*/
<if test="#{query} != null and #{query} != ''">
/*模糊查詢*/
<bind name="query2" value="'%' + query + '%'"/>
username like #{query2}
</if>
</select>
</mapper>
系統(tǒng)截圖
下面僅展示部分主要功能
系統(tǒng)用戶端
-
首頁
-
登錄或注冊
-
旅游路線查看
-
查看旅游景點(diǎn)
-
查看旅游車票和餐飲住宿
-
注意事項(xiàng)
系統(tǒng)管理端
-
登錄
-
首頁
-
注冊用戶管理
-系統(tǒng)用戶管理文章來源:http://www.zghlxwxcb.cn/news/detail-434261.html
- 內(nèi)容管理
包括旅游路線,旅游景點(diǎn),酒店管理,留言管理等等(下面以旅游路線為例)
新增:
修改: - 訂單管理
- 用戶分析
- 路線分析
- 景點(diǎn)分析
- 酒店分析
- 訂單分析
- 攻略分析
- 車票分析
- 保險(xiǎn)分析
系統(tǒng)完整
文章來源地址http://www.zghlxwxcb.cn/news/detail-434261.html
到了這里,關(guān)于21基于java的旅游信息管理系統(tǒng)的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!