public void trash(Long id) { final Goods entity = goodsDao.find(id); entity.setStatus(GoodsStatus.ERROR); goodsDao.edit(entity); }
public void recover(Long id) { final Goods entity = goodsDao.find(id); entity.setStatus(GoodsStatus.WAIT); goodsDao.edit(entity); }
public void process(Long id) { final Goods entity = goodsDao.find(id); entity.setStatus(GoodsStatus.SUCCESS); goodsDao.edit(entity); }
@SuppressWarnings("unchecked") public List<Goods> findTrash() { final Goods model = new Goods(); model.setStatus(GoodsStatus.ERROR); return goodsDao.find(model); }
@SuppressWarnings("unchecked") public List<Goods> findUnProcess() { final Goods model = new Goods(); model.setStatus(GoodsStatus.WAIT); return goodsDao.find(model); }
public List<Goods> findValidate() { return goodsDao.findValidate(); }
public List<Goods> findAll() { return goodsDao.findAll(); }