Open cprakashb opened 5 years ago
@Override public Products updateProduct(Products products) throws ProductAlreadyUpdatedException {
if(productRepository.existsById(products.getProductId())){ throw new ProductAlreadyUpdatedException("Products doesn't exists."); }else products.setProductId(products.getProductId()); products.setProductName(products.getProductName()); products.setProductType(products.getProductType()); products.setImageURL(products.getMrp()); products.setMrp(products.getMrp()); products.setPrice(products.getPrice()); products.setDimension(products.getDimension()); products.setWeight(products.getWeight()); products.setSize(products.getSize()); products.setGender(products.getGender()); products.setDescription(products.getDescription()); products.setBrand(products.getBrand()); products.setColour(products.getColour()); return productRepository.save(products); }
@Override public Products updateProduct(Products products) throws ProductAlreadyUpdatedException {