Home > Back-end >  Javaweb idea is not very understand bosses give I rolled a hand or a better way please let us know
Javaweb idea is not very understand bosses give I rolled a hand or a better way please let us know

Time:10-05

I need in the shopping cart check multiple items in order how to order the goods I selected interface displayed my train of thought is I get the id of the selected goods then use string segmentation to id out and then define a circular array receiving in circular array with found out wrong but I don't know this way can indeed found out the selected products or have a better solution please inform

CodePudding user response:

Said to you before, I do my shopping cart method, you can consult, our shopping cart is achieved by redis, you say, we'll give each selected goods add a CheckBox logo, each time to cancel, selected will operate redis will not query the database directly, there is no much consumed, when placing orders only needs to query have chosen logo of product line, but at the time of order we will update price from a database, because the price may be will change during the period of

CodePudding user response:

The browser's cache to try, like dangdang

CodePudding user response:

If don't want to use the query, you can use the in keyword query, select * from the TAB where id in (', ')

CodePudding user response:

Can be used to cache of commodity information, Redis as a cache efficient

Can have a look at the official documentation first
https://docs.spring.io/spring/docs/5.2.2.RELEASE/spring-framework-reference/integration.html#cache

Look at this demo
https://github.com/xkcoding/spring-boot-demo/tree/master/spring-boot-demo-cache-redis
  • Related