项目实战-tpshop商城项目

项目实战-tpshop商城项目

环境部署准备

软件工具准备

  • 虚拟机(本地)/云服务器(实体机)--远程服务
  • vmware虚拟机(电脑)
  • Linux
  • centos-->Linux系统的一个发行版本
  • 电脑上的系统

远程连接测试

远程连接测试-查看虚拟机IP地址

在linux虚拟机中输入ifconfig命令,查看对应的IP地址。

远程连接测试-检测本机与虚拟机是否连通

远程连接测试-通过远程工具连接linux服务器

常见问题处理

环境部署

项目技术架构介绍

部署tpshop项目-tpshop验证

数据库验证

用户信息表
  • 用户信息表: tp_users

  • 用户地址信息表: tp_user_address

熟悉商品表信息
  • 商品信息表: tp_goods
  • 商品分类信息表: tp_goods_category
  • 商品图片信息表: tp_goods_image

订单表信息
  • 订单信息表: tp_order
  • 订单商品信息表: tp_order_goods
  • 购物车表: tp_cart

数据查询演练

查询Tpshop的商品分类信息
  • 在数据库中查询出商品分类类目


  • 查询出手机数码的分类类目
sql 复制代码
-- 查询手机数码的分类类目
-- 如何找到31
select name from tp_goods_category where parent_id=31

-- 手机数码的id就是31
select id from tp_goods_category where mobile_name='手机数码'

-- 上一步的子查询(充当条件)
select name from tp_goods_category where parent_id=(
select id from tp_goods_category where mobile_name='手机数码'
)

-- 查询手机通讯的分类类目
-- 如何找到32
select name from tp_goods_category where parent_id=32

-- 手机通讯的id就是32
select id from tp_goods_category where name='手机通讯'

-- 上一步的子查询(充当条件)
select name from tp_goods_category where parent_id=(
select id from tp_goods_category where name='手机通讯'
)
查询Tpshop的订单信息
sql 复制代码
-- 查询Tpshop中当前用户的订单的信息
-- 13800138006
-- 1.找到登录用户的user_id,用手机号进行过滤
select user_id from tp_users where mobile='13800138006'
-- 2.找订单,通过user_id,进行过滤
select * from tp_order where user_id
-- 3.子查询
select * from tp_order where user_id=(
select user_id from tp_users where mobile='13800138006'
)
-- 4.返回订单的order_id
select order_id from tp_order where user_id=(
select user_id from tp_users where mobile='13800138006'
)
-- 5.查商品信息
select * from tp_order_goods where order_id in (
select order_id from tp_order where user_id=(
select user_id from tp_users where mobile='13800138006'
)
)
查询Tpshop中购物车的信息
sql 复制代码
-- 查询出Tpshop当前用户的购物车的信息
select user_id from tp_users where mobile='13800138006'
select * from tp_cart where user_id=(
select user_id from tp_users where mobile='13800138006'
)
相关推荐
爱丽_5 分钟前
MyBatis关联映射与注解开发详解
数据库·mybatis
JYHuahua5 分钟前
YashanDB数据库:适用于各种规模企业的理想选择
数据库
疯狂的挖掘机8 小时前
记一次基于QT的图片操作处理优化思路(包括在图上放大缩小,截图,画线,取值等)
开发语言·数据库·qt
奇树谦9 小时前
Qt | 利用map创建多个线程和定时器
网络·数据库·qt
用户479492835691510 小时前
性能提升 4000%!我是如何解决 运营看板 不能跨库&跨库查询慢这个难题的
数据库·后端·postgresql
电商API&Tina10 小时前
跨境电商 API 对接指南:亚马逊 + 速卖通接口调用全流程
大数据·服务器·数据库·python·算法·json·图搜索算法
robinson198810 小时前
验证崖山数据库标量子查询是否带有CACHE功能
数据库·oracle·cache·自定义函数·崖山·标量子查询
老华带你飞10 小时前
农产品销售管理|基于java + vue农产品销售管理系统(源码+数据库+文档)
java·开发语言·前端·数据库·vue.js·spring boot·后端
SelectDB11 小时前
5 倍性能提升,Apache Doris TopN 全局优化详解|Deep Dive
数据库·apache
JIngJaneIL11 小时前
基于springboot + vue房屋租赁管理系统(源码+数据库+文档)
java·开发语言·前端·数据库·vue.js·spring boot·后端