# nbsaas-mall2 **Repository Path**: quhaodian/nbsaas-mall2 ## Basic Information - **Project Name**: nbsaas-mall2 - **Description**: mall2第二代电商平台,一中台,多平台,多应用,对内快速构建应用,对外快速构建平台。支持b2c、b2b模式。包括平台端,代理商端,商家端,小程序,平台小程序,商家小程序。 - **Primary Language**: Java - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 210 - **Forks**: 96 - **Created**: 2015-02-15 - **Last Updated**: 2025-09-25 ## Categories & Tags **Categories**: ecommerce **Tags**: 电商, O2O, 点评, 店铺, 本地生活 ## README ## 去好店 [![maven](https://img.shields.io/maven-central/v/com.nbsaas.boot/nbsaas-boot.svg)](http://mvnrepository.com/artifact/com.nbsaas.boot/nbsaas-boot) [![QQ](https://img.shields.io/badge/chat-on%20QQ-ff69b4.svg?style=flat-square)](//shang.qq.com/wpa/qunwpa?idkey=d1a308945e4b2ff8aeb1711c2c7914342dae15e9ce7041e94756ab355430dc78) [![使用IntelliJ IDEA开发维护](https://img.shields.io/badge/IntelliJ%20IDEA-提供支持-blue.svg)](https://www.jetbrains.com/idea/) [![GitHub forks](https://img.shields.io/github/stars/nbsaas/nbsaas-boot.svg?style=social&logo=github&label=Stars)](https://github.com/nbsaas/nbsaas-boot) > 去好店,基于中台理念,一个平台,多个应用,根据不通的应用场景使用不同的应用,支持电商平台、外卖平台、酒店平台、综合平台。 > 以及辅助支持业务的pc端,小程序端,app端。 > 场景+应用+平台,去好店,是一个平台,一个应用。 ![架构图](documents/images/mall2.png) ## 编码规范 ### 1.项目结构规范 ``` {主工程} {主工程}.adapters {主工程}.apis {主工程}.apps {主工程}.code-generator {主工程}.commons {主工程}.gates {主工程}.gateway {主工程}.resources ``` ### 2.Api模块结构规范 ``` com.{公司域名}.{主工程}.{子工程} com.{公司域名}.{主工程}.{子工程}.api.apis com.{公司域名}.{主工程}.{子工程}.api.domain.enums com.{公司域名}.{主工程}.{子工程}.api.domain.request com.{公司域名}.{主工程}.{子工程}.api.domain.response com.{公司域名}.{主工程}.{子工程}.api.domain.simple com.{公司域名}.{主工程}.{子工程}.ext.apis com.{公司域名}.{主工程}.{子工程}.ext.domain.enums com.{公司域名}.{主工程}.{子工程}.ext.domain.request com.{公司域名}.{主工程}.{子工程}.ext.domain.response com.{公司域名}.{主工程}.{子工程}.ext.domain.simple ``` ### 3.Resource模块结构规范 ``` com.{公司域名}.{主工程}.{子工程} com.{公司域名}.{主工程}.{子工程}.data.entity com.{公司域名}.{主工程}.{子工程}.data.repository com.{公司域名}.{主工程}.{子工程}.data.mapper com.{公司域名}.{主工程}.{子工程}.rest.conver com.{公司域名}.{主工程}.{子工程}.rest.resource com.{公司域名}.{主工程}.{子工程}.ext.conver com.{公司域名}.{主工程}.{子工程}.ext.resource ``` ### vue视图结构 ``` /views/业务模块/add.vue /views/业务模块/component_组件业务1.vue /views/业务模块/component_组件业务2.vue /views/业务模块/component_组件业务n.vue /views/业务模块/index.vue /views/业务模块/update.vue /views/业务模块/view.vue /views/业务模块/view_layout.vue /views/业务模块/view_业务1.vue /views/业务模块/view_业务2.vue /views/业务模块/view_业务n.vue ``` ### 技术选型: #### 服务端 * Spring、SpringMVC、spring data jpa、mybatis * Spring boot,Spring cloud,[spring-cloud-tencent](https://gitee.com/Tencent/spring-cloud-tencent) * 安全权限 Shiro * 缓存 caffeine * 代码生成模板 freemarker * 其它 Jsoup、gson * 核心采用Request-Response模式,Chain模型。 * [nbsaas-boot](https://gitee.com/cng1985/nbsaas-boot) #### [pc端](https://gitee.com/cng1985/nbsaas-life-nuxt3) * nuxt3 * element-plus #### 后台管理端 * vue3 * element-plus * axios * [nuxt3前端](https://gitee.com/cng1985/nbsaas-life-nuxt3) * [vue3管理端](https://gitee.com/cng1985/nbsaas-mall2-admin) * [通用商家端](https://gitee.com/cng1985/nbsaas-mall2-shop) ## 后台演示环境 [http://mall2.nbsaas.com](http://mall2.nbsaas.com) 账号 admin 密码123456 ## 商家演示环境 http://mall2shop.nbsaas.com 账号 cs 密码123456 ## 后台部分效果图 ![home](documents/images/home.png) ![menu](documents/images/menu.png) ![user](documents/images/user.png) ## 搭建步骤 1. 创建数据库。如使用MySQL,字符集选择为`utf8`或者`utf8mb4`(支持更多特殊字符,推荐)。 2. 在idea中导入maven项目。点击idea菜单`File` - `open`,选择 `项目所在磁盘位置`。创建好maven项目后,会开始从maven服务器下载第三方jar包(如spring等),需要一定时间,请耐心等待。 3. 创建mysql数据库,导入`/documents/sql/nbsaas-mall2.sql` 4. 修改数据库连接。打开`/gates/admin/main/resources/application.yml`文件,根据实际情况修改`jdbc.url`、`jdbc.username`、`jdbc.password`的值。 5. 运行程序AdminApplication(后台),FrontApplication(前台) 6. 下载vue3后台管理端[https://gitee.com/cng1985/nbsaas-mall2-admin](https://gitee.com/cng1985/nbsaas-mall2-admin 7. 访问系统。前台接口地址:[http://localhost:8081](http://localhost:8081/),后台接口地址:[http://127.0.0.1:8082/](http://127.0.0.1:8082/);用户名:ada,密码:123456。 # mall2平台 ## 后台 https://gitee.com/cng1985/nbsaas-mall2-admin ## 商家端 https://gitee.com/cng1985/nbsaas-mall2-shop ### 外卖商家 ### 电商商家 ### 酒店商家 ### 餐饮商家 ## 开放平台 ## 小程序端 ### 前端业务 - 外卖小程序 - 单店电商小程序 - 平台电商小程序 - 酒店小程序 - 餐饮点餐小程序 - 平台电商 ### 管理端 - 酒店商家管理端 - 外卖商家管理端 - 电商商家管理端 - 餐饮管理端 - 平台电商管理小程序 ## 平台端 ### 电商平台 ### 外卖平台 ### 酒店平台 ### 综合平台