Created
July 15, 2013 00:01
-
-
Save marti1125/5996684 to your computer and use it in GitHub Desktop.
job verificar cantidad de productos
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package jobs; | |
import java.util.List; | |
import models.Producto; | |
import play.jobs.*; | |
@Every("1mn") | |
public class VerificarCantidadDeProductos extends Job { | |
public void doJob() { | |
List<Producto> productos = Producto.findAll(); | |
for(Producto p : productos){ | |
if(p.cantidadInicial == 0){ | |
System.out.println("No tiene Stock"); | |
} else { | |
System.out.println("Hay Stock"); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment