一,环境介绍
语言环境:Java: jdk1.8
数据库:Mysql: mysql5.7
应用服务器:Tomcat: tomcat8.5.31
开发工具:IDEA或eclipse
二,项目简介
汽车销售管理信息系统是根据用户订单和市场预测,从而进行商品(汽车)采购后完成商品编码进而完成车辆入库,进行商品报价,录入客户信息,根据订单生成销售单,按照要求把商品(汽车)送至客户处。通过这些功能分析和客户要求对汽车销售管理信息系统进行需求分析、系统结构设计、系统功能结构设计以及数据库设计,并基于Idea2022这一编程平台和MySQL数据库开发工具,进行系统编程开发和数据库的设计,最终实现汽车销售管理信息的计算机化管理(开发汽车销售管理信息系统)。汽车销售管理信息系统通过对各个实体进行编码,使各个实体在业务流过程中的信息更加准确,全面,安全。通过对历史数据的分析对比完成市场分析的功能。以及通过对不同顾客类别的研究,来制定不同的营销策略。
本项目存在两个个角色:用户和管理员,用户对应使用的是前台管理系统,而管理员对应使用后台管理系统。前台管理系统包括顾客个人信息管理、汽车展示、个人订单管理模块,购物车管理、汽车购物支付模块、汽车评论模块等,后台管理系统包括汽车评论管理模块、用户管理模块、汽车信息、种类管理模块、、数据可视化和公告管理模块、所有订单信息管理模块等。其主要功能模块图如图1-1所示:
图3-1功能模块图
前台管理系统
用户对象:
(1)用户可以针对个人信息内容进行修改,但是不能进行删除。
(2)用户可以浏览前台系统页面上的汽车产品并加入购物车,还可以对该产品进行数量上的添加或者删除,然后进行购物车下单,进行支付,支付成功即购买成功。
(3)用户可以进行汽车评论功能,查看汽车具体信息,评论和收藏汽车。
(4)顾客可以查看自己的所有汽车订单信息,还可以查看评论的订单详情。
图3-2前台管理系统功能模块图
后台管理系统:
管理员对象:
(1)管理员可以对自己的个人信息进行修改操作,不能进行删除,因为一个系统只会有一个管理员,如若删除是不符合事实的。
(2)管理员可以对该系统内所有用户的个人信息进行增加、修改操作,并且还可以对用户进行备注描述,方便查询特殊指定人群。
(3)管理员可以对汽车分类、汽车信息类型和类目进行管理,并且进行增删查改操作。
(4)管理员可以查看所有汽车订单和销售统计分析进行查看。
(5)公告管理:管理员可以通过预览模式进行修改、删除首页公告的展示。
(6)评论收藏:可以删除和回复评论。
图3-3后台管理系统功能模块图
三,系统展示
5.1 登录注册
首页界面实现如图5-1所示,登录界面实现如图5-2所示,注册界面如图5-3所示,未登录可以正常查看管理系统首页、公告信息内容和产品内容,但是无法进行购买产品和预约q项目订单和查看购物车、订单详情等。需要购物或者预约项目必须登录用户账号或者用户注册一个新的账号。用户如果已经有账号,可以勾选选择我这一栏,方便用户下次直接登录不需要每次要用系统前登录,这样就能更加方便简洁灵活使用该系统。
图5-1 首页界面
图5-2 登录界面
图5-3 注册界面
5.2 购物车管理
用户想要购买产品的时候,进入产品页面,选购自己想要的物品,将它加入购物车,进入到购物车页面的时候,用户根据自己想要购买的数量进行数量改变,确认购买后,用户点击购买,会自动跳转到支付页面,用户支付成功后页面会自动跳转到订单详情页面,供用户方便快速查看自己的订单。汽车产品展示界面如图5-4所示,购物车界面如图5-5所示,沙箱支付界面如图5-6所示,订单展示界面如图5-7所示。
图5-4 汽车产品展示界面
图5-5 购物车界面
图5-6 沙箱支付界面
图5-7 订单展示界面
图5-9 评论留言详情界面
图5-10 个人信息管理界面
图5-11 汽车销量榜界面
后台管理
汽车 产品
四,核心代码展示
package com.app.controller; import java.io.File; import java.util.List; import java.util.UUID; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.multipart.MultipartFile; import org.springframework.web.servlet.ModelAndView; import com.app.entity.Members; import com.app.service.MembersService; import com.app.service.MorderService; import com.app.utils.MainUtils; @Controller @RequestMapping("/members") public class MembersController { @Resource MembersService membersService; @RequestMapping("/add") public String membersAdd() { return "members/add"; } @RequestMapping("/addemps") public String addemps() { return "members/addemps"; } @RequestMapping("/profile") public String profile(HttpSession session, Model model,Integer id) { int userid = Integer .parseInt(session.getAttribute("userid").toString()); if(id!=null) userid=id; model.addAttribute("edituser", membersService.getMembersById(userid)); return "members/profile"; } @RequestMapping("/charge") public String charge(HttpSession session, Model model,Integer id) { int userid = Integer .parseInt(session.getAttribute("userid").toString()); if(id!=null) userid=id; model.addAttribute("edituser", membersService.getMembersById(userid)); return "members/charge"; } @RequestMapping("/password") public String password(HttpSession session, Model model,Integer id) { int userid = Integer .parseInt(session.getAttribute("userid").toString()); if(id!=null) userid=id; model.addAttribute("edituser", membersService.getMembersById(userid)); return "members/password"; } @RequestMapping("/pas") public String pas(String grade,HttpSession session, Model model,Integer id) { int userid = id; Members m =membersService.getMembersById(userid); m.setGrade(grade);session.setAttribute("logined", m); membersService.update(m); return "redirect:customer"; } @RequestMapping("/avatar") public String avatar(HttpSession session, Model model,Integer id) { int userid = Integer .parseInt(session.getAttribute("userid").toString()); if(id!=null) userid=id; model.addAttribute("edituser", membersService.getMembersById(userid)); return "members/avatar"; } @RequestMapping(value = "/update", method = RequestMethod.POST) public String update(Integer id, Integer sex, String address,String maincontent, String email, String qq,String tel, Model model) { Members editUser = membersService.getMembersById(id); editUser.setSex(sex.toString()); editUser.setAddress(address); editUser.setMaincontent(maincontent); editUser.setEmail(email); editUser.setTel(tel); editUser.setQq(qq); membersService.update(editUser); model.addAttribute("inpost", true); model.addAttribute("id", editUser.getId()); model.addAttribute("message", "资料信息更新成功!"); return "members/profile"; } @RequestMapping(value = "/update2", method = RequestMethod.POST) public String update2(Integer id, String thumb, Model model) { Members editUser = membersService.getMembersById(id); editUser.setThumb(thumb); membersService.update(editUser); model.addAttribute("id", editUser.getId()); model.addAttribute("inpost", true); model.addAttribute("message", "头像上传成功!"); return "members/avatar"; } @RequestMapping(value = "/update1", method = RequestMethod.POST) public String update1(Integer id, String password, String password2, Model model) { Members editUser = membersService.getMembersById(id); if (!password.equals(password2)) { model.addAttribute("state", 0); model.addAttribute("message", "失败:两次输入密码不一致!"); } else { editUser.setPassword(password); membersService.update(editUser); model.addAttribute("state", 1); model.addAttribute("id", editUser.getId()); model.addAttribute("message", "密码重置成功!"); } return "members/password"; } @RequestMapping(value="/save",method = RequestMethod.POST) public String membersSave(String username, String password, String sex, String birthday, String address, String email, String qq, String tel, String money, String thumb, String grade, String type, String created, String updated, String status, String jf, String age, String maincontent, String description, Model model) { Members modelX = new Members(); modelX.setUsername(username); modelX.setPassword(password); modelX.setSex(sex); modelX.setBirthday(birthday); modelX.setAddress(address); modelX.setEmail(email); modelX.setQq(qq); modelX.setTel(tel); modelX.setMoney("999999"); modelX.setGrade(grade); modelX.setType("1"); modelX.setCreated(MainUtils.getTime()); modelX.setUpdated(updated); modelX.setStatus(status); modelX.setJf(jf); modelX.setAge(age); modelX.setMaincontent(maincontent); modelX.setDescription(description); membersService.insert(modelX); model.addAttribute("inpost", true); model.addAttribute("message", "新增客户成功!"); return "members/add"; } @RequestMapping("/delete") public String membersDelete(int id) { membersService.delete(id); return "redirect:customer"; } @RequestMapping("/delete1") public String membersDelete1(int id) { membersService.delete(id); return "redirect:emps"; } @RequestMapping("/customer") public ModelAndView customer() { List<Members> membersList = membersService.getMembersByType(1); System.out.println(membersList.size()); ModelAndView mav = new ModelAndView("members/customer"); mav.addObject("list", membersList); return mav; } @Resource MorderService morderService; @RequestMapping("/orders") public ModelAndView orders() { List<Members> membersList = membersService.getMembersByType(1); for (Members members : membersList) { members.setLs(morderService.getMorderByUid(members.getId())); } System.out.println(membersList.size()); ModelAndView mav = new ModelAndView("members/orders"); mav.addObject("list", membersList); return mav; } }
package com.app.controller; import java.util.List; import javax.annotation.Resource; import javax.servlet.http.HttpSession; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.RestController; import com.app.entity.Members; import com.app.entity.Setting; import com.app.service.MembersService; import com.app.service.SettingService; import com.app.utils.MainUtils; @Controller @RequestMapping("/manage") public class ManageController { @Resource MembersService ms; @RequestMapping("/index") public String index(HttpSession session) { if (session.getAttribute("userid") != null) return "index"; else return "login"; } @RequestMapping("/mobile") public String mobile(HttpSession session) { return "mobile"; } @ResponseBody @RequestMapping("/code") public String code(String tel,HttpSession session) { List<Members> list = ms.getMembersByTel(tel); if(list.size()==0){ return "0"; }else{ String code =String.valueOf((Math.random()*9+1)*100000); code = code.substring(0, 6); Members m = list.get(0); m.setGrade(code.toString()); ms.update(m); return code.toString(); } } @RequestMapping("/quit") public String quit(HttpSession session) { session.setAttribute("logined", null); session.setAttribute("userid", null); session.setAttribute("username", null); session.setAttribute("usertype", null); return "redirect:index"; } @Resource SettingService settingService; @RequestMapping(value = "/login", method = RequestMethod.POST) public String login(String username, String password, HttpSession session, Model model) { System.out.println("Username:" + username); System.out.println("Password:" + password); Members entity = new Members(); entity.setUsername(username); entity.setPassword(password); List<Members> list = ms.login(entity); if (list.size() > 0) { Members loginUser = list.get(0); Setting modelX = settingService.getSettingById(1); int count = Integer.parseInt(modelX.getCount()); modelX.setCount((count+1)+""); settingService.update(modelX); session.setAttribute("logined", loginUser); session.setAttribute("userid", loginUser.getId()); session.setAttribute("username", loginUser.getUsername()); session.setAttribute("usertype", loginUser.getType()); session.setAttribute("avatar", loginUser.getThumb()); model.addAttribute("state", 1); model.addAttribute("message", "登录成功!正在跳转"); } else { model.addAttribute("state", 0); model.addAttribute("message", "登录失败,请检查您的账号密码!"); } return "login"; } @Resource MembersService membersService; @RequestMapping("/hy") public String hy(String grade,HttpSession session, Model model,Integer id) { int userid = id; Members m =membersService.getMembersById(userid); m.setGrade(grade);session.setAttribute("logined", m); membersService.update(m); return "index"; } @RequestMapping(value = "/mobilelogin", method = RequestMethod.POST) public String mobilelogin(String username, String password, HttpSession session, Model model) { System.out.println("Username:" + username); System.out.println("Password:" + password); Members entity = new Members(); entity.setTel(username); entity.setGrade(password); List<Members> list = ms.login2(entity); if (list.size() > 0) { Members loginUser = list.get(0); Setting modelX = settingService.getSettingById(1); int count = Integer.parseInt(modelX.getCount()); modelX.setCount((count+1)+""); settingService.update(modelX); session.setAttribute("logined", loginUser); session.setAttribute("userid", loginUser.getId()); session.setAttribute("username", loginUser.getUsername()); session.setAttribute("usertype", loginUser.getType()); session.setAttribute("avatar", loginUser.getThumb()); model.addAttribute("state", 1); model.addAttribute("message", "登录成功!正在跳转"); } else { model.addAttribute("state", 0); model.addAttribute("message", "登录失败,请检查您的账号密码!"); } return "mobile"; } }
package com.app.controller; import java.io.File; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.LinkedList; import java.util.List; import java.util.UUID; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.multipart.MultipartFile; import org.springframework.web.servlet.ModelAndView; import com.app.entity.*; import com.app.service.*; @Controller @RequestMapping("/morder") public class MorderController { @Resource MorderService morderService; @RequestMapping("/morder/add") public String morderAdd() { return "admin/morder/add"; } @RequestMapping(value = "/morder/save", method = RequestMethod.POST) public String morderSave(String order_id, String price, String total, String uid, String pid, String cuid, String num, String content, String step, String updated, String created, String status, String buyer, String pname, String type, String saler, String shopid, String shopname, String ordersn, String y, String m, String d, Model model) { Morder modelX = new Morder(); modelX.setOrder_id(order_id); modelX.setPrice(price); modelX.setTotal(total); modelX.setUid(uid); modelX.setPid(pid); modelX.setCuid(cuid); modelX.setNum(num); modelX.setContent(content); modelX.setStep(step); modelX.setUpdated(updated); modelX.setCreated(created); modelX.setStatus(status); modelX.setBuyer(buyer); modelX.setPname(pname); modelX.setType(type); modelX.setSaler(saler); modelX.setShopid(shopid); modelX.setShopname(shopname); modelX.setOrdersn(ordersn); modelX.setY(y); modelX.setM(m); modelX.setD(d); morderService.insert(modelX); model.addAttribute("inpost", true); model.addAttribute("message", "Success!"); return "admin/morder/add"; } @RequestMapping("/morder/delete") public String morderDelete(int id) { morderService.delete(id); return "redirect:list"; } @Resource ProductsService productsService; @Resource MembersService membersService; @RequestMapping("/list") public ModelAndView morderList() { List<Morder> morderList = morderService.getAllMorder(); List<Morder> morderList1 = new ArrayList<Morder>(); for (Morder morder : morderList) { morder.setMe(membersService.getMembersById(Integer.parseInt(morder.getUid()))); } System.out.println(morderList.size()); ModelAndView mav = new ModelAndView("morder/list"); mav.addObject("list", morderList); return mav; } @RequestMapping("/sj") public ModelAndView sj(String order) { List<Members> list = membersService.getMembersByType(1); for (Members members : list) { List<Morder> morderList = morderService.getMorderByUid(members.getId()); int money =0; for (Morder morder : morderList) { if(morder.getShopid().equals(members.getId()+"")){ money+=Integer.parseInt(morder.getTotal()); } } members.setJf(morderList.size()+""); members.setMoney(money+""); } List<Morder> morderList = morderService.getAllMorder(); System.out.println(morderList.size()); ModelAndView mav = new ModelAndView("morder/sj"); if(order!=null&&order.equals("jf")) { Collections.sort(list,new Comparator<Members>() { public int compare(Members o1, Members o2) { return Integer.parseInt(o2.getJf())-Integer.parseInt(o1.getJf()); } }); } if(order!=null&&order.equals("money")) { Collections.sort(list,new Comparator<Members>() { public int compare(Members o1, Members o2) { return Integer.parseInt(o2.getMoney())-Integer.parseInt(o1.getMoney()); } }); } mav.addObject("list", list); return mav; } @RequestMapping("/report") public ModelAndView report(String order,Integer y,Integer m,Integer d) { List<Products> list = productsService.getAllProducts(); for (Products products : list) { List<Morder> os = morderService.getMorderByPid(products.getId()); List<Morder> os1 = new LinkedList<Morder>(); int price=0; for (Morder morder : os) { price+=Integer.parseInt(morder.getTotal()); if(y!=null){ if(!y.toString().equals(morder.getY())) continue; } if(m!=null){ if(!m.toString().equals(morder.getM())) continue; } if(d!=null){ if(!d.toString().equals(morder.getD())) continue; } os1.add(morder); } products.setPrice(price+""); products.setList(os1); } if(order!=null&&order.equals("jf")) { Collections.sort(list,new Comparator<Products>() { public int compare(Products o1, Products o2) { return o2.getList().size()-o1.getList().size(); } }); } if(order!=null&&order.equals("money")) { Collections.sort(list,new Comparator<Products>() { public int compare(Products o1, Products o2) { return Integer.parseInt(o2.getPrice())-Integer.parseInt(o1.getPrice()); } }); } ModelAndView mav = new ModelAndView("morder/report"); mav.addObject("list", list); return mav; } @Resource InviceService inviceService; @RequestMapping("/morder/ts") public ModelAndView ts() { List<Invice> inviceList = inviceService.getAllInvice(); // System.out.println(inviceList.size()); for (Invice invice : inviceList) { invice.setM(membersService.getMembersById(Integer.parseInt(invice .getUid()))); invice.setP(productsService.getProductsById(Integer.parseInt(invice .getMid()))); invice.setM1(membersService.getMembersById(Integer.parseInt(invice .getType()))); } ModelAndView mav = new ModelAndView("morder/ts"); mav.addObject("list", inviceList); return mav; } @RequestMapping("/morder/tslist") public ModelAndView tslist() { List<Invice> inviceList = inviceService.getAllInvice(); // System.out.println(inviceList.size()); for (Invice invice : inviceList) { invice.setM(membersService.getMembersById(Integer.parseInt(invice .getUid()))); invice.setP(productsService.getProductsById(Integer.parseInt(invice .getMid()))); invice.setM1(membersService.getMembersById(Integer.parseInt(invice .getType()))); } ModelAndView mav = new ModelAndView("morder/tslist"); mav.addObject("list", inviceList); return mav; } @RequestMapping("/my") public ModelAndView my(HttpSession session) { int uid = Integer.parseInt(session.getAttribute("userid").toString()); List<Morder> morderList = morderService.getMorderByUid(uid); for (Morder morder : morderList) { morder.setMe(membersService.getMembersById(Integer.parseInt(morder.getUid()))); } System.out.println(morderList.size()); ModelAndView mav = new ModelAndView("morder/my"); mav.addObject("list", morderList); return mav; } @RequestMapping(value = "/morder/st") public String state(String ret, String status, int id, Model model) { Invice modelX = inviceService.getInviceById(id); modelX.setStatus(status); inviceService.update(modelX); model.addAttribute("inpost", true); model.addAttribute("model", modelX); model.addAttribute("message", "Success"); return "morder/"+ret; } @RequestMapping("/state") public String state(Model model, HttpSession session, Integer id, String ret, int step) { Morder modelX = morderService.getMorderById(id); modelX.setStep(step + ""); morderService.update(modelX); if(step==4){ Members mem = membersService.getMembersById(Integer.parseInt(modelX.getShopid())); Integer um = Integer.parseInt(mem.getMoney()); Integer mm = Integer.parseInt(modelX.getTotal()); Integer left = um+mm; morderService.update(modelX); mem.setMoney(left.toString()); membersService.update(mem); model.addAttribute("message", "操作成功:资金已打入卖家账号"); }else{ model.addAttribute("message", "操作成功"); } return "morder/" + ret; } @RequestMapping("/state2") public String state2(Model model, HttpSession session, Integer id,String ordersn, String ret, int step) { Morder modelX = morderService.getMorderById(id); Products ps = productsService.getProductsById(Integer.parseInt(modelX.getPid())); /*if(Integer.parseInt(ps.getStore())<Integer.parseInt(modelX.getNum())){ model.addAttribute("message", "对不起 库存告急"); }else{*/ Members mem = membersService.getMembersById(Integer.parseInt(session.getAttribute("userid").toString())); Integer um = Integer.parseInt(mem.getMoney()); Integer mm = Integer.parseInt(modelX.getTotal()); Integer left = um-mm; if(left<0){ model.addAttribute("message", "余额不足,请联系管理员充值"); }else{ modelX.setStep(step + ""); modelX.setOrdersn(ordersn); mem.setMoney(left.toString()); membersService.update(mem); morderService.update(modelX); model.addAttribute("message", "支付成功,您的资金将在确认收货后打入卖家账号"); } //} return "morder/" + ret; } @RequestMapping("/pay") public String pay(String id, Model model) { Morder morder = morderService.getMorderById(Integer.parseInt(id)); model.addAttribute("model", morder); return "admin/morder/pay"; } @RequestMapping("/pj") public String pj(String id, Model model) { Morder morder = morderService.getMorderById(Integer.parseInt(id)); model.addAttribute("model", morder); return "morder/pj"; } @RequestMapping("/wl") public String wl(String id, Model model) { Morder morder = morderService.getMorderById(Integer.parseInt(id)); model.addAttribute("model", morder); return "morder/wl"; } @RequestMapping("/fq") public String fq(String id, Model model) { Morder morder = morderService.getMorderById(Integer.parseInt(id)); model.addAttribute("model", morder); return "morder/fq"; } @RequestMapping("/morder/edit") public String morderEdit(String id, Model model) { Morder morder = morderService.getMorderById(Integer.parseInt(id)); model.addAttribute("model", morder); return "admin/morder/edit"; } @RequestMapping(value = "/update", method = RequestMethod.POST) public String morderUpdate( String content, String status, int id, Model model) { Morder modelX = morderService.getMorderById(id); modelX.setContent(content); modelX.setStatus(status); morderService.update(modelX); model.addAttribute("inpost", true); model.addAttribute("model", modelX); model.addAttribute("message", "评价成功"); return "morder/pj"; } @RequestMapping(value = "/update2", method = RequestMethod.POST) public String update2(String express, int id, Model model) { Morder modelX = morderService.getMorderById(id); modelX.setExpress(express); morderService.update(modelX); model.addAttribute("inpost", true); model.addAttribute("model", modelX); model.addAttribute("message", "物流更新成功"); return "morder/wl"; } }
五,项目总结
(1)用户信息表(members):该表是用户信息的主要存储表,其中存储的信息包括用户名,加密后的登录密码、用户角色、电话、性别、生日、用户描述和头像路径。
表4-1 用户信息表:t_user
字段名 |
数据类型 |
主键 |
自动增长 |
默认值 |
说明 |
id |
int |
是 |
是 |
自增Id |
|
username |
varchar(30) |
用户名 |
|||
password |
varchar(20) |
登录密码 |
|||
role |
varchar(20) |
角色 |
|||
phone |
varchar(15) |
电话 |
|||
sex |
varchar(15) |
性别 |
|||
birthday |
datetime |
生日 |
|||
description |
varvhar(255) |
用户描述 |
|||
headImgPath |
varchar(255) |
头像路径 |
4.3.3后台菜单权限表
表名(中文) |
表名(英文) |
||||
admin_menu_auth |
admin_menu_auth |
||||
序号 |
字段名 |
类型 |
长度 |
NULL |
说明 |
1 |
id |
smallint |
20 |
主键id |
|
2 |
controller |
varchar |
50 |
controller名称 |
|
3 |
action |
varchar |
50 |
action名称 |
|
4 |
name |
varchar |
50 |
菜单名称 |
|
5 |
classname |
varchar |
50 |
菜单元素的class样式 |
|
6 |
status |
tinyint |
状态 |
||
7 |
sort |
int |
11 |
排序 |
|
8 |
type |
tinyint |
类型 |
||
9 |
parent_id |
smallint |
父ID |
4.3.4后台角色表
表名(中文) |
表名(英文) |
||||
admin_role |
admin_role |
||||
序号 |
字段名 |
类型 |
长度 |
NULL |
说明 |
1 |
id |
int |
11 |
主键id |
|
2 |
name |
varchar |
50 |
角色名称 |
|
3 |
deleted |
tinyint |
是否已删除 |
后台用户表
表名(中文) |
表名(英文) |
||||
admin_user |
admin_user |
||||
序号 |
字段名 |
类型 |
长度 |
NULL |
说明 |
1 |
id |
int |
11 |
主键id |
|
2 |
username |
varchar |
128 |
用户名 |
|
3 |
password |
varchar |
128 |
用户密码 |
|
4 |
name |
varchar |
128 |
用户姓名 |
|
5 |
salt |
varchar |
128 |
盐值 |
|
6 |
phone |
varchar |
128 |
手机 |
|
7 |
varchar |
128 |
邮箱 |
||
8 |
status |
tinyint |
状态 |
||
9 |
create_time |
bigint |
20 |
创建时间 |
|
10 |
is_super |
tinyint |
是否超级管理员 |
||
11 |
consumer |
varchar |
200 |
使用者 |
|
12 |
remark |
varchar |
500 |
备注 |
|
13 |
dept |
varchar |
200 |
部门名称 |
4.3.5后台用户角色关联表
表名(中文) |
表名(英文) |
||||
admin_user_role |
admin_user_role |
||||
序号 |
字段名 |
类型 |
长度 |
NULL |
说明 |
1 |
id |
int |
11 |
主键id |
|
2 |
user_id |
int |
11 |
关联用户id |
|
3 |
role_id |
int |
11 |
关联角色id |
4.3.6后台角色菜单关联表
表名(中文) |
表名(英文) |
||||
admin_role_menu |
admin_role_menu |
||||
序号 |
字段名 |
类型 |
长度 |
NULL |
说明 |
1 |
role_id |
int |
11 |
角色id 组合主键 |
|
2 |
menu_id |
int |
11 |
菜单id 组合主键 |
(5)订单表(t_order):该表是汽车产品的订单信息存储表,其中存储的信息包含订单编码、订单所属用户Id、订单总数量、订单总价格、订单创建时间和订单状态。
表4-5 订单表:t_order
字段名 |
数据类型 |
主键 |
自动增长 |
默认值 |
说明 |
id |
int |
是 |
是 |
自增Id |
|
code |
varchar(255) |
订单编码 |
|||
userId |
int |
订单所属用户Id |
|||
totalCount |
int |
订单总数量 |
|||
totalPrice |
decimal(11,2) |
订单总价格 |
|||
createDate |
datetime |
订单创建时间 |
|||
status |
int |
订单状态 |
(6)订单详情表(t_order_details):该表是订单详情信息的存储表,存储的信息包括订单Id,汽车产品的名称和图片路径、数量和小计。
表4-6 订单详情表:t_order_details
字段名 |
数据类型 |
主键 |
自动增长 |
默认值 |
说明 |
id |
int |
是 |
是 |
自增Id |
|
orderId |
int |
订单Id |
|||
productName |
varchar(255) |
产品名称 |
|||
productPhotoPath |
varchar(255) |
产品图片路径 |
|||
count |
int |
数量 |
|||
price |
decimal(11,2) |
小计 |
(7)公共信息表(t_index_content):该表是首页公告信息的存储表,存储的信息包括公告内容类型和具体的内容。
表4-7 公告信息表:t_index_content
字段名 |
数据类型 |
主键 |
自动增长 |
默认值 |
说明 |
id |
int |
是 |
是 |
自增Id |
|
contentType |
varchar(255) |
内容类型 |
|||
content |
varchar(255) |
具体内容 |