当前仓库属于暂停状态,部分功能使用受限,详情请查阅 仓库状态说明
1 Star 0 Fork 658

owen / EDEN-MACE
暂停

forked from depot / EDEN-MACE
暂停
 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MulanPSL-1.0

分销管理系统(EDEN-MACE)

视频教程

链接:https://pan.baidu.com/s/1he3Tnk324JKoMPsbtEPcyw 提取码:p20v

1.分销系统概览

2.分润计算

相关软件下载

zookeeper下载:https://pan.baidu.com/s/184q_XyAL-R7n4KZnOgUs1w

更新记录

  • 2020-07-26 系统优化,以及增加可视化插件

  • 2020-04-02 增加同步老系统数据插件

  • 2019-11-06 增加docker部署(参考传送门)

  • 2019-09-26 增加zk分布式锁

  • 2019-07-05 定时任务bug修复

  • 2019-05-21 新增代理-会员关系图

  • 2019-05-19 重构分润核心代码,增加分段计算分润的方式,让分润更加精准化,防止因分润带来财务风险

  • 2019-05-08 新增账务使用模板方法,新增账务更加快捷

  • 2019-02-26 数据清理,一键初始化数据库

  • 2019-02-12 优化界面查询,重构后端分页,增加会员邀请限制

  • 2019-01-22 更新邀请会员接口,可以支持邀请会员或者平台任选一个

模块介绍

dist-primary 分销主模块

dist-front 模拟前端

dist-api 分销接口调用插件

前言

随着微信等社交工具的出现,很多软件出现了通过人脉赚钱的方式,每个人通过各种方式将数据传递给另外的人,通过这种分裂式的发展,使得产品能够得到有效的推广,并且可以进行有效的精准推广,于是市场上产生了很多的微信三级分销等软件,也有很多成功的产品,比如拼多多等,根据我个人了解 很多初创企业 都使用这种模式,在产品刚刚上线的时候就使用这种模式,为企业赚得了第一桶金。

但是我们用第三方软件,有很多问题,比如 很多东西都不能够定制化,很多业务不够满足自己产品的需求,于是只能"凑合着用",有些公司会定制开发,产生了很大的开发成本和时间,在任何一个产品上线的时候,时间就是产品的生命线,尤其是遇到不熟悉这些业务的开发的时候 ,可能需求和产品会产生误差,会导致产品拖延很长时间。

我通过对分销系统多年的研究发现,分销的分润和等级的计算完全在后台进行配置化管理,将抽象的分销系统具体化,前端可以单独开发,开发成本和时间完全可以进行控制,于是就开发这样的一套系统。

primary 分销主项目,用于分销配置和api的调用

front 为了更加的形象,模拟前端对接,主要是http调用api接口

我们的价值

对于程序员 ,可以学到技术和业务逻辑紧密结合,用业务作为跳板去学习技术

对于企业,可以实现企业的推广,快速将人脉变现

立足产业互联网,打造产业互联网每个环节的利润点,致力于打通产业内部之间的联系,做产业之间的核心和纽带

产品亮点

1、权限和分销完全分离,符合开发的 低耦合的需求。

2、产品完全可配置化,仅需要少量改动

3、采用微服务思想,和原业务低耦合 ,不需要的时候可以随时下线。

4、可视化图形化界面统计。

5、完善化的账务体系,可追溯每一笔分润的来源。

适用企业

1、已有项目,需要增加分销功能。

2、项目需要暂时使用分销功能。

3、对接多个系统,需要对多个账户进行控制的系统

场景案例

  1. 电商商品需要增加购买商品分佣功能
  2. 广告网站需要增加邀请奖励功能
  3. 金融机构需要增加推广奖励 的功能

目标

企业级软件,为企业低成本、高效率、快速的盈利。

开源地址

https://gitee.com/codingdb/distribution_management

技术特色

1、引用guns 权限管理系统

2、采用spring boot 简化了配置、并且将开发环境的配置和生产环境配置分离开。

3、jwt 安全验证。

4、将权限数据库和业务数据库进行分离

5、采用quartz进行任务调度,直接修改数据库即可

6、采用枚举类和数据字典配合的方式进行数据维护,不必要的地方直接调用枚举类,减少数据库的调用。

7、策略模式和简单工厂模式实现佣金的扩展,可以很容易的扩展分销系统。

8、 采用swagger方式对外开放接口,并且使用restful风格。

9、采用阿里云编码规约。

10、分销商自动分配权限。

11、自动权限配置功能。

代码展示

枚举类实现自动计算分润

ZERO_STATUS("0","按照百分比计算") {
       @Override
       public BigDecimal calResult(BigDecimal amount, BigDecimal arg) {
           return amount.multiply(arg);
       }
   }

策略模式实现分佣账户的扩展

 public AmountFactoryContext(String type) {
        switch (type){
            case "0":
                amountService = new TradeAmountServiceImpl();
                break;
            case  "1":
                amountService = new LevelAmountServiceImpl();
                break;
            default:
                break;
        }
    }

项目总览

项目使用场景图示

输入图片说明

分销功能架构图

