mybatis-practice's Introduction
需求:实现网上购物过程的dao层,用Mybatis操作数据库,main方法控制台输出进行测试验证。 流程:用户创建 - 设为当前登录用户 - 浏览商品 - 添加商品进购物车(添加进该用户的购物车,如果没有当前用户则给出“请登录”的信息) - 查看该用户购物车信息 - 修改商品数量, 下单 - 取消或支付 - 用户退出。 数据库:用户、商品、购物车、订单 1. 创建用户:用户名(唯一)、密码、注册邮箱、手机号、注册时间(默认提交数据库时的时间)。其中,用户名是唯一的,注册重复时给出“该用户已注册”的信息提示; 2. 用户的列表显示、修改、删除、是否为当前登录用户功能。 3. 添加商品:商品号、分类、商品名、单价、库存量; 4. 商品的列表显示、修改、删除、加入购物车功能。 5. 购物车的商品信息:商品列表,其中包含商品号、商品名、单价、数量、加入时间、是否加入订单; 6. 购物车中商品的数量修改、删除及下单功能。 7. 订单的信息:订单号、下单时间、订单状态(未支付、已支付、已取消)、用户名、商品信息(商品号、商品名、数量)、单价总价; 8. 订单的支付、取消(人工取消、30分钟自动取消)。 9. 根据用户名可以查询出其所有订单信息。 注: 1. 用户的登录退出、商品在购物车的添加删除、用户的下单人工取消等动作在数据中可以分别用一个字段控制,为其增加方法去调用更改。 2. 用户添加购物车时商品库数量不改变,下单后库存数量发生响应变化,但支付后持久化,人工取消或到时间后取消的数量恢复。 3. 支持多个用户,但可以不并发。
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.