# 吉林大学软件学院C++课程设计
## 介绍
主题:微商系统
使用技术:C++/Qt、Mysql、TCP/IP
## 软件架构
三个大端:服务端、客户端(买家端)、业务端(卖家端)
![输入图片说明](%E6%9E%B6%E6%9E%84%E5%9B%BE.png)
### 自定义通信协议CHTTP
本次课设并没有用到HTTP,但HTTP的基本传输模式和报文格式是非常值得借鉴的。我自定义的报文协议为CHTTP,CHTTP的基本格式为A|B-CD-EF(均为数字)。其中A为状态码,仿照HTTP的格式;B为识别买家或卖家的标识;CD为操作类型,判断是购物车操作类型或是购买操作类型;EF为操作类型中的基本操作,比如将商品加入购物车、将商品删除购物车。客户端或业务端接受时第一位默认为状态码(响应报文),服务端接收时第一位默认为端表示码(请求报文)。
----
### 数据库设计
数据库名:shoppingmall
表名:
① Users顾客名单
② Managers管理员名单
③ Products商品表
④ Orders订单表
⑤ Orderitems订单的具体项目表
⑥ Catitems用户的购物车项目表
表的具体设计:
(1) Users顾客名单
| 列名 | 说明 | 类型 |
| --------------- | ---------- | ------- |
| User_id(主键) | 用户id | int |
| User_name | 用户用户名 | varchar |
| User_password | 用户密码 | varchar |
| User_address | 用户地址 | varchar |
| User_money | 用户余额 | int |
| User_gender | 用户性别 | enum |
(2) Managers管理员名单
| 列名 | 说明 | 类型 |
| ------------------ | ------------ | ------- |
| Manager_id(主键) | 管理员id | int |
| Manager_name | 管理员用户名 | varchar |
| Manager_password | 管理员密码 | varchar |
(3) Products商品表
| 列名 | 说明 | 类型 |
| ---------------------- | ------------ | ------- |
| Product_id(主键) | 商品id | int |
| Product_name | 商品名称 | varchar |
| Product_price | 商品单价 | int |
| Product_amount | 商品剩余量 | int |
| Product_sales | 商品销量 | int |
| Product_classification | 商品分类 | varchar |
| Product_about | 商品描述 | varchar |
| Product_istimelimited | 商品是否限时 | enum |
| Product_pictureaddress | 商品图片地址 | varchar |
(4) Orders订单表
| 列名 | 说明 | 类型 |
| --------------------- | -------- | -------- |
| Order_id(主键) | 订单id | varchar |
| Order_user_id(外键) | 订单用户 | int |
| Order_tolprice | 订单总价 | int |
| Order_status | 订单状态 | enum |
| Order_time | 订单时间 | datetime |
(5) Orderitems订单的具体项目表
| 列名 | 说明 | 类型 |
| -------------------------- | ---------------- | ------- |
| Orderitem_id(主键) | 订单项目id | int |
| Orderitem_order_id(外键) | 订单项目的订单id | varchar |
| Orderitem_pro_id(外键) | 订单项目的商品id | int |
| Orderitem_num | 订单项目购买数量 | int |
| Orderitem_pro_price | 订单项目单价 | int |
| Orderitem_time | 订单时间 | varchar |
(6) Catitems用户的购物车项目表
| 列名 | 说明 | 类型 |
| ----------------------- | ------------------ | ---- |
| Catitem_id(主键) | 购物车项目id | int |
| Catitem_pro_id(外键) | 购物车项目的商品id | int |
| Catitem_user_id(外键) | 购物车项目的用户id | int |
| Catitem_num | 购物车项目购买数量 | int |
----
## 使用说明
1. 需要连Mysql数据库才能正常使用,连接mysql时记得把用户、密码啥的改为自己的数据库信息
## 优点
1. 日式、二次元UI界面(雾
2. 较好的缓存系统
3. 稳定的逻辑
4. 可以切换UI
5. 自定义报文,额外添加或舍去操作灵活方便
6. 对SQL语句,处理报文操作有良好的封装
没有合适的资源?快使用搜索试试~ 我知道了~
课程设计作业:用Qt完成的微商系统,包含完整的前后端,使用Mysql数据库,socket通信.zip
共164个文件
cpp:39个
h:36个
png:34个
4星 · 超过85%的资源 需积分: 0 7 下载量 29 浏览量
2023-09-01
22:28:20
上传
评论 1
收藏 21.69MB ZIP 举报
温馨提示
毕业设计,课程设计,项目源码均经过助教老师测试,运行无误,欢迎下载交流 ----- 下载后请首先打开README.md文件(如有)
资源推荐
资源详情
资源评论
收起资源包目录
课程设计作业:用Qt完成的微商系统,包含完整的前后端,使用Mysql数据库,socket通信.zip (164个子文件)
multiserver.pro.user.22 19KB
Manager.pro.user.22 18KB
slidenavigation.cpp 19KB
slidenavigation.cpp 19KB
handleserver.cpp 15KB
prosesspage.cpp 11KB
cartpage.cpp 8KB
shoppingmanager.cpp 8KB
shoppage.cpp 6KB
shoppingclient.cpp 6KB
sqlserver.cpp 6KB
carouselimagewindow.cpp 5KB
orderpage.cpp 4KB
cartitem.cpp 3KB
registerwgt.cpp 3KB
productpage.cpp 3KB
loginwgt.cpp 3KB
loginwgt.cpp 3KB
orderpage.cpp 2KB
dialog.cpp 2KB
contactpage.cpp 2KB
contactpage.cpp 2KB
tcpserver.cpp 2KB
tcpserverthread.cpp 1KB
productpage.cpp 1KB
orderitem.cpp 1KB
productitem.cpp 1KB
mepage.cpp 1KB
server.cpp 1KB
mysocket.cpp 1KB
textticker.cpp 1KB
product.cpp 1007B
udpserver.cpp 773B
person.cpp 725B
meitem.cpp 689B
homepage.cpp 643B
main.cpp 634B
person.cpp 362B
main.cpp 327B
mainwindow.cpp 287B
main.cpp 166B
.gitignore 696B
slidenavigation.h 3KB
slidenavigation.h 3KB
shoppingmanager.h 2KB
carouselimagewindow.h 1KB
shoppingclient.h 1KB
prosesspage.h 1KB
handleserver.h 1KB
cartpage.h 1KB
cartitem.h 1KB
sqlserver.h 1KB
shoppage.h 1KB
tcpserverthread.h 941B
orderpage.h 856B
tcpserver.h 805B
loginwgt.h 704B
productitem.h 703B
orderpage.h 681B
productpage.h 675B
loginwgt.h 658B
contactpage.h 616B
contactpage.h 612B
mysocket.h 611B
dialog.h 607B
mepage.h 606B
registerwgt.h 529B
productpage.h 509B
orderitem.h 486B
textticker.h 405B
server.h 393B
homepage.h 372B
meitem.h 358B
product.h 352B
person.h 333B
mainwindow.h 297B
udpserver.h 272B
person.h 228B
82342070_p0-min.jpg 535KB
illust_35548907_20190130_151911-min.jpg 145KB
illust_54355379_20190130_152051-min.jpg 97KB
picerror.jpg 69KB
LICENSE 34KB
LICENSE 1KB
README.md 4KB
README.md 2KB
README.md 1KB
README.en.md 971B
6.png 1.66MB
6.png 1.66MB
3.png 1.3MB
3.png 1.3MB
7.png 1.18MB
7.png 1.18MB
7.png 1.18MB
1.png 1017KB
1.png 1017KB
1.png 1017KB
2.png 900KB
2.png 900KB
共 164 条
- 1
- 2
资源评论
- 离别@_@2023-10-06可以私聊一下吗这个程序为什么注册时显示网络未连接呢
程皮
- 粉丝: 260
- 资源: 2568
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功