输入图片说明

分销内部设计图 输入图片说明

项目说明

distribution_management 用来运行分销管理系统

plug用来调试接口,调试完成后,可以直接使用

安装方法

下载此项目后,generator.ExecuSql 修改数据库和密码,可以自动导入sql。

运行/distribution_management 目录下的项目,访问http://localhost/。

账号 : admin /111111

​ dist/123

项目特色

经典分销模式

如下图中的分销模式,就可以很好的与本系统对接 输入图片说明

强大的账户体系

输入图片说明

系统可拔插

​ 系统以微服务的形式运行,即独立于其他的软件,提供接口进行交互,不会对其他的系统产生新的冗余数据。

​ 假设李老板 前期需要推广自己的软件,自己的软件又没有设计这个功能,加功能又需要很多钱,这个时候,使用这个软件就可以减少资金的投入(写很少的代码就可以实现自己的需求)。

系统稳定了,李老板 不需要这个分销软件了, 那么可以直接将原来的几行代码关了,或者在自己的系统中增加开关,直接就可以关掉。并且不影响原来的系统的运行。

分销配置化

假设平台原来只设置一级又分润,后面需要给二级或者三级分润,这个时候只需要在后台进行配置就可以。平台 如果设置原来的配置每笔交易按照百分比收取,后来改为每笔交易按照固定金额收取,就可以直接在后台进行配置。 如下图中的分润配置,可以根据各种情况进行配置分润。 输入图片说明

会员关系可视化

会员的发展理论上可以无限制的发展下去,并且可以通过树状图表现出来。 输入图片说明

分销关系权限化

每个分销商只能看到自己名下的会员。并且可以看到自己的交易明细,这个就减少原有的系统的开发。

积分控制可视化

输入图片说明

平台简介

对接参考,用来对系统进行对接,并且已经写好了的模拟接口,可以模仿使用 输入图片说明

会员信息对会员账号和会员资金进行管理 输入图片说明 输入图片说明

分销配置用来配置分润等信息

输入图片说明 输入图片说明 输入图片说明 输入图片说明 输入图片说明 输入图片说明

交易中心 集中对收入和支出进行管理 输入图片说明 输入图片说明

统计中心 对数据进行统计 交易动态,可以查看最新的交易成功的动态 输入图片说明 账户收益统计图 输入图片说明 输入图片说明

模拟前端界面展示

输入图片说明

输入图片说明

利用docker 本地部署

inside docker folder, start docker by

  $ ./start.sh

Then dump the data inside docker folder, access mysql container by

  $ docker exec -it distribution-mysql bash -l 
  $ mysql -uroot -p
  $ source /docker-entrypoint-initdb.d/distribution.sql;
  $ source /docker-entrypoint-initdb.d/authority.sql;

注意: 这里mysql 的port 是 6603, 需要在application-dev.yml 中替换成相应的port.

