{"id":26980197,"url":"https://github.com/clovu/gulimall","last_synced_at":"2025-04-03T14:32:38.235Z","repository":{"id":45705620,"uuid":"427859917","full_name":"clovu/gulimall","owner":"clovu","description":"谷粒商城","archived":false,"fork":false,"pushed_at":"2022-03-22T01:19:17.000Z","size":58248,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-10T06:29:12.774Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/clovu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-14T06:58:58.000Z","updated_at":"2022-02-19T09:28:12.000Z","dependencies_parsed_at":"2022-09-18T20:21:47.950Z","dependency_job_id":null,"html_url":"https://github.com/clovu/gulimall","commit_stats":null,"previous_names":["clovu/gulimall"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clovu%2Fgulimall","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clovu%2Fgulimall/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clovu%2Fgulimall/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clovu%2Fgulimall/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clovu","download_url":"https://codeload.github.com/clovu/gulimall/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247018223,"owners_count":20869976,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-03T14:30:30.266Z","updated_at":"2025-04-03T14:32:38.226Z","avatar_url":"https://github.com/clovu.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 谷粒商城简介\n\n### 前言\n\ngulimall` 项目致力于打造一个完整的电商系统，采用现阶段流行技术来实现，采用前后端分离继续编写。\n\n\u003e 学习项目\n\n### 项目API接口文档\n\n- 文档地址：[https://easydoc.xyz/s/78237135/ZUqEdvA4/hKJTcbfd]()\n\n### 项目介绍\n\ngulimall（谷粒商城） 项目是一套电商项目，包括前台商城系统以及后台管理系统，基于 SpringCloud + SpringCloudAlibaba + MyBatis-Plus实现，采用 Docker 容器化部署。前台商城系统包括：用户登录、注册、商品搜索、商品详情、购物车、下订单流程、秒杀活动等模块。后台管理系统包括：系统管理、商品系统、优惠营销、库存系统、订单系统、用户系统、内容管理等七大模块。\n\n### 项目演示\n\n#### **前台部分功能演示效果**\n\n![UUvLAU.png](https://images.gitee.com/uploads/images/2020/0714/193421_2e595b5f_4914148.png)\n\n![UUv7n0.png](https://images.gitee.com/uploads/images/2020/0714/193422_0ed39103_4914148.png)\n\n#### 后端登录界面\n\n![UUvXh4.png](https://images.gitee.com/uploads/images/2020/0714/193422_cd40fc31_4914148.png)\n\n#### 主页面\n\n![UUv51s.png](https://images.gitee.com/uploads/images/2020/0714/193422_d1a789d5_4914148.png)\n\n#### 后台部分功能\n\n[![UUvoXq.th.png](https://images.gitee.com/uploads/images/2020/0714/193422_9758a0a6_4914148.png)](https://imgchr.com/i/UUvoXq)[![UUvONF.th.png](https://images.gitee.com/uploads/images/2020/0714/193423_ed014fcc_4914148.png)](https://imgchr.com/i/UUvONF)[![UUvHBV.th.png](https://images.gitee.com/uploads/images/2020/0714/193423_0996ef2d_4914148.png)](https://imgchr.com/i/UUvHBV)[![UUvIcn.th.png](https://images.gitee.com/uploads/images/2020/0714/193424_bb60e0f4_4914148.png)](https://imgchr.com/i/UUvIcn)\n\n### 组织结构\n\n```\ngulimall\n├── gulimall-common -- 工具类及通用代码\n├── renren-generator -- 人人开源项目的代码生成器\n├── gulimall-auth-server -- 认证中心（社交登录、OAuth2.0、单点登录）\n├── gulimall-cart -- 购物车服务\n├── gulimall-coupon -- 优惠卷服务\n├── gulimall-gateway -- 统一配置网关\n├── gulimall-order -- 订单服务\n├── gulimall-product -- 商品服务\n├── gulimall-search -- 检索服务\n├── gulimall-seckill -- 秒杀服务\n├── gulimall-third-party -- 第三方服务\n├── gulimall-ware -- 仓储服务\n├── gulimall-member -- 会员服务\n├── renren-fast-vue -- 前端项目\n└── resources -- 项目资源文件，例如：mysql、nginx配置、页面等等\n\t\t├── mydata -- 数据文件，包含elasticsearch、nginx完整配置以及数据\n\t\t├── gulimall.host -- 本地端口映射，存放gulimall.com域名映射规则\n\t\t├── gulimall_product.es_mapping.json -- elasticsearch商品映射\n\t\t└── sql -- 所有数据库文件\n\n```\n\n### 技术选型\n\n**后端技术**\n\n|        技术        |           说明           |                      官网                       |\n| :----------------: | :----------------------: | :---------------------------------------------: |\n|     SpringBoot     |       容器+MVC框架       |     https://spring.io/projects/spring-boot      |\n|    SpringCloud     |        微服务架构        |     https://spring.io/projects/spring-cloud     |\n| SpringCloudAlibaba |        一系列组件        | https://spring.io/projects/spring-cloud-alibaba |\n|    MyBatis-Plus    |         ORM框架          |             https://mp.baomidou.com             |\n|  renren-generator  | 人人开源项目的代码生成器 |   https://gitee.com/renrenio/renren-generator   |\n|   Elasticsearch    |         搜索引擎         |    https://github.com/elastic/elasticsearch     |\n|      RabbitMQ      |         消息队列         |            https://www.rabbitmq.com             |\n|   Springsession    |        分布式缓存        |    https://projects.spring.io/spring-session    |\n|      Redisson      |         分布式锁         |      https://github.com/redisson/redisson       |\n|       Docker       |       应用容器引擎       |             https://www.docker.com              |\n|        OSS         |        对象云存储        |  https://github.com/aliyun/aliyun-oss-java-sdk  |\n\n**前端技术**\n\n|   技术    |    说明    |           官网            |\n| :-------: | :--------: | :-----------------------: |\n|    Vue    |  前端框架  |     https://vuejs.org     |\n|  Element  | 前端UI框架 | https://element.eleme.io  |\n| thymeleaf |  模板引擎  | https://www.thymeleaf.org |\n|  node.js  | 服务端的js |   https://nodejs.org/en   |\n\n### 架构图\n\n**系统架构图**\n\n[![UUvRAS.png](https://images.gitee.com/uploads/images/2020/0714/193425_4a1056c4_4914148.png)](https://imgchr.com/i/UUvRAS)\n\n**业务架构图**\n\n![UUvb7T.png](https://images.gitee.com/uploads/images/2020/0714/193425_9bb153d1_4914148.png)\n\n### 环境搭建\n\n#### 开发工具\n\n|     工具      |        说明         |                      官网                       |\n| :-----------: | :-----------------: | :---------------------------------------------: |\n|     IDEA      |    开发Java程序     |     https://www.jetbrains.com/idea/download     |\n| RedisDesktop  | redis客户端连接工具 |        https://redisdesktop.com/download        |\n|  SwitchHosts  |    本地host管理     |       https://oldj.github.io/SwitchHosts        |\n|    X-shell    |  Linux远程连接工具  | http://www.netsarang.com/download/software.html |\n|    Navicat    |   数据库连接工具    |       http://www.formysql.com/xiazai.html       |\n| PowerDesigner |   数据库设计工具    |             http://powerdesigner.de             |\n|    Postman    |   API接口调试工具   |             https://www.postman.com             |\n|    Jmeter     |    性能压测工具     |            https://jmeter.apache.org            |\n|    Typora     |   Markdown编辑器    |                https://typora.io                |\n\n#### 开发环境\n\n|     工具      | 版本号 |                             下载                             |\n| :-----------: | :----: | :----------------------------------------------------------: |\n|      JDK      |  1.8   | https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html |\n|     Mysql     |  5.7   |                    https://www.mysql.com                     |\n|     Redis     | Redis  |                  https://redis.io/download                   |\n| Elasticsearch | 7.6.2  |               https://www.elastic.co/downloads               |\n|    Kibana     | 7.4.2  |               https://www.elastic.co/cn/kibana               |\n|   RabbitMQ    | 3.9.13 |            http://www.rabbitmq.com/download.html             |\n|     Nginx     |  1.10  |              http://nginx.org/en/download.html               |\n\n注意：以上的除了jdk都是采用docker方式进行安装\n\n#### 搭建步骤\n\n\u003e Mac OS环境部署\n\n- 修改本机的host文件，映射域名端口\n\n```\n# 谷粒商城域名映射\n172.16.156.128 gulimall.com\n172.16.156.128 order.gulimall.com\n172.16.156.128 item.gulimall.com\n172.16.156.128 search.gulimall.com\n172.16.156.128 auth.gulimall.com\n172.16.156.128 cart.gulimall.com\n172.16.156.128 member.gulimall.com\n172.16.156.128 seckill.gulimall.com\n以上端口换成自己Linux的ip地址\n```\n\n- 修改Linux中Nginx的配置文件\n\n```\n1、在nginx.conf中添加负载均衡的配置    \nupstream gulimall {\n\t\tserver 172.16.156.1:88;\n}\n2、在gulimall.conf中添加如下配置\nserver {\n    listen       80;\n    # *.natappfree.cc 是natapp内网穿透地址，用于完成支付宝支付\n    server_name gulimall.com  *.gulimall.com *.natappfree.cc;\n\n    #charset koi8-r;\n    #access_log  /var/log/nginx/log/host.access.log  main;\n\n    #配置静态资源的动态分离\n    location /static/ {\n        root /usr/share/nginx/html;\n    }\n\n    #支付异步回调的一个配置\n    location /alipay/success {\n        proxy_pass http://gulimall;\n        # 由于内网穿透域名问题，手动设置host，不让请求头丢失\n        proxy_set_header Host order.gulimall.com;\n    }\n\n    location / {\n        proxy_pass http://gulimall;\n        #不让请求头丢失\n        proxy_set_header Host $host;\n    }\n\n    #error_page  404              /404.html;\n\n    # redirect server error pages to the static page /50x.html\n    #\n    error_page   500 502 503 504  /50x.html;\n    location = /50x.html {\n        root   /usr/share/nginx/html;\n    }\n\n    # proxy the PHP scripts to Apache listening on 127.0.0.1:80\n    #\n    #location ~ \\.php$ {\n    #    proxy_pass   http://127.0.0.1;\n    #}\n\n    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000\n    #\n    #location ~ \\.php$ {\n    #    root           html;\n    #    fastcgi_pass   127.0.0.1:9000;\n    #    fastcgi_index  index.php;\n    #    fastcgi_param  SCRIPT_FILENAME  /scripts$fastcgi_script_name;\n    #    include        fastcgi_params;\n    #}\n\n    # deny access to .htaccess files, if Apache's document root\n    # concurs with nginx's one\n    #\n    #location ~ /\\.ht {\n    #    deny  all;\n    #}\n}\n\n\n```\n\n- 前端项目是 `/gulimall/renren-fast-vue`，使用 `yarn dev` 或者 `npm run dev`，**注意该项目使用nodejs 10-12的版本**\n- `/gulimall/renren-fast` 是后台管理系统\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclovu%2Fgulimall","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclovu%2Fgulimall","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclovu%2Fgulimall/lists"}