mirror of
https://git.imnavajas.es/jjimenez/erp-imprimelibros.git
synced 2026-01-22 16:50:21 +00:00
falta mover la cesta a cliente
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user