15 Commits

Author SHA1 Message Date
3d5653418a 05番完了 2026-10-20 16:04:18 +09:00
b6d24a3d05 Merge branch 'h-hein2' of https://gitea.it-college.co.jp/2026_0910_AI_5G_Java_MUN/last-group-delevelopment-team2 into t-eguchi 2026-10-20 15:22:43 +09:00
6faaedaa95 コンフリクト解消 2026-10-20 15:22:30 +09:00
b6ada277a2 途中 2026-10-20 14:59:26 +09:00
b58a996e84 Merge branch 'h-hein2' of https://gitea.it-college.co.jp/2026_0910_AI_5G_Java_MUN/last-group-delevelopment-team2 into t-eguchi 2026-10-20 14:24:38 +09:00
0b89e45386 途中 2026-10-20 14:24:20 +09:00
694cb0f621 Merge branch 'h-hein2' of https://gitea.it-college.co.jp/2026_0910_AI_5G_Java_MUN/last-group-delevelopment-team2 into t-eguchi 2026-10-20 13:45:53 +09:00
ff1c43d80b 途中 2026-10-20 13:45:30 +09:00
528eadec5a コンフリクト解消しました 2026-10-20 11:19:42 +09:00
13f2fdedea 途中経過 2026-10-20 11:16:14 +09:00
4e6ca0eea9 Merge branch 'main' of https://gitea.it-college.co.jp/2026_0910_AI_5G_Java_MUN/last-group-delevelopment-team2 into t-eguchi 2026-10-19 16:19:22 +09:00
d67b790c44 1日目 2026-10-19 16:18:05 +09:00
eddc638c93 Merge branch 'm_shimizu' of https://gitea.it-college.co.jp/2026_0910_AI_5G_Java_MUN/last-group-delevelopment-team2 into t-eguchi 2026-10-19 14:26:22 +09:00
8392c6d2da Merge branch 'm-ozawa' of https://gitea.it-college.co.jp/2026_0910_AI_5G_Java_MUN/last-group-delevelopment-team2 into t-eguchi 2026-10-19 14:10:11 +09:00
75af719656 t 2026-10-19 13:58:46 +09:00
2 changed files with 7 additions and 7 deletions

View File

@@ -1,5 +1,4 @@
package com.example.demo.controller; package com.example.demo.controller;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.Model; import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@@ -37,7 +36,7 @@ public class AdminLoanController {
public String approvalConfirm(@PathVariable Integer id, Model model, RedirectAttributes ra) { public String approvalConfirm(@PathVariable Integer id, Model model, RedirectAttributes ra) {
try { try {
model.addAttribute("r", loanService.getView(id, Const.STATUS_WAITING)); model.addAttribute("r", loanService.getView(id, Const.STATUS_WAITING));
return "approvalConfirm"; return "approvalConfilm";
} catch (BusinessException e) { } catch (BusinessException e) {
ra.addFlashAttribute("errorMessage", e.getMessage()); ra.addFlashAttribute("errorMessage", e.getMessage());
return "redirect:/admin/applications"; return "redirect:/admin/applications";
@@ -50,7 +49,7 @@ public class AdminLoanController {
try { try {
loanService.approve(id, admin); loanService.approve(id, admin);
ra.addFlashAttribute("message", "書籍貸出申請を承認しました。"); ra.addFlashAttribute("message", "書籍貸出申請を承認しました。");
return "redirect:/admin/approval/complete"; return "approvalComplete";
} catch (BusinessException e) { } catch (BusinessException e) {
ra.addFlashAttribute("errorMessage", e.getMessage()); ra.addFlashAttribute("errorMessage", e.getMessage());
return "redirect:/admin/applications"; return "redirect:/admin/applications";
@@ -63,7 +62,7 @@ public class AdminLoanController {
try { try {
loanService.reject(id, admin); loanService.reject(id, admin);
ra.addFlashAttribute("message", "書籍貸出申請を却下しました。"); ra.addFlashAttribute("message", "書籍貸出申請を却下しました。");
return "redirect:/admin/approval/complete"; return "approvalRejected";
} catch (BusinessException e) { } catch (BusinessException e) {
ra.addFlashAttribute("errorMessage", e.getMessage()); ra.addFlashAttribute("errorMessage", e.getMessage());
return "redirect:/admin/applications"; return "redirect:/admin/applications";
@@ -116,3 +115,4 @@ public class AdminLoanController {
return "complete"; return "complete";
} }
} }

View File

@@ -1,8 +1,5 @@
package com.example.demo.service; package com.example.demo.service;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@@ -18,6 +15,7 @@ import com.example.demo.form.BookForm;
import com.example.demo.repository.BookCollectionRepository; import com.example.demo.repository.BookCollectionRepository;
/** BOOK-02:書籍登録、BOOK-03:書籍編集 */ /** BOOK-02:書籍登録、BOOK-03:書籍編集 */
@Service @Service
public class BookAdminService { public class BookAdminService {
private final BookCollectionRepository bookRepository; private final BookCollectionRepository bookRepository;
@@ -83,6 +81,7 @@ public class BookAdminService {
if (!errors.isEmpty()) throw new BusinessException(String.join(" ", errors)); if (!errors.isEmpty()) throw new BusinessException(String.join(" ", errors));
} }
private static void apply(BookCollection b, BookForm f) { private static void apply(BookCollection b, BookForm f) {
b.setIsbn(f.getIsbn()); b.setIsbn(f.getIsbn());
b.setNmBook(f.getNmBook()); b.setNmBook(f.getNmBook());
@@ -90,4 +89,5 @@ public class BookAdminService {
b.setPublisher(f.getPublisher().isEmpty() ? null : f.getPublisher()); b.setPublisher(f.getPublisher().isEmpty() ? null : f.getPublisher());
b.setNote(f.getNote().isEmpty() ? null : f.getNote()); b.setNote(f.getNote().isEmpty() ? null : f.getNote());
} }
} }