方兴商城

系统架构图

系统架构图

数据库表结构

表名称 含义
tb_brand 品牌
tb_specification 规格
tb_specification_option 规格选项
tb_type_template 类型模板:用于关联品牌和规格
tb_item_cat 商品分类
tb_seller 商家
tb_goods 商品
tb_goods_desc 商品详情
tb_item 商品明细
tb_content 内容(广告)
tb_content_category 内容(广告)类型
tb_user 用户
tb_order 订单
tb_order_item 订单明细
tb_pay_log 支付日志

系统框架组合

  • 前端
    • AngularJS(基础指令学习)
    • BootStrap
  • 后端
    • Spring
    • SpringMVC
    • SpringSecurity
    • Mybatis
    • Dubbox

框架搭建

  1. 创建父工程fangxingmall-parent(POM)
  2. 创建实体类模块fangxingmall-pojo
  3. 创建数据访问模块fangxingmall-dao
  4. 创建商家商品服务接口模块fangxingmall-sellergoods-interface
  5. 创建商家商品服务模块fangxingmall-sellergoods-service
  6. 创建运营商管理后台模块fangxingmall-manager-web
  7. 创建商家管理后台模块fangxingmall-shop-web

开发环境配置

  1. 服务器安装软件

    • 安装zookeeper

      1. 服务器安装JDK

      2. 上传zookeeper压缩包到服务器

      3. 解压缩

        [root@VM_90_242_centos bin]# tar -zxvf zookeeper-3.4.6.tar.gz
      4. 进入zookeeper-3.4.6目录创建data文件夹

        [root@VM_90_242_centos bin]# mkdir data
      5. 进入conf目录,重命名zoo_sample.cfg为zoo.cfg

        [root@VM_90_242_centos bin]# mv zoo_sample.cfg zoo.cfg
      6. 打开zoo.cfg文件,修改data存储路径为你解压缩新建的data路径,pwd查看当前路径直接复制

        [root@VM_90_242_centos bin]# vim zoo.cfg
        #dataDir=/usr/dubbo/zookeeper-3.4.6/data
      7. 进入bin目录,启动服务

        [root@VM_90_242_centos bin]# ./zkServer.sh start
      8. 关闭服务

        [root@VM_90_242_centos bin]# ./zkServer.sh stop
      9. 查看服务状态

        [root@VM_90_242_centos bin]# ./zkServer.sh status
        JMX enabled by default
        Using config: /usr/dubbo/zookeeper-3.4.6/bin/../conf/zoo.cfg
        Mode: standalonexxxxxxxxxx [root@VM_90_242_centos bin]# ./zkServer.sh statusJMX enabled by defaultUsing config: /usr/dubbo/zookeeper-3.4.6/bin/../conf/zoo.cfgMode: standalone./zkServer.sh statusshell
    • 安装Dubbox

      1. 手动安装Dubbox的jar包到本地仓库

        mvn install:install-file -Dfile=d:\setup\dubbo-2.8.4.jar -DgroupId=com.alibaba -DartifactId=dubbo -Dversion=2.8.4 -Dpackaging=jar
      2. 配置离线约束

        配置离线约束

    • 安装activemq

  2. 修改

    1. 数据库连接修改

      /fangxingmall-dao/src/main/resources/properties/db.properties

    2. redis配置修改

      /fangxingmall-common/src/main/resources/properties/redis-config.properties

    3. 日志文件配置修改

      /fangxingmall-sellergoods-service/src/main/resources/log4j.properties

    4. dubbo连接修改

      /fangxingmall-sellergoods-service/src/main/resources/spring/applicationContext-service.xml

      /fangxingmall-shop-web/src/main/resources/spring/springmvc.xml

      /fangxingmall-shop-web/src/main/resources/spring/spring-security.xml

      /fangxingmall-manager-web/src/main/resources/spring/springmvc.xml

      /fangxingmall-content-service/src/main/resources/spring/applicationContext-service.xml

      /fangxingmall-portal-web/src/main/resources/spring/springmvc.xml

      /fangxingmall-search-web/src/main/resources/spring/springmvc.xml

    5. FastDFS配置

    6. solr配置

      /fangxingmall-solr-util/src/main/resources/spring/applicationContext-solr.xml

  3. 启动模块(MavenBulid tomcat7:run)

    1. fangxingmall-sellergoods-service,端口9001
    2. fangxingmall-manager-web,端口9101
    3. fangxingmall-content-service,端口9002
    4. fangxingmall-shop-web,端口9102
    5. fangxingmall-portal-web,端口9103
    6. fangxingmall-search-service,端口9004
    7. fangxingmall-search-web,端口9104
    8. fangxingmall-page-service,端口9005
    9. fangxingmall-page-web,端口9105
  4. 开发进度

    • 新增、修改、删除商品分类

    • 安装Fast DFS服务器

    • TO DO 图片上传

    • 按销量、评价排序