Java项目:网吧管理系统(java+SpringBoot+Vue+ElementUI+Layui+Mysql)
项目介绍基于SpringBoot Vue的网吧管理系统角色:管理员、网管、会员管理员:管理员登录进入系统可以查看首页,个人中心,会员管理,网管管理,商品类型管理,商品信息管理,购买商品管理,呼叫网管管理,电脑信息管理,用户上机管理,用户下机管理等功能,并进行详细操作网管:网管登录进入系统可以查看首页,个人中心,会员管理,商品信息管理,购买商品管理,呼叫网管管理,电脑信息管理,用户上机管理,用户下机
源码获取:俺的博客首页 "资源" 里下载!
项目介绍
基于SpringBoot Vue的网吧管理系统
角色:管理员、网管、会员
管理员:管理员登录进入系统可以查看首页,个人中心,会员管理,网管管理,商品类型管理,商品信息管理,购买商品管理,呼叫网管管理,电脑信息管理,用户上机管理,用户下机管理等功能,并进行详细操作
网管:网管登录进入系统可以查看首页,个人中心,会员管理,商品信息管理,购买商品管理,呼叫网管管理,电脑信息管理,用户上机管理,用户下机管理等功能,并进行详细操作
会员:会员登录进入系统可以查看首页,个人中心,商品信息管理,购买商品管理,呼叫网管管理,电脑信息管理,用户上机管理,用户下机管理等功能,并进行详细操作
环境需要
1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。
2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA;
3.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS;
4.数据库:MySql 5.7/8.0版本均可;
5.是否Maven项目:是;
技术栈
后端:SpringBoot+Mybaits
前端:Vue+ElementUI+Layui+HTML+CSS+JS
使用说明
项目运行:
1. 使用Navicat或者其它工具,在mysql中创建对应sql文件名称的数据库,并导入项目的sql文件;
2. 使用IDEA/Eclipse/MyEclipse导入项目,导入成功后请执行maven clean;maven install命令,然后运行;
3. 将项目中application.yml配置文件中的数据库配置改为自己的配置;
文档介绍(课题背景与意义、系统实现功能、课题研究现状、系统相关技术、java技术、B/S架构、Mysql介绍、Mysql环境配置、Springboot框架、系统需求分析、系统功能、可行性研究、经济可行性、技术可行性、运行可行性、事件可行性、系统业务过程分析、系统业务过程分析、系统用例图、系统设计、数据库设计、系统整体设计、系统设计思想、系统流程图、系统详情设计、系统功能模块、系统功能模块、管理员功能模块):
商品信息列表展示:
电脑信息列表展示:
后台登录管理页面:
各种支付方式展示:
机位计费信息控制层:
@Controller
public class table {
@Resource
private tableService t;
@Resource
private turnoverService turn;
@Resource
private salwaterService sal;
@Resource
private memberService mm;
// 初始化机位计费信息
@RequestMapping(value = "/initServlet", method = RequestMethod.POST)
@ResponseBody
public String doInit() throws Exception {
int[] list = { 1, 2, 3, 4, 5 };
String[] arr = t.getInit(list);
Map map = new HashMap();
map.put("yi", arr[0]);
map.put("er", arr[1]);
map.put("san", arr[2]);
map.put("si", arr[3]);
map.put("wu", arr[4]);
String json = JSON.toJSONString(map);
return json;
}
// 开机操作
@RequestMapping(value = "/open", method = RequestMethod.POST)
@ResponseBody
public String openTable(@RequestParam int taihao) throws Exception {
ballinfo ball = new ballinfo();
ball.setTableid(taihao);
int count = t.doOpen(ball);
Map map = new HashMap();
map.put("xin", count);
return JSON.toJSONString(map);
}
// 结账数据查询
@RequestMapping(value = "/jieZhangServlet", method = RequestMethod.POST)
@ResponseBody
public String tableInfo(@RequestParam int taihao) throws Exception {
List list = t.tableInfo(taihao);
Map map = new HashMap();
map.put("openTime", list.get(0));
map.put("usedTime", list.get(1));
map.put("taifei", list.get(2));
map.put("water", list.get(3));
map.put("zongJi", list.get(4));
return JSON.toJSONString(map);
}
// 刷卡结账后操作
@RequestMapping(value = "/afterJieServlet", method = RequestMethod.POST)
@ResponseBody
public String shuaka(@RequestParam int kahao, @RequestParam double zongji, @RequestParam int taihao,
HttpServletRequest req) throws Exception {
// 消费信息计入营业额
String man = (String) req.getSession().getAttribute("info");
turnover tur = new turnover();
tur.setTaihao(taihao);
tur.setPrice(zongji);
tur.setMan(man);
turn.shuaka(tur);
// 对会员卡内余额扣除操作
Member mem = new Member();
mem.setMemid(kahao);
mem.setYue(zongji);
mm.updateYue(mem);
// 清除该机位的烟饮料消费记录
salwater s = new salwater();
s.setTaihao(taihao);
sal.deleteInfo(s);
// 对机位状态初始化
ballinfo ball = new ballinfo();
ball.setTableid(taihao);
t.doCloseTable(ball);
Map map = new HashMap();
map.put("rs", "yeah");
return JSON.toJSONString(map);
}
// 现金结账后操作
@RequestMapping(value = "/xianjin", method = RequestMethod.POST)
@ResponseBody
public String xianJin(@RequestParam double zongji, @RequestParam int taihao, HttpServletRequest req)
throws Exception {
// 消费信息计入营业额
String man = (String) req.getSession().getAttribute("info");
turnover tur = new turnover();
tur.setTaihao(taihao);
tur.setPrice(zongji);
tur.setMan(man);
turn.shuaka(tur);
// 清除该机位的烟饮料消费记录
salwater s = new salwater();
s.setTaihao(taihao);
sal.deleteInfo(s);
// 对机位状态初始化
ballinfo ball = new ballinfo();
ball.setTableid(taihao);
int a = t.doCloseTable(ball);
Map map = new HashMap();
map.put("fan", a);
return JSON.toJSONString(map);
}
}
登录管理控制层:
@Controller
public class account {
@Resource
private service ser;
// 验证登录账号和密码
@RequestMapping(value = "/loginServlet", method = RequestMethod.POST)
@ResponseBody
public String doLogin(@RequestParam String name, @RequestParam String pwd, HttpServletRequest request,
HttpSession session) throws Exception {
Manager manager = new Manager();
manager.setAccount(name);
manager.setPassword(md5test.getMD5(pwd));
Manager man = ser.getNamePwd(manager);
Map map = new HashMap();
if (man != null) {
// 查询结果存在,则跳转回本页面
session.setAttribute("info", man.getAccount());
map.put("result", "you");
return JSON.toJSONString(map);
} else {
// 页面跳转(index.jsp)带出提示信息--转发
map.put("result", "wu");
return JSON.toJSONString(map);
}
}
// 验证用户名是否可用
@RequestMapping(value = "/zhuServlet", method = RequestMethod.POST)
@ResponseBody
public String doName(@RequestParam String name) throws Exception {
Manager manager = new Manager();
manager.setAccount(name);
Manager man = ser.selectName(manager);
Map map = new HashMap();
if (man != null) {
map.put("result", "you");
} else {
map.put("result", "wu");
}
return JSON.toJSONString(map);
}
// 注册用户
@RequestMapping(value = "/updateServlet", method = RequestMethod.POST)
public String doRegister(@RequestParam String name, @RequestParam String pwd, @RequestParam String quanXian)
throws Exception {
if (quanXian == null || !quanXian.equals("mana")) {
quanXian = "Service";
} else {
quanXian = "Manager";
}
Manager manager = new Manager();
manager.setAccount(name);
manager.setPassword(md5test.getMD5(pwd));
manager.setRank(quanXian);
try {
int a = ser.doRegister(manager);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return "index";
}
// 注销登录
@RequestMapping(value = "/guanbiServlet", method = RequestMethod.POST)
public String guanBi(@RequestParam String dayang, HttpServletRequest req, HttpServletResponse resp)
throws Exception {
req.getSession().removeAttribute("info");
String path = req.getContextPath();
String basePath = req.getScheme() + "://" + req.getServerName() + ":" + req.getServerPort() + path + "/";
if (dayang.equals("tui")) {
resp.sendRedirect(basePath + "index.jsp");
}
return null;
}
// 退出登录
@RequestMapping(value = "/tuichuServlet", method = RequestMethod.GET)
public String tuichu(HttpServletRequest req) throws Exception {
req.getSession().removeAttribute("info");
return "index";
}
}
会员管理控制层:
@Controller
public class member {
@Resource
private memberService mem;
@Resource
private turnoverService turn;
// 查询卡号是否存在,存在则返回相应的会员信息
@RequestMapping(value = "/shukaServlet", method = RequestMethod.POST)
@ResponseBody
public String getMemInfo(@RequestParam int kahao) throws Exception {
Member member = new Member();
member.setMemid(kahao);
Member m = new Member();
m = mem.getMemberInfo(member);
if (m != null) {
return JSON.toJSONString(m);
} else {
Map map = new HashMap();
map.put("mname", "wu");
return JSON.toJSONString(map);
}
}
// 获取信息总数量
@RequestMapping(value = "/getPageCount", method = RequestMethod.POST)
@ResponseBody
public String getPageCount(@RequestParam int pageSize) throws Exception {
Map map = new HashMap();
map.put("count",mem.getPageCount());
return JSON.toJSONString(map);
}
// 查询会员信息
@RequestMapping(value = "/chaVIPServlet", method = RequestMethod.POST)
@ResponseBody
public String chaVIPServlet(@RequestParam int pageNo, @RequestParam int pageSize) throws Exception {
pageModel pm = new pageModel();
pm.setPageNo((pageNo-1)*pageSize);
pm.setPageSize(pageSize);
return JSON.toJSONString(mem.chaVIPServlet(pm));
}
// 会员充值
@RequestMapping(value = "/chongServlet", method = RequestMethod.POST)
@ResponseBody
public String chongServlet(@RequestParam int kahao, @RequestParam double jine,HttpServletRequest req) throws Exception {
Member me = new Member();
me.setMemid(kahao);
me.setYue(jine);
mem.chongZhi(me);
String name=(String)req.getSession().getAttribute("info");
turnover t=new turnover();
t.setLaiyuan("会员充值");
t.setMan(name);
t.setPrice(jine);
t.setTaihao(kahao);
turn.chongVip(t);
return null;
}
// 删除会员
@RequestMapping(value = "/shanServlet", method = RequestMethod.POST)
@ResponseBody
public String shanServlet(@RequestParam int kahao) throws Exception {
Member me = new Member();
me.setMemid(kahao);
mem.shanChu(me);
return null;
}
// 新办会员查询卡号是否可用
@RequestMapping(value = "/kahaoServlet", method = RequestMethod.POST)
@ResponseBody
public String kahaoServlet(@RequestParam int num) throws Exception {
Member me = new Member();
me.setMemid(num);
Member a = new Member();
a = mem.chaKaHao(me);
if (a != null) {
return JSON.toJSONString(a);
} else {
Map map = new HashMap();
map.put("memid", "0");
return JSON.toJSONString(map);
}
}
// 添加会员
@RequestMapping(value = "/addvipServlet", method = RequestMethod.POST)
@ResponseBody
public String addvipServlet(@RequestParam int num, @RequestParam String pwd, @RequestParam String name,
@RequestParam double jine, @RequestParam String tel,HttpServletRequest req) throws Exception {
Member me = new Member();
me.setMemid(num);
me.setMname(name);
me.setMpsw(pwd);
me.setMtel(tel);
me.setYue(jine);
mem.addVip(me);
String aname=(String)req.getSession().getAttribute("info");
turnover t=new turnover();
t.setLaiyuan("新办会员");
t.setMan(aname);
t.setPrice(jine);
t.setTaihao(num);
turn.addVip(t);
return null;
}
}
营业额信息控制层:
@Controller
public class turnover {
@Resource
private turnoverService turn;
// 获取信息总数量
@RequestMapping(value = "/getTPageCount", method = RequestMethod.POST)
@ResponseBody
public String getPageCount(@RequestParam int pageSize) throws Exception {
Map map = new HashMap();
map.put("count", turn.getPageCount());
return JSON.toJSONString(map);
}
// 查询营业额信息,分页显示
@RequestMapping(value = "/chaYingServlet", method = RequestMethod.POST)
@ResponseBody
public String chaYingServlet(@RequestParam int pageNo, @RequestParam int pageSize) throws Exception {
pageModel pm = new pageModel();
pm.setPageNo((pageNo-1)*pageSize);
pm.setPageSize(pageSize);
List list = new ArrayList();
list = turn.chaYingServlet(pm);
return JSON.toJSONString(list);
}
// 结账打烊信息查询
@RequestMapping(value = "/dayangServlet", method = RequestMethod.POST)
@ResponseBody
public String daYang() throws Exception {
Map map = turn.daYang();
String json=JSON.toJSONString(map);
return json;
}
}
商品外卖控制层:
@Controller
public class water {
@Resource
private salwaterService sw;
// 烟饮料外卖
@RequestMapping(value = "/jiushuiServlet", method = RequestMethod.POST)
public String getMemInfo(@RequestParam int taihao, @RequestParam double zongji,HttpServletRequest req) throws Exception {
String man=(String)req.getSession().getAttribute("info");
// 外卖
if (taihao == 6) {
turnover t=new turnover();
t.setLaiyuan("外卖");
t.setMan(man);
t.setPrice(zongji);
sw.waimai(t);
} else {// 计入机费
salwater sal=new salwater();
sal.setMan(man);
sal.setPrice(zongji);
sal.setTaihao(taihao);
sw.taifei(sal);
}
return null;
}
}
源码获取:俺的博客首页 "资源" 里下载!
更多推荐
所有评论(0)