Mallplus specific logic implemented multi-tenant mall

1. We have a system in Taiwan, can achieve merchants settled, insert data and generate a business administrator account can not be deleted, this account can be added to all staff roles and add permissions and other goods, all of the data for this business will have a field to isolate , such as commodities and brand, etc.,

 

Which data table can also be set common to all businesses such as permissions menu table, such as

public static final List<String> IGNORE_TENANT_TABLES = Lists.newArrayList("sys_admin_log", "sys_web_log", "sys_permission_category", "columns", "tables", "information_schema.columns",
        "information_schema.tables",  "sys_store", "sys_permission","pms_product_attribute","pms_product_category_attribute_relation","pms_product_attribute_value",
        "pms_product_category","pms_product_category_attribute_relation");

2. The applet can be written off in the header dead inside a parameter storeId = 1 or other value, businesses will have to do a post-mapping, or anyone can switch to another merchant to data insecurity,

3. Then the background will be a filter processing merchant id

com.zscat.mallplus.component.JwtAuthenticationTokenFilter

4.我们会用mybatis-plus的多租户插件 将storeId参数注入到需要处理的表中

com.zscat.mallplus.config.MybatisPlusConfig 类

5.商户可以自己开发小程序前端 (只要能适配到我们的接口)或者使用官方生成的前端

 1商户自己开发的前端demo https://gitee.com/catshen/mobile-mall

发布了34 篇原创文章 · 获赞 28 · 访问量 10万+

Guess you like

Origin blog.csdn.net/a1439226817/article/details/99677350