System Design of Integral

The requirements are as follows: a series of points rules can be set in the background. For example, the user will receive 200 points during this period of registration, and only 100 points will be given after a period of time. After a period of time, points may not be sent, and then the user will place an order. If you buy it, you will also get a certain amount of points. I would like to ask you how to design such a requirement, from database design to system implementation?
What I am currently thinking about is:
1) Database design: The database table contains three fields: id, method name, and integration rule. The id is the unique identifier of the primary key. The method name is the identifier corresponding to my interception rule. Format data, because the integration rules for registration and ordering are different, different rules are formatted in json and stored, and then parsed and judged in different logics;
2) System implementation: the system uses springmvc+mybatis, using spring's aop intercepts the service, parses the corresponding rules according to the intercepted service method name, and gives a certain amount of points.

There is also a problem involved. For the setting of the points rules, I put it in a system A alone, and the front-end users are registered. The purchase is in another system B. In order to improve efficiency, I may put the integration rules in the cache. In this case, if the integration rules are modified in A, the data in the cache must be updated in time in B. A, B Interact through an interface? Or is there a better solution?

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326940930&siteId=291194637