Skip to content

milovanovda/bonus_service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Business level concepts

  • User - Owner of a Transaction. For simplicity exists as a column in Transaction only
  • Transaction - Record of money transaction of a User
  • Bonus Program - Has start date, end date and some rules how bonuses assigned. Bonus Programs are independent and can be run in parallel. Transaction is valid for Bonus Program only if it was created within active period of Bonus Program
  • Bonus Rules - Logic for assigning bonuses. In this case we have only implementation based on thresholds

Quick start:

Requires Java 17 to run

Run command

  • mvn spring-boot:run

Application will start on port 8080

All exposed rest endpoints are available via link

Get list of all users

Get list of transaction of John starting July 1 ending September 30

Get transaction statistic of John starting July 1 ending September 30

Get list of bonus programs

Get bonus statistic of John for bonus program "TestProgramOne"

Database creation

Liquibase is used to create db schema Please check db.changelog-master.xml for details

Initial Data loading

Initial data loaded from CSV file in resource folder. TransactionPopulationJobConfiguration.java responsible for loading initial data it uses spring batch to load data. You can read more about it on https://spring.io/guides/gs/batch-processing/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages