@Override
 public BookDTO addBook(BookDTO bookDTO, String token) {
 //step1: validate books author, title, publisher, publishedDate, genre
 //validateBook(bookDTO);
 //step2: judge if book exists
 boolean exist = bookMapper.bookExist(bookDTO.getAuthor(), bookDTO.getTitle(), bookDTO.getPublisher());
 if (exist) {
 throw new BusinessException(ErrorCodeEnum.BOOK\_EXIST);
 }
 //step3: convert bookDTO to book
 Book book = new Book();
 BeanUtils.copyProperties(bookDTO, book);
 book.setStatus(BookEnum.AVAILABLE.getBookCode());
 // Long userId = jwtTokenHelper.getUserIdFromToken(token);
 book.setCreatedBy(jwtTokenHelper.getUserIdFromToken(token));
 //step4: save book
 bookMapper.insert(book);
 //step5: convert book to bookDTO
 BookDTO result = new BookDTO();
 BeanUtils.copyProperties(book, result);
 result.setStatus(BookEnum.getBookStatus(book.getStatus()));
 return result;
 }
Is there a problem with this code under multithreading
user