falta mover la cesta a cliente

This commit is contained in:
2025-10-31 08:25:13 +01:00
parent 167c136dca
commit 90c191d8f8
6 changed files with 166 additions and 89 deletions

View File

@ -4,8 +4,8 @@ import org.springframework.stereotype.Service;
@Service
public class PedidoService {
public int hasDescuentoFidelidad() {
public int getDescuentoFidelizacion() {
// descuento entre el 1% y el 6% para clientes fidelidad (mas de 1500€ en el ultimo año)
double totalGastado = 1600.0; // Ejemplo, deberías obtenerlo del historial del cliente
if(totalGastado < 1200) {
@ -18,10 +18,8 @@ public class PedidoService {
return 3;
} else if(totalGastado >= 4000 && totalGastado < 4999) {
return 4;
} else if(totalGastado >= 5000 && totalGastado < 9999) {
} else if(totalGastado >= 5000) {
return 5;
} else if(totalGastado >= 10000) {
return 6;
}
return 0;
}