zoukankan      html  css  js  c++  java
  • spring boot实战——微信点餐系统00:项目设计,环境搭建

    技术要点:

    前端: Vue

    后端:Spring Boot + BootStrap + FreeMarker + JQuery 

    别人总结的笔记:https://www.jianshu.com/p/ae14101989f2 

    别人的完整笔记:https://www.cnblogs.com/xzmxddx/category/1384546.html

    详细技术:

    Spring Boot :

      数据库方面:Spring Boot + JPA

      缓存方面:Spring Boot + Redis(会讨论 分布式Session + 分布式锁)

      消息推送方面:WebSocker

    微信方面:

      微信扫码登录

      模板消息推送

      微信支付与退款

    项目设计:

      角色划分

      功能模块划分:商品;订单;类目

      部署架构

      数据库设计

    数据库设计:商品类目表,商品信息表,订单主表,订单子表,用户信息表

    遇到问题 :在新建的SQL文件里边使用英文输入法切换到其他应用,再次切换回MySQL workbench后,会变成中文输入法。

    /* 
    商品信息表
    注意!!!!:
    1、`product_info` --------》 ESC 下面的 ` 
    2、要设置主键这个数据表才能插入数据
    3、default current_timestamp 当前时间
    4、default current_timestamp on update current_timestamp comment '修改时间' ---------》修改时的时候自动修改时间 on update current_timestamp
    */
    create table `product_info` (
    `product_id` varchar(32) not null comment '商品id',
    `product_name` varchar(64) not null comment '商品名称',
    `product_price` decimal(8,2) not null comment '单价',
    `product_stock` int not null comment '库存',
    `product_description` varchar(64) comment '描述',
    `product_icon` varchar(512) comment '商品小图',
    `category_type` int not null comment '类目编号',
    `create_time` timestamp not null default current_timestamp comment '创建时间',
    `update_time` timestamp not null default current_timestamp on update current_timestamp comment '修改时间',
    primary key (`product_id`)
    ) comment '商品表';
    /*
    类目表:
    提高查询速度,添加约束索引。
    */
    create table `product_category` (
    `category_id` int not null auto_increment,
    `category_name` varchar(64) not null comment '类目名称',
    `category_type` int not null comment '类目编号',
    `create_time` timestamp not null default current_timestamp comment '创建时间',
    `update_time` timestamp not null default current_timestamp on update current_timestamp comment '修改时间',
    primary key (`category_id`),
    unique key `uqe_category_type` (`category_type`)
    ) comment '类目表';
    /*
    订单主表:
    tinyint :0-255的整数
    key `idx_buyer_openid` (`buyer_openid`) ----->索引
    */
    create table `order_master`(
    `order_id` varchar(32) not null,
    `buyer_name` varchar(32) not null comment '买家名称',
    `buyer_phone` varchar(32) not null comment '买家电话',
    `buyer_address` varchar(128) not null comment '买家地址',
    `buyer_openid` varchar(64) not null comment '买家微信openid',
    `order_amount` decimal(8,2) not null comment '订单总金额',
    `order_status` tinyint(3) not null default '0' comment '订单状态,默认0新下订单',
    `pay_status` tinyint(3) not null default '0' comment '支付状态,默认0未支付',
    `create_time` timestamp not null default current_timestamp comment '创建时间',
    `update_time` timestamp not null default current_timestamp on update current_timestamp comment '修改时间',
    primary key (`order_id`),
    key `idx_buyer_openid` (`buyer_openid`)
    )comment '订单主表';
    /*
    
    */
    create table `order_detail` (
    `detail_id` varchar(32) not null,
    `order_id` varchar(32) not null,
    `product_id` varchar(32) not null comment '商品id',
    `product_name` varchar(64) not null comment '商品名称',
    `product_price` decimal(8,2) not null comment '商品价格',
    `product_quantity` int not null comment '商品数量',
    `product_icon` varchar(512) comment '商品小图',
    `create_time` timestamp not null default current_timestamp comment '创建时间',
    `update_time` timestamp not null default current_timestamp on update current_timestamp comment '修改时间',
    primary key (`detail_id`),
    key `idex_order_id` (`order_id`)
    )comment '订单详情表';
    

      

     前端:Vue.js高仿饿了吗外卖APP

     虚拟机说明文档

    虚拟机 VirtualBox-5.1.22  
    系统 CentOS7.3
    账号 root
    密码 123456
    
    软件:
    jdk 1.8.0_111
    nginx 1.11.7
    mysql 5.7.17
    redis 3.2.8
    
    jdk: 
    
         路径 /usr/local/jdk1.8.0_111
    
    nginx:
    
              路径 /usr/local/nginx
              启动 nginx
              重启 nginx -s reload
    
    mysql:
    
               配置 /etc/my.conf
               账号 root
               密码 123456
               端口 3306
               启动 systemctl start mysqld
               停止 systemctl stop mysqld
    
    redis:
    
             路径 /usr/local/redis
              配置 /etc/reis.conf
              端口 6379
              密码 123456
              启动 systemctl start redis
              停止 systemctl stop redis
    

      

    首先安装虚拟机

    网络配置好:ifconfig 找出IP,ping一下,浏览器访问。

    连接数据库:使用图形界面

    环境: https://blog.csdn.net/qq_42308454/article/details/83573194

     环境:https://blog.csdn.net/wokenshin/article/details/81541450

    配置GitHub:https://www.cnblogs.com/JKayFeng/p/5842060.html 

  • 相关阅读:
    iPhone页面的常用调试方法
    前端代码相关规范
    使用BEM命名规范来组织CSS代码
    安卓微信页面的调试
    前端调试的那些手段
    Webpack打包构建太慢了?试试几个方法
    [前端] 记录工作中遇到的各种问题(Bug,总结,记录)
    jqPlot图表插件学习之饼状图和环状图
    jqPlot图表插件学习之阴阳烛图
    jqPlot图表插件学习之数据节点高亮和光标提示
  • 原文地址:https://www.cnblogs.com/Lemonades/p/11705729.html
Copyright © 2011-2022 走看看