途中経過
This commit is contained in:
@@ -6,6 +6,9 @@ import jakarta.servlet.http.HttpSession;
|
|||||||
|
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
||||||
|
|
||||||
|
import com.example.demo.entity.BookCollection;
|
||||||
|
import com.example.demo.entity.BorrowBook;
|
||||||
|
|
||||||
@Controller
|
@Controller
|
||||||
public class AdminLoanController {
|
public class AdminLoanController {
|
||||||
|
|
||||||
@@ -16,6 +19,8 @@ public class AdminLoanController {
|
|||||||
private final static String SEVERE_ERROR_MESSAGE = "エラーが発生しました!";
|
private final static String SEVERE_ERROR_MESSAGE = "エラーが発生しました!";
|
||||||
|
|
||||||
HttpSession httpSession;
|
HttpSession httpSession;
|
||||||
|
BookCollection bookcollection;
|
||||||
|
BorrowBook borrowBook;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,31 @@
|
|||||||
package com.example.demo.service;
|
package com.example.demo.service;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import com.example.demo.entity.BookCollection;
|
||||||
|
import com.example.demo.entity.BorrowBook;
|
||||||
|
import com.example.demo.repository.BookCollectionRepository;
|
||||||
|
import com.example.demo.repository.BorrowBookRepository;
|
||||||
|
|
||||||
|
@Service
|
||||||
public class BookAdminService {
|
public class BookAdminService {
|
||||||
|
|
||||||
|
BorrowBookRepository borrowBookRepository;
|
||||||
|
BookCollectionRepository bookCollectionRepository;
|
||||||
|
|
||||||
|
public BookAdminService(BorrowBookRepository borrowBookRepository, BookCollectionRepository bookCollectionRepository) {
|
||||||
|
this.borrowBookRepository = borrowBookRepository;
|
||||||
|
this.bookCollectionRepository = bookCollectionRepository;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional
|
||||||
|
public void aprroveBookAdmin(BorrowBook idRequest, BookCollection idBook) {
|
||||||
|
LocalDate today = LocalDate.now();
|
||||||
|
|
||||||
|
// 貸出テーブルの更新
|
||||||
|
BorrowBook brrowBook = borrowBookRepository.findById(idRequest);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user