• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

Spring Boot Add Data from different classes

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hallo everyone,

I would like to complete a program on Java with Spring Boot. I have a mini problem.
I use two different tables on my sql table, one for price one for discount.

I would like to calculate the price on ProductService, by substract the row of column of another Class, the class of ProductDiscount,for example.

So,
I have two tables in sql for price  and for discount .There are specific column, which is used to calculate  at each class .
On the total price I should calculate the final price. It is essential to use another class to add or multiple.




Is it possible? Are there any examples, I cannot find something similar in the web, add or substract data from different classes.
 
Eleni Pap
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator



i  should check the type of my voucher (true) , and I should add on my repo entity at stock.

In which way can I update the two entities at the same time?

When I add a true voucher, I should add on my repo.stock the data of voucher.quantity

Could anyone help me?
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic