src/main/java/com/kshrd/derphsar_api/rest/restcontroller/WishListRestController.java
/**
     * Post wishlists
     *
     * @param wishListRequestModel - Wishlist request model
     * @return - Return response message
     */
Post wishlists
@param wishListRequestModel - Wishlist request model
@return - Return response message
Post wishlists @param wishListRequestModel - Wishlist request model @return - Return response message
@PostMapping("/wishlists")
    @ApiOperation(value = "create a wishlist", response = WishListFirstCreateResponse.class)
    public ResponseEntity<BaseApiNoPaginationResponse<WishListFirstCreateResponse>> createWishList(@RequestBody WishListRequestModel wishListRequestModel) {
        BaseApiNoPaginationResponse<WishListFirstCreateResponse> response = new BaseApiNoPaginationResponse<>();
        ModelMapper mapper = new ModelMapper();
        UUID uuid = UUID.randomUUID();
        WishListDto wishListDto = mapper.map(wishListRequestModel, WishListDto.class);
        wishListDto.setWishlistId("DP" + uuid.toString().substring(0, 10));
        Timestamp timestamp = new Timestamp(System.currentTimeMillis());
        Date date = new Date(timestamp.getTime());
        wishListDto.setFavDate(date);
        wishListDto.setStatus(true);
        try {
            WishListDto result = wishListServiceImp.createWishList(wishListDto);
            WishListFirstCreateResponse wishListResponse = mapper.map(result, WishListFirstCreateResponse.class);
            response.setMessage(message.inserted("Wishlist"));
            response.setData(wishListResponse);
            response.setStatus(HttpStatus.CREATED);
        }catch (Exception e){
            e.printStackTrace();
        }
        response.setTime(new Timestamp(System.currentTimeMillis()));
        return ResponseEntity.ok(response);
    }
@ PostMapping ( "/wishlists" ) @ ApiOperation ( value = "create a wishlist" , response = WishListFirstCreateResponse . class ) public ResponseEntity < BaseApiNoPaginationResponse < WishListFirstCreateResponse > > createWishList ( @ RequestBody WishListRequestModel wishListRequestModel ) { BaseApiNoPaginationResponse < WishListFirstCreateResponse > response = new BaseApiNoPaginationResponse < > ( ) ; ModelMapper mapper = new ModelMapper ( ) ; UUID uuid = UUID . randomUUID ( ) ; WishListDto wishListDto = mapper . map ( wishListRequestModel , WishListDto . class ) ; wishListDto . setWishlistId ( "DP" + uuid . toString ( ) . substring ( 0 , 10 ) ) ; Timestamp timestamp = new Timestamp ( System . currentTimeMillis ( ) ) ; Date date = new Date ( timestamp . getTime ( ) ) ; wishListDto . setFavDate ( date ) ; wishListDto . setStatus ( true ) ; try { WishListDto result = wishListServiceImp . createWishList ( wishListDto ) ; WishListFirstCreateResponse wishListResponse = mapper . map ( result , WishListFirstCreateResponse . class ) ; response . setMessage ( message . inserted ( "Wishlist" ) ) ; response . setData ( wishListResponse ) ; response . setStatus ( HttpStatus . CREATED ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } response . setTime ( new Timestamp ( System . currentTimeMillis ( ) ) ) ; return ResponseEntity . ok ( response ) ; }
Post wishlists
 @param wishListRequestModel - Wishlist request model
 @return - Return response message
Post wishlists @param wishListRequestModel - Wishlist request model @return - Return response message
//wishListDto.setFavDate(new Timestamp(System.currentTimeMillis()));