src/main/java/com/kshrd/derphsar_api/rest/restcontroller/ShopRestController.java
/**
     * Put a shop
     *
     * @param shopId - Id of a shop
     * @param shopRequestModel - Shop request model
     * @return - Return response message
     */
Put a shop
@param shopId - Id of a shop
@param shopRequestModel - Shop request model
@return - Return response message
Put a shop @param shopId - Id of a shop @param shopRequestModel - Shop request model @return - Return response message
@PutMapping("/shops/{shopId}")
    @ApiOperation(value = "update a shop", response = ShopResponseModel.class)
    public ResponseEntity<BaseApiNoPaginationResponse<ShopResponseModel>> updateShop(@PathVariable("shopId") String shopId,
                                                                         @RequestBody ShopRequestModel shopRequestModel){
        ModelMapper modelMapper = new ModelMapper();
        BaseApiNoPaginationResponse<ShopResponseModel> response = new BaseApiNoPaginationResponse <>();
        ShopDto shopDto = shopServiceImp.findById(shopId);
        if(shopDto != null){
            ShopDto dto = modelMapper.map(shopRequestModel,ShopDto.class);
            ShopResponseModel responseModel = modelMapper.map(shopServiceImp.updateShop(shopId,dto),ShopResponseModel.class);
            response.setMessage(message.updated("Shop"));
            response.setData(responseModel);
            response.setStatus(HttpStatus.OK);
        }else {
            response.setMessage(message.updateError("Shop"));
            response.setStatus(HttpStatus.BAD_REQUEST);
        }
        response.setTime(new Timestamp(System.currentTimeMillis()));
        return ResponseEntity.ok(response);
    }
@ PutMapping ( "/shops/{shopId}" ) @ ApiOperation ( value = "update a shop" , response = ShopResponseModel . class ) public ResponseEntity < BaseApiNoPaginationResponse < ShopResponseModel > > updateShop ( @ PathVariable ( "shopId" ) String shopId , @ RequestBody ShopRequestModel shopRequestModel ) { ModelMapper modelMapper = new ModelMapper ( ) ; BaseApiNoPaginationResponse < ShopResponseModel > response = new BaseApiNoPaginationResponse < > ( ) ; ShopDto shopDto = shopServiceImp . findById ( shopId ) ; if ( shopDto != null ) { ShopDto dto = modelMapper . map ( shopRequestModel , ShopDto . class ) ; ShopResponseModel responseModel = modelMapper . map ( shopServiceImp . updateShop ( shopId , dto ) , ShopResponseModel . class ) ; response . setMessage ( message . updated ( "Shop" ) ) ; response . setData ( responseModel ) ; response . setStatus ( HttpStatus . OK ) ; } else { response . setMessage ( message . updateError ( "Shop" ) ) ; response . setStatus ( HttpStatus . BAD_REQUEST ) ; } response . setTime ( new Timestamp ( System . currentTimeMillis ( ) ) ) ; return ResponseEntity . ok ( response ) ; }
Put a shop
 @param shopId - Id of a shop
 @param shopRequestModel - Shop request model
 @return - Return response message
Put a shop @param shopId - Id of a shop @param shopRequestModel - Shop request model @return - Return response message