木兰宽松许可证, 第1版 木兰宽松许可证, 第1版 2019年8月 http://license.coscl.org.cn/MulanPSL 您对“软件”的复制、使用、修改及分发受木兰宽松许可证,第1版(“本许可证”)的如下条款的约束: 0. 定义 “软件”是指由“贡献”构成的许可在“本许可证”下的程序和相关文档的集合。 “贡献者”是指将受版权法保护的作品许可在“本许可证”下的自然人或“法人实体”。 “法人实体”是指提交贡献的机构及其“关联实体”。 “关联实体”是指,对“本许可证”下的一方而言,控制、受控制或与其共同受控制的机构,此处的控制是指有受控方或共同受控方至少50%直接或间接的投票权、资金或其他有价证券。 “贡献”是指由任一“贡献者”许可在“本许可证”下的受版权法保护的作品。 1. 授予版权许可 每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的版权许可,您可以复制、使用、修改、分发其“贡献”,不论修改与否。 2. 授予专利许可 每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的(根据本条规定撤销除外)专利许可,供您制造、委托制造、使用、许诺销售、销售、进口其“贡献”或以其他方式转移其“贡献”。前述专利许可仅限于“贡献者”现在或将来拥有或控制的其“贡献”本身或其“贡献”与许可“贡献”时的“软件”结合而将必然会侵犯的专利权利要求,不包括仅因您或他人修改“贡献”或其他结合而将必然会侵犯到的专利权利要求。如您或您的“关联实体”直接或间接地(包括通过代理、专利被许可人或受让人),就“软件”或其中的“贡献”对任何人发起专利侵权诉讼(包括反诉或交叉诉讼)或其他专利维权行动,指控其侵犯专利权,则“本许可证”授予您对“软件”的专利许可自您提起诉讼或发起维权行动之日终止。 3. 无商标许可 “本许可证”不提供对“贡献者”的商品名称、商标、服务标志或产品名称的商标许可,但您为满足第4条规定的声明义务而必须使用除外。 4. 分发限制 您可以在任何媒介中将“软件”以源程序形式或可执行形式重新分发,不论修改与否,但您必须向接收者提供“本许可证”的副本,并保留“软件”中的版权、商标、专利及免责声明。 5. 免责声明与责任限制 “软件”及其中的“贡献”在提供时不带任何明示或默示的担保。在任何情况下,“贡献者”或版权所有者不对任何人因使用“软件”或其中的“贡献”而引发的任何直接或间接损失承担责任,不论因何种原因导致或者基于何种法律理论,即使其曾被建议有此种损失的可能性。 条款结束。 如何将木兰宽松许可证,第1版,应用到您的软件 如果您希望将木兰宽松许可证,第1版,应用到您的新软件,为了方便接收者查阅,建议您完成如下三步: 1, 请您补充如下声明中的空白,包括软件名、软件的首次发表年份以及您作为版权人的名字; 2, 请您在软件包的一级目录下创建以“LICENSE”为名的文件,将整个许可证文本放入该文件中; 3, 请将如下声明文本放入每个源文件的头部注释中。 Copyright (c) [2019] [name of copyright holder] [Software Name] is licensed under the Mulan PSL v1. You can use this software according to the terms and conditions of the Mulan PSL v1. You may obtain a copy of Mulan PSL v1 at: http://license.coscl.org.cn/MulanPSL THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. See the Mulan PSL v1 for more details. Mulan Permissive Software License,Version 1 Mulan Permissive Software License,Version 1 (Mulan PSL v1) August 2019 http://license.coscl.org.cn/MulanPSL Your reproduction, use, modification and distribution of the Software shall be subject to Mulan PSL v1 (this License) with following terms and conditions: 0. Definition Software means the program and related documents which are comprised of those Contribution and licensed under this License. Contributor means the Individual or Legal Entity who licenses its copyrightable work under this License. Legal Entity means the entity making a Contribution and all its Affiliates. Affiliates means entities that control, or are controlled by, or are under common control with a party to this License, ‘control’ means direct or indirect ownership of at least fifty percent (50%) of the voting power, capital or other securities of controlled or commonly controlled entity. Contribution means the copyrightable work licensed by a particular Contributor under this License. 1. Grant of Copyright License Subject to the terms and conditions of this License, each Contributor hereby grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable copyright license to reproduce, use, modify, or distribute its Contribution, with modification or not. 2. Grant of Patent License Subject to the terms and conditions of this License, each Contributor hereby grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable (except for revocation under this Section) patent license to make, have made, use, offer for sale, sell, import or otherwise transfer its Contribution where such patent license is only limited to the patent claims owned or controlled by such Contributor now or in future which will be necessarily infringed by its Contribution alone, or by combination of the Contribution with the Software to which the Contribution was contributed, excluding of any patent claims solely be infringed by your or others’ modification or other combinations. If you or your Affiliates directly or indirectly (including through an agent, patent licensee or assignee), institute patent litigation (including a cross claim or counterclaim in a litigation) or other patent enforcement activities against any individual or entity by alleging that the Software or any Contribution in it infringes patents, then any patent license granted to you under this License for the Software shall terminate as of the date such litigation or activity is filed or taken. 3. No Trademark License No trademark license is granted to use the trade names, trademarks, service marks, or product names of Contributor, except as required to fulfill notice requirements in section 4. 4. Distribution Restriction You may distribute the Software in any medium with or without modification, whether in source or executable forms, provided that you provide recipients with a copy of this License and retain copyright, patent, trademark and disclaimer statements in the Software. 5. Disclaimer of Warranty and Limitation of Liability The Software and Contribution in it are provided without warranties of any kind, either express or implied. In no event shall any Contributor or copyright holder be liable to you for any damages, including, but not limited to any direct, or indirect, special or consequential damages arising from your use or inability to use the Software or the Contribution in it, no matter how it’s caused or based on which legal theory, even if advised of the possibility of such damages. End of the Terms and Conditions How to apply the Mulan Permissive Software License,Version 1 (Mulan PSL v1) to your software To apply the Mulan PSL v1 to your work, for easy identification by recipients, you are suggested to complete following three steps: i. Fill in the blanks in following statement, including insert your software name, the year of the first publication of your software, and your name identified as the copyright owner; ii. Create a file named “LICENSE” which contains the whole context of this License in the first directory of your software package; iii. Attach the statement to the appropriate annotated syntax at the beginning of each source file. Copyright (c) [2019] [name of copyright holder] [Software Name] is licensed under the Mulan PSL v1. You can use this software according to the terms and conditions of the Mulan PSL v1. You may obtain a copy of Mulan PSL v1 at: http://license.coscl.org.cn/MulanPSL THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. See the Mulan PSL v1 for more details.

简介

微服务下的分销管理利器,更加灵活的管理佣金,涵盖并且总结了目前流行的分销模式,让分销更加简单,后期开发立足于产业互联网,致力于打通产业内部之间的联系,有问题可以加qq 3174667330,欢迎大家star,你的鼓励是开发的动力 展开 收起
Java
MulanPSL-1.0
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Java
1
https://gitee.com/ervino/distribution_management.git
git@gitee.com:ervino/distribution_management.git
ervino
distribution_management
EDEN-MACE
master

搜索帮助

14c37bed 8189591 565d56ea 8189591