摘 要
互联网发展至今,无论是其理论还是技术都已经成熟,而且它广泛参与在社会中的方方面面。它让信息都可以通过网络传播,搭配信息管理工具可以很好地为人们提供服务。针对信息管理混乱,出错率高,信息安全性差,劳动强度大,费时费力等问题,采用餐饮管理系统可以有效管理,使信息管理能够更加科学和规范。
餐饮管理系统在Eclipse环境中,使用Java语言进行编码,使用Mysql创建数据表保存本系统产生的数据。系统可以提供信息显示和相应服务,其管理员增删改查菜品信息和菜品信息资料,审核菜品信息预订订单,查看订单评价和评分,通过留言功能回复用户提问。
总之,餐饮管理系统集中管理信息,有着保密性强,效率高,存储空间大,成本低等诸多优点。它可以降低信息管理成本,实现信息管理计算机化。
关键词:餐饮管理系统;Java语言;Mysql
Abstract
Since the development of the Internet, both its theory and technology have matured, and it has been widely involved in all aspects of society. It allows information to be disseminated through the Internet, and it can serve people well with information management tools. In view of the chaotic management of guest room reservation information, high error rate, poor information security, high labor intensity, and time-consuming and laborious problems, the hotel alliance reservation system can be used to effectively manage the information and make the information management more scientific and standardized.
The hotel alliance reservation system uses Java language for coding in the Eclipse environment, and uses Mysql to create a data table to save the data generated by the system. The system can provide information display and corresponding services. The administrator can add, delete, modify, check hotel and room information, review room reservation orders, check order reviews and ratings, and respond to user questions through the message function. Users save or book rooms, pay for the booked rooms, view hotel information, and post user messages.
In short, the hotel alliance reservation system centrally manages information, with many advantages such as strong confidentiality, high efficiency, large storage space, and low cost. It can reduce the cost of information management and realize the computerization of information management.
Key Words:Hotel alliance reservation system; Java language; Mysql
目 录
目 录 III
第1章 绪论 1
1.1 课题背景 1
1.2 课题意义 1
1.3 研究内容 2
第2章 开发环境与技术 3
2.1 MYSQL数据库 3
2.2 vue技术 3
2.3 Spring Boot框架 4
第3章 系统分析 6
3.1 可行性分析 6
3.1.1 技术可行性 6
3.1.2 经济可行性 6
3.1.3 操作可行性 6
3.2 系统流程 7
3.2.1 操作流程 7
3.2.2 登录流程 7
3.2.3 删除信息流程 8
3.2.4 添加信息流程 9
3.3 性能需求 9
第4章 系统设计 11
4.1 设计原则 11
4.2 功能结构设计 11
4.3 数据库设计 12
4.3.2 数据库物理设计 16
5.1用户信息管理 21
5.2 菜品信息管理 21
5.3菜品评论管理 22
5.1公告信息管理 23
第6章 系统测试 24
6.1 功能测试 24
6.1.1 登录功能测试 24
6.1.2 修改密码功能测试 25
6.2 测试结果 25
结 论 26
致 谢 27
参考文献 28
第1章 系统设计
一个成功设计的系统在内容上必定是丰富的,在系统外观或系统功能上必定是对用户友好的。所以为了提升系统的价值,吸引更多的访问者访问系统,以及让来访用户可以花费更多时间停留在系统上,则表明该系统设计得比较专业。
4.1 设计原则
本系统在设计过程中需要依照一定的设计原则进行,目的就是为了让开发的系统具备高质量,齐全完备的功能,方便简单的操作,如此才可以最大限度的满足使用者的要求。系统设计原则除了基本的易操作原则外,还有安全性原则,准确性原则。
第一个设计原则:易操作原则,针对本系统设计的功能要完备齐全,编码时,设计的各个接口要具备友好性,使用者一旦使用本系统时,要能够轻松上手,操作本系统处理数据时,要具备便利性。此外,也需要设计一些必要提示,引导使用者操作系统。
第二个设计原则:安全性原则,本系统在登录模块要对各个访问者进行身份验证,系统会通过访问者输入的信息进行判断,使用提前编写的安全验证代码进行数据比对,引导匹配成功的访问者进入指定的操作界面。这样可以避免无关性访问者窃取系统的数据。
第三个设计原则:准确性原则,为了保证使用者登记的数据是正确的,需要提前设计数据纠错机制,让使用者可以通过系统的报错提示,仔细检查登记的错误信息,并及时纠正错误,填写规范正确的信息。比如设置密码时,要求密码的长度不能低于6个字符,且数据类型要求不能全部是数字等都能进行规范。
4.2 功能结构设计
在前面分析的管理员功能的基础上,进行接下来的设计工作,最终展示设计的系统总体功能结构图(见下图)。
图4.1 系统功能结构图
4.3 数据库设计
开发一个系统也需要提前设计数据库。这里的数据库是相关数据的集合,存储在一起的这些数据也是按照一定的组织方式进行的。目前,数据库能够服务于多种应用程序,则是源于它存储方式最佳,具备数据冗余率低的优势。虽然数据库为程序提供信息存储服务,但它与程序之间也可以保持较高的独立性。总而言之,数据库经历了很长一段时间的发展,从最初的不为人知,到现在的人尽皆知,其相关技术也越发成熟,同时也拥有着坚实的理论基础。各实体信息的E-R图以及系统总体E-R图如下所示。
图5.2 菜品实体图
图5.3 菜品收藏实体图
图5.4 菜品评价实体图
图5.5 菜品订单实体图
图5.6 字典实体图
图5.7 论坛实体图
图5.8 供应商实体图
图5.14 系统总体E-R图
4.3.2 数据库物理设计
本数据库是关系型数据库,因此对二维表的结构设计也比较关键。毕竟二维表格模型就是关系型数据库中的关系模型。而一些常用的关系模型中的概念也需要了解,才可以对关系模型进行设计。下面就简单介绍关系,元组,属性,域,关键字等常用概念的含义。
关系:关系就是数据库中的一张数据表,每张数据表都有命名,也就是每个关系也有名字,那就是数据表名;
元组:元组就是数据表中的一行记录;
属性:属性就是数据表中的字段,也就是数据表中的一列;
域:域就是对数据表中属性的取值进行限定;
关键字:关键字就是数据表中的主键;
在了解了表结构设计的常用概念后,接下来就需要使用前面绘制的E-R模型完成表结构的设计工作,并在数据库中创建数据表,并为各个数据表进行命名。以下就对设计的结果通过表格形式进行展示。
表4.1菜品表
序号 列名 数据类型 说明 允许空
1 id Int 编号 否
2 caipin_uuid_number String 菜品编号 是
3 caipin_name String 菜品名称 是
4 caipin_photo String 菜品照片 是
5 caipin_types Integer 菜品类型 是
6 caipin_price Integer 购买获得积分 是
7 caipin_kucun_number Integer 菜品库存 是
8 caipin_old_money BigDecimal 菜品原价 是
9 caipin_new_money BigDecimal 现价 是
10 caipin_clicknum Integer 点击次数 是
11 caipin_content String 菜品介绍 是
12 shangxia_types Integer 是否上架 是
13 caipin_delete Integer 逻辑删除 是
14 create_time Date 创建时间 是
表4.2菜品收藏表
序号 列名 数据类型 说明 允许空
1 id Int 编号 否
2 caipin_id Integer 菜品 是
3 yonghu_id Integer 用户 是
4 caipin_collection_types Integer 类型 是
5 insert_time Date 收藏时间 是
6 create_time Date 创建时间 是
表4.3菜品评价表
序号 列名 数据类型 说明 允许空
1 id Int 编号 否
2 caipin_id Integer 菜品 是
3 yonghu_id Integer 用户 是
4 caipin_commentback_text String 评价内容 是
5 insert_time Date 评价时间 是
6 reply_text String 回复内容 是
7 update_time Date 回复时间 是
8 create_time Date 创建时间 是
表4.4菜品订单表
序号 列名 数据类型 说明 允许空
1 id Int 编号 否
2 caipin_order_uuid_number String 订单号 是
3 caipin_id Integer 菜品 是
4 yonghu_id Integer 用户 是
5 buy_number Integer 预定数量 是
6 caipin_order_time Date 预定时间 是
7 caipin_order_true_price BigDecimal 实付价格 是
8 caipin_order_types Integer 订单类型 是
9 caipin_order_payment_types Integer 支付类型 是
10 insert_time Date 订单创建时间 是
11 create_time Date 创建时间 是
表4.5字典表
序号 列名 数据类型 说明 允许空
1 id Int 编号 否
2 dic_code String 字段 是
3 dic_name String 字段名 是
4 code_index Integer 编码 是
5 index_name String 编码名字 是
6 super_id Integer 父字段编号 是
7 beizhu String 备注 是
8 create_time Date 创建时间 是
表4.6论坛表
序号 列名 数据类型 说明 允许空
1 id Int 编号 否
2 forum_name String 帖子标题 是
3 yonghu_id Integer 用户 是
4 yuangong_id Integer 员工 是
5 users_id Integer 管理员 是
6 forum_content String 发布内容 是
7 super_ids Integer 父编号 是
8 forum_state_types Integer 帖子状态 是
9 insert_time Date 发帖时间 是
10 update_time Date 修改时间 是
11 create_time Date 创建时间 是
表4.7供应商表
序号 列名 数据类型 说明 允许空
1 id Int 编号 否
2 gongyingshang_name String 供应商名称 是
3 gongyingshang_phone String 联系方式 是
4 gongyingshang_email String 供应物品 是
5 gongyingshang_types Integer 物品类型 是
6 gongyingshang_money BigDecimal 供应价格 是
7 gongyingshang_content String 供应物品简介 是
8 create_time Date 创建时间 是
表4.8公告信息表
序号 列名 数据类型 说明 允许空
1 id Int 编号 否
2 news_name String 公告标题 是
3 news_types Integer 公告类型 是
4 news_photo String 公告图片 是
5 insert_time Date 添加时间 是
6 news_content String 公告详情 是
7 create_time Date 创建时间 是
表4.9单页数据表
序号 列名 数据类型 说明 允许空
1 id Int 编号 否
2 single_seach_name String 名字 是
3 single_seach_types Integer 数据类型 是
4 single_seach_content String 内容 是
5 create_time Date 创建时间 是
表4.10用户表
序号 列名 数据类型 说明 允许空
1 id Int 编号 否
2 yonghu_name String 用户姓名 是
3 yonghu_phone String 用户手机号 是
4 yonghu_id_number String 用户身份证号 是
5 yonghu_photo String 用户头像 是
6 yonghu_email String 电子邮箱 是
7 new_money BigDecimal 余额 是
8 yonghu_sum_jifen BigDecimal 总积分 是
9 yonghu_new_jifen BigDecimal 现积分 是
10 huiyuandengji_types Integer 会员等级 是
11 create_time Date 创建时间 是
表4.11员工表
序号 列名 数据类型 说明 允许空
1 id Int 编号 否
2 yuangong_name String 员工姓名 是
3 yuangong_phone String 员工手机号 是
4 yuangong_id_number String 员工身份证号 是
5 yuangong_photo String 员工头像 是
6 yuangong_email String 电子邮箱 是
7 create_time Date 创建时间 是
表4.12管理员表
序号 列名 数据类型 说明 允许空
1 id Int 编号 否
2 username String 用户名 是
3 password String 密码 是
4 role String 角色 是
5 addtime Date 新增时间 是
2 系统实现
5.1用户信息管理
如图5.1显示的就是用户信息管理页面,此页面提供给管理员的功能有:用户信息的查询管理,可以删除用户信息、修改用户信息、新增用户信息,
还进行了对用户名称的模糊查询的条件
图5.1 用户信息管理页面
5.2 菜品信息管理
如图5.2显示的就是菜品信息管理页面,此页面提供给管理员的功能有:查看已发布的菜品信息数据,修改菜品信息,菜品信息作废,即可删除,还进行了对菜品信息名称的模糊查询 菜品信息信息的类型查询等等一些条件。
图5.2 菜品信息管理页面
5.3菜品评论管理
如图5.3显示的就是菜品评论管理页面,此页面提供给管理员的功能有:根据菜品评论进行条件查询,还可以对菜品评论进行新增、修改、查询操作等等。
图5.3 菜品评论管理页面
5.1公告信息管理
如图5.4显示的就是公告信息管理页面,此页面提供给管理员的功能有:根据公告信息进行新增、修改、查询操作等等。
图5.4 公告信息管理页面