cyrilfeng / q-calculator Goto Github PK
View Code? Open in Web Editor NEW高性能优惠叠加计算框架
License: Apache License 2.0
高性能优惠叠加计算框架
License: Apache License 2.0
您好:
目前看完介绍跑完demo有一些疑惑的点:
类似如果用户包含的资产里面有A,B,C,D:(A,B)互斥 ,(C,D)互斥,(B,D)互斥,(A,C)(B,C)(A,D) 共享,不太理解按现有结构要如何配置才能支持
类似:如果券作用是在单商品上的,只能被用一次(多个数量只能用一个),代码里面有个records描述可以记录商品的优惠,自定义逻辑。
方便的话可以给个示例,还有有些券被商品使用了,需要标记被使用,不能参与计算了,这种。
final DiscountConfig discountConfig = new DiscountConfig();
discountConfig.setCalculateGroup(10);
discountConfig.setGoodsType(1);
discountConfig.setItemIds(ImmutableList.of(1001L));
discountConfig.setItemIdType(0);
{
"6667": [
{
"beforeCalcPrice": 10000,
"afterCalcPrice": 8000,
"stageType": "manjian",
"index": 0,
"extra": null
},
{
"beforeCalcPrice": 8000,
"afterCalcPrice": 6667,
"stageType": "zhekou",
"index": 1,
"extra": null
}
]
}
如果可能的话,可以把文档更详细一些,或者一个相对复杂的使用示例,会更方便理解。
最后,之前没有接触过电商项目,所以比较小白
在找到这个仓库之前:
看了 严选促销中心价格计算体系的建设之路, vivo商城计价中心 看着场景都很符合,但是自己一个人实现就头大了,都很困难。
全网或许只有你们一个开源这种算法的,非常感谢。
Hello! I came across your code and I was wondering if you have considered adding a license file to your repository. A license file is a way of letting others know how they can use or modify your code legally. Without a license file, your code is technically not open source and no one can use it without your permission. This might limit the potential impact and reach of your project. GitHub recommends that you include a license in your repository to let others know how can your code be used and built upon (Source: Licensing a repository). If you are interested in making your project open source, you can check out Choosing a license to learn more about the different types of licenses and their benefits.
To add a license file to your repository, you can follow the steps in this guide: Adding a license to a repository. You can also read this article for more information on open source licensing: Open Source Licensing Guide.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.