Code Monkey home page Code Monkey logo

promoproject's Introduction

PromoProject

一个秒杀商城——电商相关后端项目

项目构建

使用Springboot + MyBatis 构建 JavaWeb项目

项目实现了以下功能:

用户登录,注册

创建商品项

用户下单

秒杀活动

后端技术选型

选型 说明
Spring Boot 容器+MVC框架
MyBatis ORM框架
MyBatisGenerator 数据库代码自动生成
Druid 数据库连接池
MySql 数据存储

项目结构

com.miaoshaproject
├── controller -- controller层
	└── viewobject -- 前段数据对象
├── dao -- 数据库接口层
├── dataobject -- 数据库对象层
├── error -- 异常信息通用抛出接口
├── response -- 通过返回类型
├── service -- 服务接口及实现
	├── impl -- 接口实现层
	└── model -- 模型层
└── validator -- 相关通用校验方法

数据库相关表及字段

导入目录下sqlStruct->miaosha.sql

表名 字段 说明
item id,title,price,description,sales,img_url 商品表
item_stock id,stock,item_id 库存表
order_info id,user_id,item_id,item_price_amount,order_price,promo_id 订单信息
promo id,promo_name,start_date,item_id,promo_item_price,end_date 活动信息表
sequence_info name,current,step 递增序列信息
user_info id,name,gender,age,telephone,register_mode,third_party_id 用户信息
user_password id,encrpt_password,user_id 用户密码

整体框架

前后端分离

尚未实现的部分

本地缓存,集中式缓存,redis

多商品、多库存、多活动模型尚未实现

存在的问题

如何发现容量问题

如何使系统水平扩展

查询效率低下

活动开始前页面被疯狂刷新

库存行锁问题

下单操作多,缓慢

浪涌流量问题如何解决

promoproject's People

Contributors

pyhblacksky avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.