订单管家

订单管家

1. 简介

该系统实现了一个订单管理系统,整体功能模块划分为:公共命令、入口命令、账户信息、商品信息四个模块。用户权限分为管理员和客户,管理员具有上下架商品以及管理用户的权限,普通用户具有浏览商品,购买商品以及浏览订单的权限。

2. 应用技术

反射、注解、MySQL数据库、JDBC编程、数据结构、Lambda表达式

3. 意义

  • JavaSE知识的实践
  • 培养数据库编程能力
  • 锻炼应用已有技术解决实际问题
  • 培养业务分析到技术实现的能力

4. 核心需求

  • 登录注册
  • 管理端
    • 用户管理
    • 商品管理
  • 客户端
    • 商品浏览
    • 订单管理
    • 下单支付

5. 功能列表

5.1 公共端

  1. 入口命令

    1.1 登录(DL)

    1.2 注册(ZC)

  2. 公共命令

    2.1 帮助信息(BZ)

    2.2 关于系统(GY)

    2.3 退出系统(TC)

5.2 管理端

  1. 账户信息

    1.1 启停账户(QTZH)

    1.2 重置密码(CZMM)

    1.3 查看账户(CKZH)

  2. 商品信息

    2.1 上架商品(SJSP)

    2.2 下架商品(XJSP)

    2.3 浏览商品(LLSP)

    2.4 更新商品(GXSP)

  3. 公共命令

    3.1 帮助信息(BZXX)

    3.2 关于系统(GYXT)

    3.3 退出系统(TCXT)

5.3 用户端

  1. 商品信息

    1.1 浏览商品(LLSP)

  2. 公共命令

    2.1 帮助信息(BZXX)

    2.2 退出系统(TCXT)

    2.3 关于系统(GYXT)

  3. 我的订单

    3.1 取消订单(QXDD)

    3.2 支付订单(ZFDD)

    3.3 查看订单(CKDD)

6. 涉及技术

  • 集合框架
  • 注解技术
  • Stream式编程
  • MySQL数据库
  • JDBC编程

7. 技术实现

7.1 数据库设计

在这里插入图片描述

-- 用户表
drop table if exists `account`;
create table if not exists `account`
(
    id			int primary key auto_increment comment '账户编号',
    username	varchar(12)		not null comment '账户',
    password	varchar(128)	not null comment '密码',
    name		varchar(32)		not null comment '姓名',
    account_type	int default 1 not null comment '账户类型: 1 管理员  2 客户',
    account_status	int default 1 not null comment '账户状态: 1 启用  2 锁定'
);


-- 商品表
drop table if exists `goods`;
create table if not exists `goods`
(
    id		int primary key auto_increment comment '商品编号',
    name	varchar(128)	not null comment '商品名称',
    introduce	varchar(256)	default '暂无' not null comment '商品简介',
    stock	int		not null comment '商品库存',
    unit	varchar(12)		not null comment '库存单位',
    price	int		not null comment '商品价格,单位:分',
    discount	int		default 100 not null comment '商品折扣,[0,100]'
);


-- 订单表
drop table if exists `order`;
create table if not exists `order`
(
	id varchar(32) primary key comment '订单编号',
	account_id int not null comment '帐号编号',
	account_name varchar(12) not null comment '帐号',
	create_time datetime not null comment '创建时间',
	finish_time datetime default null comment '完成时间',
	actual_amount int not null comment '实际金额,单位:分',
	total_money int not null comment '总金额,单位:分',
	order_status int not null comment '支付状态 1 待支付 2 完成'
);


-- 订单项
drop table if exists `order_item`;
create table if not exists `order_item`
(
	id int primary key auto_increment comment '订单条目编号',
	order_id varchar(32) not null comment '订单编号',
	goods_id int not null comment '商品编号',
	goods_name varchar(128) not null comment '商品名称',
	goods_introduce varchar(256) default '暂无' not null comment '商品简介',
	goods_num int not null comment '商品数量',
	goods_unit varchar(12) not null comment '库存单位',
	goods_price int not null comment '商品价格,单位:分',
	goods_discount int default 100 not null comment '商品折扣,[0,100]'
);

数据库设计中表关系如下:

  • 一个用户对应多张订单表,属于1对n的关系
  • 一张订单表对应多个订单项,属于1对n的关系
  • 一张订单表对应多个商品,属于1对n的关系
  • 一个订单项对应一个商品,属于1对1的关系

7.2 分层设计

[外链图片转存失败(img-6q7kcd9G-1566636365595)(D:\hexo\blog\source\分层设计.png)]

项目框架

在这里插入图片描述

在这里插入图片描述

8 项目效果

8.1 欢迎界面

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

8.2 客户端

在这里插入图片描述

在这里插入图片描述
在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

管理端

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述


项目源码:https://github.com/FWJacky/personalAccountant/tree/master/personalAccount

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值