基于javaweb+mysql的springboot+mybatis服装店门店信息管理系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Layui Ajax)
运行环境
Java≥8、MySQL≥5.7
开发工具
eclipse/idea/myeclipse/sts等均可配置运行
技术框架
JavaBean MVC JSP SpringBoot MyBatis MySQL CSS JavaScript Layui Ajax
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明
登录、注册、退出、用户模块、公告模块、供应商模块、商品模块、进货模块、库存盘点、销售模块的增删改查管理
eclipse/MyEclipse运行:
idea运行:
response.sendRedirect("user_" + to + ".jsp");
}
/**
* 根据条件查询用户的列表并跳转回页面
*
* @param response
* @param request
* @throws IOException
*/
@RequestMapping("userList")
public void list(HttpServletResponse response, HttpServletRequest request) throws IOException {
this.redirectList(request, response);
}
/**
* 跳转到列表页面
*
* @param request
* @param response
*/
private void redirectList(HttpServletRequest request, HttpServletResponse response) throws IOException {
//查询列和关键字
String searchColumn = request.getParameter("searchColumn");
String keyword = request.getParameter("keyword");
Map<String, Object> params = new HashMap();//用来保存控制层传进来的参数(查询条件)
params.put("searchColumn", searchColumn);//要查询的列
params.put("keyword", keyword);//查询的关键字
response.getWriter().println(com.alibaba.fastjson.JSONObject.toJSONString(userService.list(params).get("list")));
}
}
/**
* 根据条件查询进货的列表并跳转回页面
*
* @param response
* @param request
* @throws IOException
*/
@RequestMapping("jinghuoList")
public void list(HttpServletResponse response, HttpServletRequest request) throws IOException {
this.redirectList(request, response);
}
/**
* 跳转到列表页面
*
* @param request
* @param response
*/
private void redirectList(HttpServletRequest request, HttpServletResponse response) throws IOException {
//查询列和关键字
String searchColumn = request.getParameter("searchColumn");
String keyword = request.getParameter("keyword");
Map<String, Object> params = new HashMap();//用来保存控制层传进来的参数(查询条件)
params.put("searchColumn", searchColumn);//要查询的列
params.put("keyword", keyword);//查询的关键字
response.getWriter().println(com.alibaba.fastjson.JSONObject.toJSONString(jinghuoService.list(params).get("list")));
}
}
* 增加商品
*
* @param response
* @param request
* @throws IOException
*/
@RequestMapping("goodAdd")
public void add(Good vo, HttpServletResponse response, HttpServletRequest request) throws IOException {
//调用Service层的增加(insert)方法
goodService.insert(vo);
this.redirectList(request, response);
}
/**
* 删除商品
*
* @param response
* @param request
* @throws IOException
*/
@RequestMapping("goodDelete")
public void delete(HttpServletResponse response, HttpServletRequest request) throws IOException {
Serializable id = request.getParameter("id");
goodService.delete(Arrays.asList(id));
this.redirectList(request, response);
}
/**
* 编辑商品
*
* @param response
* @param request
* @throws IOException
*/
@RequestMapping("goodEdit")
public void edit(Good vo, HttpServletResponse response, HttpServletRequest request) throws IOException {
goodService.update(vo);
this.redirectList(request, response);
}
/**
* 获取商品的详细信息(详情页面与编辑页面要显示该商品的详情)并跳转回页面
*
* @param response
* @param request
* @throws IOException
*/
@RequestMapping({
"goodGet", "goodEditPre"})
public void get(HttpServletResponse response, HttpServletRequest request) throws IOException {
Serializable id = request.getParameter("id");//取出主键id
* @param response
* @param request
* @throws IOException
*/
@RequestMapping("xiaoshouDelete")
public void delete(HttpServletResponse response, HttpServletRequest request) throws IOException {
Serializable id = request.getParameter("id");
xiaoshouService.delete(Arrays.asList(id));
this.redirectList(request, response);
}
/**
* 编辑销售
*
* @param response
* @param request
* @throws IOException
*/
@RequestMapping("xiaoshouEdit")
public void edit(Xiaoshou vo, HttpServletResponse response, HttpServletRequest request) throws IOException {
xiaoshouService.update(vo);
this.redirectList(request, response);
}
/**
* 获取销售的详细信息(详情页面与编辑页面要显示该销售的详情)并跳转回页面
*
* @param response
* @param request
* @throws IOException
*/
@RequestMapping({
"xiaoshouGet", "xiaoshouEditPre"})
public void get(HttpServletResponse response, HttpServletRequest request) throws IOException {
Serializable id = request.getParameter("id");//取出主键id
Xiaoshou vo = xiaoshouService.get(id);
request.getSession().setAttribute("vo"<