Compare commits
27 Commits
cb7a3f542b
...
15bf2949bc
| Author | SHA1 | Date | |
|---|---|---|---|
| 15bf2949bc | |||
| be9abffeaa | |||
| d696d8f376 | |||
| 066d76148b | |||
| 603d0d083a | |||
| cbd5aa6a7d | |||
| 43740691b5 | |||
| 7719c002ff | |||
| 8884a74625 | |||
|
|
61da5163b0 | ||
| 30a2ef3e21 | |||
| 938574654f | |||
|
|
20b4366d91 | ||
|
|
952c6f69d8 | ||
| 2e427c8189 | |||
| 0558555315 | |||
|
|
ff65d8c045 | ||
| e43028c0ee | |||
|
|
594f09553a | ||
| 7ddebf7a4a | |||
|
|
52f2559cf7 | ||
|
|
039f416f49 | ||
|
|
ed8e971368 | ||
| b48b3ae0bd | |||
|
|
8f3ea4cd26 | ||
| 57749b6354 | |||
| a8c46cc9db |
@@ -0,0 +1,18 @@
|
|||||||
|
package com.example.demo.app.domain.model;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class ProfileModel {
|
||||||
|
private Long userId;
|
||||||
|
private String userName;
|
||||||
|
private String emailAddress;
|
||||||
|
private LocalDate brithDate;
|
||||||
|
private Integer saving;
|
||||||
|
private Integer annualIncome;
|
||||||
|
private Integer monthlyBudget;
|
||||||
|
}
|
||||||
@@ -5,6 +5,8 @@ import com.example.demo.app.domain.model.GoalModel;
|
|||||||
public interface GoalService {
|
public interface GoalService {
|
||||||
|
|
||||||
GoalModel getGoalById(Long goalId);
|
GoalModel getGoalById(Long goalId);
|
||||||
|
|
||||||
|
GoalModel getGoalByUserId(Long userId);
|
||||||
|
|
||||||
GoalModel createGoal(GoalModel goalModel);
|
GoalModel createGoal(GoalModel goalModel);
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package com.example.demo.app.domain.service;
|
||||||
|
|
||||||
|
import com.example.demo.app.presentation.form.PasswordResetForm;
|
||||||
|
|
||||||
|
public interface PasswordResetService {
|
||||||
|
boolean resetPassword(Long userId, PasswordResetForm passwordResetForm);
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package com.example.demo.app.domain.service;
|
||||||
|
|
||||||
|
import com.example.demo.app.domain.model.ProfileModel;
|
||||||
|
|
||||||
|
public interface ProfileService {
|
||||||
|
ProfileModel findOne(Long userId);
|
||||||
|
}
|
||||||
@@ -5,6 +5,8 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import com.example.demo.app.domain.model.TransactionModel;
|
import com.example.demo.app.domain.model.TransactionModel;
|
||||||
|
import com.example.demo.app.presentation.form.Expense;
|
||||||
|
import com.example.demo.app.presentation.form.Income;
|
||||||
|
|
||||||
public interface TransactionService {
|
public interface TransactionService {
|
||||||
|
|
||||||
@@ -14,10 +16,16 @@ public interface TransactionService {
|
|||||||
|
|
||||||
public int findTotalIncome(LocalDate startDate, LocalDate endDate, Long userId);
|
public int findTotalIncome(LocalDate startDate, LocalDate endDate, Long userId);
|
||||||
|
|
||||||
public int findTotalexpense(LocalDate startDate, LocalDate endDate, Long userId);
|
public int findTotalExpense(LocalDate startDate, LocalDate endDate, Long userId);
|
||||||
|
|
||||||
public int createTransaction(TransactionModel transactionModel);
|
public int createTransaction(TransactionModel transactionModel);
|
||||||
|
|
||||||
public int updateTransaction(TransactionModel transactionModel);
|
public int updateTransaction(TransactionModel transactionModel);
|
||||||
|
|
||||||
|
public void deleteTransaction(Long transactionId);
|
||||||
|
|
||||||
|
public List<Income> findTotalIncomeList(LocalDate startDate, LocalDate endDate, Long userId);
|
||||||
|
|
||||||
|
public List<Expense> findTotalExpenseList(LocalDate startDate, LocalDate endDate, Long userId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package com.example.demo.app.domain.service;
|
||||||
|
|
||||||
|
import com.example.demo.app.presentation.form.UserForm;
|
||||||
|
|
||||||
|
public interface UserService {
|
||||||
|
void register(UserForm userForm);
|
||||||
|
}
|
||||||
@@ -5,7 +5,9 @@ import org.springframework.stereotype.Service;
|
|||||||
import com.example.demo.app.domain.model.GoalModel;
|
import com.example.demo.app.domain.model.GoalModel;
|
||||||
import com.example.demo.app.domain.service.GoalService;
|
import com.example.demo.app.domain.service.GoalService;
|
||||||
import com.example.demo.app.infra.entity.GoalEntity;
|
import com.example.demo.app.infra.entity.GoalEntity;
|
||||||
|
import com.example.demo.app.infra.entity.UserEntity;
|
||||||
import com.example.demo.app.infra.repository.GoalRepository;
|
import com.example.demo.app.infra.repository.GoalRepository;
|
||||||
|
import com.example.demo.app.infra.repository.UserRepository;
|
||||||
|
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
|
||||||
@@ -14,14 +16,20 @@ import lombok.RequiredArgsConstructor;
|
|||||||
public class GoalServiceImpl implements GoalService {
|
public class GoalServiceImpl implements GoalService {
|
||||||
|
|
||||||
private final GoalRepository goalRepository;
|
private final GoalRepository goalRepository;
|
||||||
|
private final UserRepository userRepository;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public GoalModel getGoalById(Long goalId) {
|
public GoalModel getGoalById(Long goalId) {
|
||||||
|
|
||||||
GoalEntity goalEntity = goalRepository.findById(goalId).orElse(null);
|
GoalEntity goalEntity = goalRepository.findById(goalId).orElse(null);
|
||||||
|
|
||||||
return GoalModel.convertFrom(goalEntity);
|
return GoalModel.convertFrom(goalEntity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GoalModel getGoalByUserId(Long userId) {
|
||||||
|
|
||||||
|
UserEntity userEntity = userRepository.findById(userId).orElseThrow();
|
||||||
|
GoalEntity goalEntity = userEntity.getGoalEntity();
|
||||||
|
return GoalModel.convertFrom(goalEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -32,7 +40,6 @@ public class GoalServiceImpl implements GoalService {
|
|||||||
GoalEntity savedGoalEntity = goalRepository.save(goalEntity);
|
GoalEntity savedGoalEntity = goalRepository.save(goalEntity);
|
||||||
|
|
||||||
return GoalModel.convertFrom(savedGoalEntity);
|
return GoalModel.convertFrom(savedGoalEntity);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -43,7 +50,6 @@ public class GoalServiceImpl implements GoalService {
|
|||||||
GoalEntity updatedGoalEntity = goalRepository.save(goalEntity);
|
GoalEntity updatedGoalEntity = goalRepository.save(goalEntity);
|
||||||
|
|
||||||
return GoalModel.convertFrom(updatedGoalEntity);
|
return GoalModel.convertFrom(updatedGoalEntity);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
package com.example.demo.app.domain.service.impl;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import com.example.demo.app.domain.model.ProfileModel;
|
||||||
|
import com.example.demo.app.domain.service.ProfileService;
|
||||||
|
import com.example.demo.app.infra.entity.UserEntity;
|
||||||
|
import com.example.demo.app.infra.repository.UserRepository;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class ProfileServiceImpl implements ProfileService{
|
||||||
|
private final UserRepository userRepository;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ProfileModel findOne(Long userId) {
|
||||||
|
UserEntity userEntity = userRepository.findById(userId).orElse(null);
|
||||||
|
|
||||||
|
if(userEntity == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return new ProfileModel(
|
||||||
|
userEntity.getUserId(),
|
||||||
|
userEntity.getUserName(),
|
||||||
|
userEntity.getMailAddress(),
|
||||||
|
userEntity.getBirthDate(),
|
||||||
|
userEntity.getSaving(),
|
||||||
|
userEntity.getAnnualIncome(),
|
||||||
|
userEntity.getMonthlyBudget());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -16,6 +16,8 @@ import com.example.demo.app.infra.entity.UserEntity;
|
|||||||
import com.example.demo.app.infra.repository.CategoryRepository;
|
import com.example.demo.app.infra.repository.CategoryRepository;
|
||||||
import com.example.demo.app.infra.repository.TransactionRepository;
|
import com.example.demo.app.infra.repository.TransactionRepository;
|
||||||
import com.example.demo.app.infra.repository.UserRepository;
|
import com.example.demo.app.infra.repository.UserRepository;
|
||||||
|
import com.example.demo.app.presentation.form.Expense;
|
||||||
|
import com.example.demo.app.presentation.form.Income;
|
||||||
|
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
|
||||||
@@ -27,19 +29,38 @@ public class TransactionServiceImpl implements TransactionService {
|
|||||||
private final UserRepository userRepository;
|
private final UserRepository userRepository;
|
||||||
private final CategoryRepository categoryRepository;
|
private final CategoryRepository categoryRepository;
|
||||||
|
|
||||||
public Map<LocalDate, List<TransactionModel>> findAllByDate(LocalDate startDate, LocalDate endDate, Long userId) {
|
public Map<LocalDate, List<TransactionModel>> findAllByDate(
|
||||||
|
LocalDate startDate,
|
||||||
|
LocalDate endDate,
|
||||||
|
Long userId) {
|
||||||
|
|
||||||
|
System.out.println("========== findAllByDate ==========");
|
||||||
|
System.out.println("startDate = " + startDate);
|
||||||
|
System.out.println("endDate = " + endDate);
|
||||||
|
System.out.println("userId = " + userId);
|
||||||
|
|
||||||
List<TransactionEntity> transactionEntityList = transactionRepository.findAllByDateAndUserId(startDate, endDate,
|
List<TransactionEntity> transactionEntityList = transactionRepository.findAllByDateAndUserId(startDate, endDate,
|
||||||
userId);
|
userId);
|
||||||
|
|
||||||
List<TransactionModel> transactionModelList = TransactionModel
|
System.out.println("Entity count = " + transactionEntityList.size());
|
||||||
.convertFrom(transactionEntityList);
|
|
||||||
|
transactionEntityList.forEach(t -> {
|
||||||
|
System.out.println(
|
||||||
|
"date = " + t.getTransactionDate()
|
||||||
|
+ ", amount = " + t.getAmount());
|
||||||
|
});
|
||||||
|
|
||||||
|
List<TransactionModel> transactionModelList = TransactionModel.convertFrom(transactionEntityList);
|
||||||
|
|
||||||
|
System.out.println("Model count = " + transactionModelList.size());
|
||||||
|
|
||||||
Map<LocalDate, List<TransactionModel>> transactionModelMap = transactionModelList.stream()
|
Map<LocalDate, List<TransactionModel>> transactionModelMap = transactionModelList.stream()
|
||||||
.collect(Collectors.groupingBy(TransactionModel::getTransactionDate));
|
.collect(Collectors.groupingBy(
|
||||||
|
TransactionModel::getTransactionDate));
|
||||||
|
|
||||||
|
System.out.println("Map = " + transactionModelMap);
|
||||||
|
|
||||||
return transactionModelMap;
|
return transactionModelMap;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public int findTotalIncome(LocalDate startDate, LocalDate endDate, Long userId) {
|
public int findTotalIncome(LocalDate startDate, LocalDate endDate, Long userId) {
|
||||||
@@ -48,9 +69,21 @@ public class TransactionServiceImpl implements TransactionService {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public int findTotalexpense(LocalDate startDate, LocalDate endDate, Long userId) {
|
public int findTotalExpense(LocalDate startDate, LocalDate endDate, Long userId) {
|
||||||
|
|
||||||
return transactionRepository.findTotalIncome(startDate, endDate, userId);
|
return transactionRepository.findTotalExpense(startDate, endDate, userId);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Income> findTotalIncomeList(LocalDate startDate, LocalDate endDate, Long userId) {
|
||||||
|
|
||||||
|
return transactionRepository.findTotalIncomeList(startDate, endDate, userId);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Expense> findTotalExpenseList(LocalDate startDate, LocalDate endDate, Long userId) {
|
||||||
|
|
||||||
|
return transactionRepository.findTotalExpenseList(startDate, endDate, userId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -91,7 +124,7 @@ public class TransactionServiceImpl implements TransactionService {
|
|||||||
if (!transactionRepository.existsById(transactionModel.getTransactionId())) {
|
if (!transactionRepository.existsById(transactionModel.getTransactionId())) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
Optional<UserEntity> userEntityOptional = userRepository.findById(transactionModel.getUserId());
|
Optional<UserEntity> userEntityOptional = userRepository.findById(transactionModel.getUserId());
|
||||||
|
|
||||||
if (userEntityOptional.isEmpty()) {
|
if (userEntityOptional.isEmpty()) {
|
||||||
@@ -115,4 +148,9 @@ public class TransactionServiceImpl implements TransactionService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void deleteTransaction(Long transactionId) {
|
||||||
|
transactionRepository.deleteById(transactionId);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ public class GoalEntity {
|
|||||||
@Column(name = "deadline", nullable = false)
|
@Column(name = "deadline", nullable = false)
|
||||||
private LocalDate deadline;
|
private LocalDate deadline;
|
||||||
|
|
||||||
@Column(name = "goal_complete", nullable = false)
|
@Column(name = "goal_complete", nullable = true)
|
||||||
private Integer goalComplete;
|
private Integer goalComplete;
|
||||||
|
|
||||||
@OneToOne(mappedBy = "goalEntity")
|
@OneToOne(mappedBy = "goalEntity")
|
||||||
|
|||||||
@@ -7,21 +7,31 @@ import org.springframework.data.jpa.repository.JpaRepository;
|
|||||||
import org.springframework.data.jpa.repository.Query;
|
import org.springframework.data.jpa.repository.Query;
|
||||||
|
|
||||||
import com.example.demo.app.infra.entity.TransactionEntity;
|
import com.example.demo.app.infra.entity.TransactionEntity;
|
||||||
|
import com.example.demo.app.presentation.form.Expense;
|
||||||
|
import com.example.demo.app.presentation.form.Income;
|
||||||
|
|
||||||
public interface TransactionRepository extends JpaRepository<TransactionEntity, Long> {
|
public interface TransactionRepository extends JpaRepository<TransactionEntity, Long> {
|
||||||
|
|
||||||
@Query("select t from TransactionEntity t where t.userEntity.userId = :userId and t.transactionDate = :transactionDate")
|
@Query("select t from TransactionEntity t where t.userEntity.userId = :userId and t.transactionDate = :todayDate")
|
||||||
public List<TransactionEntity> findByUserIdAndDate(LocalDate todayDate, Long userId);
|
public List<TransactionEntity> findByUserIdAndDate(LocalDate todayDate, Long userId);
|
||||||
|
|
||||||
@Query("select t from TransactionEntity t where (t.transactionDate between :startDate and :endDate) and (t.userEntity.userId = :userId) order by t.transactionDate asc")
|
@Query("select t from TransactionEntity t where (t.transactionDate between :startDate and :endDate) and (t.userEntity.userId = :userId) order by t.transactionDate asc")
|
||||||
public List<TransactionEntity> findAllByDateAndUserId(LocalDate startDate, LocalDate endDate, Long userId);
|
public List<TransactionEntity> findAllByDateAndUserId(LocalDate startDate, LocalDate endDate, Long userId);
|
||||||
|
|
||||||
@Query("select sum(t.amount) from TransactionEntity t inner join CategoryEntity c on t.categoryEntity.categoryId = c.categoryId where (t.userEntity.userId = :userId and t.transactionDate between :startDate and :endDate) and c.transactionType = 0")
|
@Query("select coalesce(sum(t.amount), 0) from TransactionEntity t inner join CategoryEntity c on t.categoryEntity.categoryId = c.categoryId where (t.userEntity.userId = :userId and t.transactionDate between :startDate and :endDate) and c.transactionType = 0")
|
||||||
public Integer findTotalExpense(LocalDate startDate, LocalDate endDate, Long userId);
|
public Integer findTotalExpense(LocalDate startDate, LocalDate endDate, Long userId);
|
||||||
|
|
||||||
@Query("select sum(t.amount) from TransactionEntity t inner join CategoryEntity c on t.categoryEntity.categoryId = c.categoryId where (t.userEntity.userId = :userId and t.transactionDate between :startDate and :endDate) and c.transactionType = 1")
|
@Query("select coalesce(sum(t.amount), 0) from TransactionEntity t inner join CategoryEntity c on t.categoryEntity.categoryId = c.categoryId where (t.userEntity.userId = :userId and t.transactionDate between :startDate and :endDate) and c.transactionType = 1")
|
||||||
public Integer findTotalIncome(LocalDate startDate, LocalDate endDate, Long userId);
|
public Integer findTotalIncome(LocalDate startDate, LocalDate endDate, Long userId);
|
||||||
|
|
||||||
@Query("select sum(t.amount) from TransactionEntity t where t.userEntity.userId = :userId and t.categoryEntity.categoryId = :categoryId and t.transactionDate between :startDate and :endDate")
|
@Query("select coalesce(sum(t.amount), 0) from TransactionEntity t where t.userEntity.userId = :userId and t.categoryEntity.categoryId = :categoryId and t.transactionDate between :startDate and :endDate")
|
||||||
public Integer findCategoryExpense(LocalDate startDate, LocalDate endDate, Long userId, Long categoryId);
|
public Integer findCategoryExpense(LocalDate startDate, LocalDate endDate, Long userId, Long categoryId);
|
||||||
|
|
||||||
|
@Query("select new com.example.demo.app.presentation.form.Expense(t.transactionDate, coalesce(sum(t.amount), 0)) from TransactionEntity t inner join CategoryEntity c on t.categoryEntity.categoryId = c.categoryId where (t.userEntity.userId = :userId and t.transactionDate between :startDate and :endDate) and c.transactionType = 0 group by t.transactionDate order by t.transactionDate asc")
|
||||||
|
public List<Expense> findTotalExpenseList(LocalDate startDate, LocalDate endDate, Long userId);
|
||||||
|
|
||||||
|
@Query("select new com.example.demo.app.presentation.form.Income(t.transactionDate, coalesce(sum(t.amount), 0)) from TransactionEntity t inner join CategoryEntity c on t.categoryEntity.categoryId = c.categoryId where (t.userEntity.userId = :userId and t.transactionDate between :startDate and :endDate) and c.transactionType = 1 group by t.transactionDate order by t.transactionDate asc")
|
||||||
|
public List<Income> findTotalIncomeList(LocalDate startDate, LocalDate endDate, Long userId);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package com.example.demo.app.presentation.controller;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
|
||||||
|
@Controller
|
||||||
|
public class ErrorController {
|
||||||
|
@GetMapping("/error")
|
||||||
|
public String showError() {
|
||||||
|
return "error";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,14 +1,16 @@
|
|||||||
package com.example.demo.app.presentation.controller;
|
package com.example.demo.app.presentation.controller;
|
||||||
|
|
||||||
|
import jakarta.servlet.http.HttpSession;
|
||||||
|
|
||||||
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;
|
||||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
import com.example.demo.app.domain.model.GoalModel;
|
import com.example.demo.app.domain.model.GoalModel;
|
||||||
|
import com.example.demo.app.domain.model.LoginModel;
|
||||||
import com.example.demo.app.domain.service.GoalService;
|
import com.example.demo.app.domain.service.GoalService;
|
||||||
import com.example.demo.app.presentation.form.GoalForm;
|
import com.example.demo.app.presentation.form.GoalForm;
|
||||||
|
|
||||||
@@ -21,41 +23,59 @@ public class GoalController {
|
|||||||
|
|
||||||
private final GoalService goalService;
|
private final GoalService goalService;
|
||||||
|
|
||||||
@GetMapping("/{goalId}")
|
@GetMapping("")
|
||||||
public String getGoal(@PathVariable Long goalId, Model model) {
|
public String getGoal(Model model, HttpSession session) {
|
||||||
|
|
||||||
GoalModel goalModel = goalService.getGoalById(goalId);
|
|
||||||
|
|
||||||
|
LoginModel loginUser = (LoginModel) session.getAttribute("loginUser");
|
||||||
|
|
||||||
|
Long userId = loginUser.getUserId();
|
||||||
|
//テスト用
|
||||||
|
// Long userId = 1L;
|
||||||
|
|
||||||
|
GoalModel goalModel = goalService.getGoalByUserId(userId);
|
||||||
GoalForm goalForm = GoalForm.convertFrom(goalModel);
|
GoalForm goalForm = GoalForm.convertFrom(goalModel);
|
||||||
|
|
||||||
model.addAttribute("goalForm", goalForm);
|
model.addAttribute("goalForm", goalForm);
|
||||||
|
|
||||||
return "goal_view";
|
return "goal_view";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/{goalId}/edit")
|
@GetMapping("/edit")
|
||||||
public String editGoal(@PathVariable Long goalId, Model model) {
|
public String editGoal(Model model, HttpSession session) {
|
||||||
|
|
||||||
GoalModel goalModel = goalService.getGoalById(goalId);
|
LoginModel loginUser = (LoginModel) session.getAttribute("loginUser");
|
||||||
|
Long userId = loginUser.getUserId();
|
||||||
|
|
||||||
|
//テスト用
|
||||||
|
// Long userId = 1L;
|
||||||
|
|
||||||
|
GoalModel goalModel = goalService.getGoalByUserId(userId);
|
||||||
GoalForm goalForm = GoalForm.convertFrom(goalModel);
|
GoalForm goalForm = GoalForm.convertFrom(goalModel);
|
||||||
|
|
||||||
model.addAttribute("goalForm", goalForm);
|
model.addAttribute("goalForm", goalForm);
|
||||||
|
|
||||||
return "goal_edit";
|
return "goal_edit";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/update")
|
@PostMapping("/update")
|
||||||
public String updateGoal(@ModelAttribute GoalForm goalForm) {
|
public String updateGoal(@ModelAttribute GoalForm goalForm, HttpSession session) {
|
||||||
|
|
||||||
|
LoginModel loginUser = (LoginModel) session.getAttribute("loginUser");
|
||||||
|
|
||||||
|
Long userId = loginUser.getUserId();
|
||||||
|
//テスト用
|
||||||
|
// Long userId = 1L;
|
||||||
|
|
||||||
|
|
||||||
|
// 本人の目標かどうかを確認してから更新する
|
||||||
|
GoalModel currentGoal = goalService.getGoalByUserId(userId);
|
||||||
|
|
||||||
|
if (!currentGoal.getGoalId().equals(goalForm.getGoalId())) {
|
||||||
|
return "redirect:/goal"; // 他人のデータを更新しようとしたら弾く
|
||||||
|
}
|
||||||
|
|
||||||
GoalModel goalModel = GoalModel.convertFrom(goalForm);
|
GoalModel goalModel = GoalModel.convertFrom(goalForm);
|
||||||
|
|
||||||
goalService.updateGoal(goalModel);
|
goalService.updateGoal(goalModel);
|
||||||
|
|
||||||
return "redirect:/goal/" + goalForm.getGoalId();
|
return "redirect:/goal";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -21,11 +21,7 @@ public class LoginController {
|
|||||||
private final LoginService loginService;
|
private final LoginService loginService;
|
||||||
|
|
||||||
@GetMapping("/login")
|
@GetMapping("/login")
|
||||||
public String showLogin(Model model) {
|
public String showLogin(@ModelAttribute LoginForm loginForm) {
|
||||||
|
|
||||||
model.addAttribute(
|
|
||||||
"loginForm",
|
|
||||||
new LoginForm());
|
|
||||||
|
|
||||||
return "login";
|
return "login";
|
||||||
}
|
}
|
||||||
@@ -50,6 +46,7 @@ public class LoginController {
|
|||||||
|
|
||||||
session.setAttribute("loginUser", loginModel);
|
session.setAttribute("loginUser", loginModel);
|
||||||
|
|
||||||
return "menu";
|
return "redirect:/menu";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
package com.example.demo.app.presentation.controller;
|
||||||
|
|
||||||
|
import jakarta.servlet.http.HttpSession;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.ui.Model;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
|
||||||
|
import com.example.demo.app.domain.model.LoginModel;
|
||||||
|
import com.example.demo.app.domain.model.ProfileModel;
|
||||||
|
import com.example.demo.app.domain.service.ProfileService;
|
||||||
|
import com.example.demo.app.presentation.form.ProfileForm;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
|
||||||
|
@Controller
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class ProfileController {
|
||||||
|
private final ProfileService profileService;
|
||||||
|
|
||||||
|
@GetMapping("/profile")
|
||||||
|
public String profile(Model model, HttpSession session) {
|
||||||
|
LoginModel loginUser = (LoginModel) session.getAttribute("loginUser");
|
||||||
|
|
||||||
|
ProfileModel profileModel = profileService.findOne(loginUser.getUserId());
|
||||||
|
|
||||||
|
ProfileForm profileForm = ProfileForm.convertForm(profileModel);
|
||||||
|
|
||||||
|
model.addAttribute("profileForm", profileForm);
|
||||||
|
return "profile";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.example.demo.app.presentation.controller;
|
package com.example.demo.app.presentation.controller;
|
||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
import java.time.YearMonth;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -19,6 +20,8 @@ import com.example.demo.app.domain.model.LoginModel;
|
|||||||
import com.example.demo.app.domain.service.CategoryService;
|
import com.example.demo.app.domain.service.CategoryService;
|
||||||
import com.example.demo.app.domain.service.TransactionService;
|
import com.example.demo.app.domain.service.TransactionService;
|
||||||
import com.example.demo.app.presentation.form.CategoryForm;
|
import com.example.demo.app.presentation.form.CategoryForm;
|
||||||
|
import com.example.demo.app.presentation.form.Expense;
|
||||||
|
import com.example.demo.app.presentation.form.Income;
|
||||||
import com.example.demo.app.presentation.form.TransactionForm;
|
import com.example.demo.app.presentation.form.TransactionForm;
|
||||||
|
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
@@ -29,8 +32,8 @@ public class TransactionController {
|
|||||||
|
|
||||||
private final TransactionService transactionService;
|
private final TransactionService transactionService;
|
||||||
private final CategoryService categoryService;
|
private final CategoryService categoryService;
|
||||||
// 一覧画面
|
|
||||||
|
|
||||||
|
// 一覧画面
|
||||||
@GetMapping("/transaction/list")
|
@GetMapping("/transaction/list")
|
||||||
public String transactionList(@RequestParam(required = false) LocalDate startDates,
|
public String transactionList(@RequestParam(required = false) LocalDate startDates,
|
||||||
@RequestParam(required = false) LocalDate endDates, Model model,
|
@RequestParam(required = false) LocalDate endDates, Model model,
|
||||||
@@ -47,19 +50,24 @@ public class TransactionController {
|
|||||||
|
|
||||||
transactionService.findAllByDate(startDate, endDate, loginUser.getUserId()).forEach((date, list) -> {
|
transactionService.findAllByDate(startDate, endDate, loginUser.getUserId()).forEach((date, list) -> {
|
||||||
List<TransactionForm> transactionFormList = list.stream().map(transaction -> {
|
List<TransactionForm> transactionFormList = list.stream().map(transaction -> {
|
||||||
|
System.out.println(transaction.getTransactionDate());
|
||||||
TransactionForm transactionForm = TransactionForm.convertFrom(
|
TransactionForm transactionForm = TransactionForm.convertFrom(
|
||||||
transaction,
|
transaction,
|
||||||
CategoryForm.convertFrom(categoryService.findOne(transaction.getCategoryId()))
|
CategoryForm.convertFrom(categoryService.findOne(transaction.getCategoryId()))
|
||||||
.getCategoryName(),
|
.getCategoryName(),
|
||||||
transactionService.findTotalexpense(startDate, endDate, loginUser.getUserId()),
|
transactionService.findTotalExpense(startDate, endDate, loginUser.getUserId()),
|
||||||
transactionService.findTotalIncome(startDate, endDate, loginUser.getUserId()),
|
transactionService.findTotalIncome(startDate, endDate, loginUser.getUserId()),
|
||||||
CategoryForm.convertFrom(categoryService.findOne(transaction.getCategoryId()))
|
CategoryForm.convertFrom(categoryService.findOne(transaction.getCategoryId()))
|
||||||
.getTransactionType());
|
.getTransactionType());
|
||||||
|
System.out.println("startDate = " + startDate);
|
||||||
|
System.out.println("endDate = " + endDate);
|
||||||
return transactionForm;
|
return transactionForm;
|
||||||
}).collect(Collectors.toList());
|
}).collect(Collectors.toList());
|
||||||
transactionFormMap.put(date, transactionFormList);
|
transactionFormMap.put(date, transactionFormList);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
model.addAttribute("transactionFormMap", transactionFormMap);
|
model.addAttribute("transactionFormMap", transactionFormMap);
|
||||||
|
|
||||||
return "transaction_list";
|
return "transaction_list";
|
||||||
@@ -81,32 +89,40 @@ public class TransactionController {
|
|||||||
transaction,
|
transaction,
|
||||||
CategoryForm.convertFrom(categoryService.findOne(transaction.getCategoryId()))
|
CategoryForm.convertFrom(categoryService.findOne(transaction.getCategoryId()))
|
||||||
.getCategoryName(),
|
.getCategoryName(),
|
||||||
transactionService.findTotalexpense(todayDate, todayDate, loginUser.getUserId()),
|
transactionService.findTotalExpense(todayDate, todayDate, loginUser.getUserId()),
|
||||||
transactionService.findTotalIncome(todayDate, todayDate, loginUser.getUserId()),
|
transactionService.findTotalIncome(todayDate, todayDate, loginUser.getUserId()),
|
||||||
CategoryForm.convertFrom(categoryService.findOne(transaction.getCategoryId()))
|
CategoryForm.convertFrom(categoryService.findOne(transaction.getCategoryId()))
|
||||||
.getTransactionType());
|
.getTransactionType());
|
||||||
return transactionForm;
|
return transactionForm;
|
||||||
}).collect(Collectors.toList());
|
}).collect(Collectors.toList());
|
||||||
|
|
||||||
|
model.addAttribute("today", todayDate);
|
||||||
model.addAttribute("transactionFormList", transactionFormList);
|
model.addAttribute("transactionFormList", transactionFormList);
|
||||||
|
|
||||||
return "";
|
return "transaction_detail";
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/transaction/create")
|
@GetMapping("/transaction/create")
|
||||||
public String createOneGet(@ModelAttribute TransactionForm transactionForm) {
|
public String createOneGet(@ModelAttribute TransactionForm transactionForm, @RequestParam LocalDate today, Model model) {
|
||||||
|
|
||||||
return "";
|
List<CategoryForm> categoryFormList = CategoryForm.convertFrom(categoryService.findAll());
|
||||||
|
|
||||||
|
model.addAttribute("categoryFormList", categoryFormList);
|
||||||
|
model.addAttribute("today", today);
|
||||||
|
|
||||||
|
return "transaction_create";
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/transaction/create")
|
@PostMapping("/transaction/create")
|
||||||
public String createOnePost(@ModelAttribute TransactionForm transactionForm, Model model) {
|
public String createOnePost(@ModelAttribute TransactionForm transactionForm, @RequestParam LocalDate today, Model model, HttpSession session) {
|
||||||
|
LoginModel loginUser = (LoginModel) session.getAttribute("loginUser");
|
||||||
|
transactionForm.setUserId(loginUser.getUserId());
|
||||||
|
transactionForm.setTransactionDate(today);
|
||||||
if (transactionService.createTransaction(TransactionForm.convertTo(transactionForm)) != 0) {
|
if (transactionService.createTransaction(TransactionForm.convertTo(transactionForm)) != 0) {
|
||||||
return "error";
|
return "error";
|
||||||
}
|
}
|
||||||
|
|
||||||
return "";
|
return "redirect:/transaction/detail?todayDates=" + today;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -127,4 +143,62 @@ public class TransactionController {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/transaction/delete")
|
||||||
|
public String deleteOne(@RequestParam Long transactionId, @RequestParam LocalDate today) {
|
||||||
|
|
||||||
|
transactionService.deleteTransaction(transactionId);
|
||||||
|
return "redirect:/transaction/detail?todayDates=" + today;
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/menu")
|
||||||
|
public String menu(HttpSession session, Model model, @RequestParam(required = false, defaultValue = "0") String years, @RequestParam(required = false, defaultValue = "0") String months) {
|
||||||
|
|
||||||
|
LoginModel loginUser = (LoginModel) session.getAttribute("loginUser");
|
||||||
|
|
||||||
|
LocalDate today = LocalDate.now();
|
||||||
|
|
||||||
|
int year = (years.equals("0")) ? today.getYear() : Integer.parseInt(years);
|
||||||
|
int month = (months.equals("0")) ? today.getMonthValue() : Integer.parseInt(months);
|
||||||
|
|
||||||
|
System.out.println("year : " + year + "month : " + month);
|
||||||
|
|
||||||
|
YearMonth yearMonth = YearMonth.of(year, month);
|
||||||
|
|
||||||
|
int lastDay = yearMonth.lengthOfMonth();
|
||||||
|
|
||||||
|
int firstDayOfWeek =
|
||||||
|
yearMonth.atDay(1).getDayOfWeek().getValue() % 7;
|
||||||
|
|
||||||
|
model.addAttribute("year", year);
|
||||||
|
model.addAttribute("month", month);
|
||||||
|
model.addAttribute("day", today.getDayOfMonth());
|
||||||
|
|
||||||
|
model.addAttribute("lastDay", lastDay);
|
||||||
|
model.addAttribute("firstDayOfWeek", firstDayOfWeek);
|
||||||
|
|
||||||
|
LocalDate startDate = LocalDate.now().withDayOfMonth(1);
|
||||||
|
|
||||||
|
LocalDate endDate = LocalDate.now().withDayOfMonth(LocalDate.now().lengthOfMonth());
|
||||||
|
|
||||||
|
|
||||||
|
List<Income> incomeList = transactionService.findTotalIncomeList(startDate, endDate, loginUser.getUserId());
|
||||||
|
List<Expense> expenseList = transactionService.findTotalExpenseList(startDate, endDate, loginUser.getUserId());
|
||||||
|
|
||||||
|
model.addAttribute("incomeList", incomeList);
|
||||||
|
|
||||||
|
model.addAttribute("expenseList", expenseList);
|
||||||
|
|
||||||
|
|
||||||
|
int totalIncome = transactionService.findTotalIncome(startDate, endDate, loginUser.getUserId());
|
||||||
|
|
||||||
|
int totalExpense= transactionService.findTotalExpense(startDate, endDate, loginUser.getUserId());
|
||||||
|
|
||||||
|
model.addAttribute("totalIncome", totalIncome);
|
||||||
|
model.addAttribute("totalExpense", totalExpense);
|
||||||
|
|
||||||
|
|
||||||
|
return "menu";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,55 @@
|
|||||||
|
package com.example.demo.app.presentation.controller;
|
||||||
|
|
||||||
|
import jakarta.servlet.http.HttpSession;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.ui.Model;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
|
||||||
|
import com.example.demo.app.presentation.form.UserForm;
|
||||||
|
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
|
||||||
|
@Controller
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class UserController {
|
||||||
|
|
||||||
|
@GetMapping("/user/register")
|
||||||
|
public String showRegister(Model model, HttpSession session) {
|
||||||
|
UserForm userForm = (UserForm) session.getAttribute("userForm");
|
||||||
|
|
||||||
|
if(userForm == null) {
|
||||||
|
userForm = new UserForm();
|
||||||
|
}
|
||||||
|
|
||||||
|
model.addAttribute("userForm", userForm);
|
||||||
|
return "user_register";
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/user/register/confirm")
|
||||||
|
public String confirmRegister(
|
||||||
|
@ModelAttribute UserForm userForm,
|
||||||
|
HttpSession session) {
|
||||||
|
|
||||||
|
session.setAttribute("userForm", userForm);
|
||||||
|
|
||||||
|
return "user_register_confirm";
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/user/register/complete")
|
||||||
|
public String completeRegister(HttpSession session) {
|
||||||
|
|
||||||
|
UserForm userForm =
|
||||||
|
(UserForm) session.getAttribute("userForm");
|
||||||
|
|
||||||
|
// DBへの登録処理
|
||||||
|
|
||||||
|
session.removeAttribute("userForm");
|
||||||
|
|
||||||
|
return "redirect:/login";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package com.example.demo.app.presentation.form;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class Expense {
|
||||||
|
|
||||||
|
private LocalDate date;
|
||||||
|
private Long amount;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package com.example.demo.app.presentation.form;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class Income {
|
||||||
|
|
||||||
|
private LocalDate date;
|
||||||
|
private Long amount;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package com.example.demo.app.presentation.form;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class PasswordResetForm{
|
||||||
|
private String password;
|
||||||
|
private String passwordConfirm;
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
package com.example.demo.app.presentation.form;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
import com.example.demo.app.domain.model.ProfileModel;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class ProfileForm {
|
||||||
|
private Long userId;
|
||||||
|
private String userName;
|
||||||
|
private String emailAddress;
|
||||||
|
private LocalDate brithDate;
|
||||||
|
private Integer saving;
|
||||||
|
private Integer annualIncome;
|
||||||
|
private Integer monthlyBudget;
|
||||||
|
|
||||||
|
public static ProfileForm convertForm(ProfileModel profileModel) {
|
||||||
|
return new ProfileForm(
|
||||||
|
profileModel.getUserId(),
|
||||||
|
profileModel.getUserName(),
|
||||||
|
profileModel.getEmailAddress(),
|
||||||
|
profileModel.getBrithDate(),
|
||||||
|
profileModel.getSaving(),
|
||||||
|
profileModel.getAnnualIncome(),
|
||||||
|
profileModel.getMonthlyBudget());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package com.example.demo.app.presentation.form;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class UserForm {
|
||||||
|
private String userName;
|
||||||
|
private String mailAddress;
|
||||||
|
private String password;
|
||||||
|
private Long secretQuestionId;
|
||||||
|
private String SecretAnswer;
|
||||||
|
private LocalDate birthDate;
|
||||||
|
private Integer saving;
|
||||||
|
private Integer annualIncome;
|
||||||
|
private Integer monthlyBudget;
|
||||||
|
private Long goalId;
|
||||||
|
private Long courseId;
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package com.example.demo.exception;
|
||||||
|
|
||||||
|
import org.springframework.ui.Model;
|
||||||
|
import org.springframework.web.bind.annotation.ControllerAdvice;
|
||||||
|
import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||||
|
|
||||||
|
@ControllerAdvice
|
||||||
|
public class GlobalExceptionHandler {
|
||||||
|
|
||||||
|
@ExceptionHandler(Exception.class)
|
||||||
|
public String handleException(
|
||||||
|
Exception e,
|
||||||
|
Model model) {
|
||||||
|
|
||||||
|
model.addAttribute(
|
||||||
|
"errorMessage",
|
||||||
|
"システムエラーが発生しました。"
|
||||||
|
+ "初めからやり直してください。");
|
||||||
|
|
||||||
|
return "error";
|
||||||
|
}
|
||||||
|
}
|
||||||
15
src/main/resources/static/css/menu.css
Normal file
15
src/main/resources/static/css/menu.css
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
table, th, td {border: 1px solid black; border-collapse: collapse;}
|
||||||
|
|
||||||
|
td:hover{background-color: lightblue;}
|
||||||
|
|
||||||
|
th{font-weight: bold; height: 50px;}
|
||||||
|
|
||||||
|
td{text-align: left; vertical-align: text-top; width: 200px; height: 100px; padding: 10px}
|
||||||
|
|
||||||
|
.holiday{color: red;}
|
||||||
|
|
||||||
|
#today{font-weight: bold; background-color: bisque;}
|
||||||
|
|
||||||
|
.year{font-size: 30px;}
|
||||||
|
|
||||||
|
.month{font-size: 50px; font-weight: bold;}
|
||||||
@@ -1,12 +1,15 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html xmlns:th="http://www.thymeleaf.org">
|
<html xmlns:th="http://www.thymeleaf.org">
|
||||||
<head>
|
<head>
|
||||||
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
<meta name="viewport" content="width=device-width, initial-scale=1" http-equiv="Content-Type">
|
||||||
<title>分析画面</title>
|
<title>分析画面</title>
|
||||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
<div th:replace="~{header :: header}">
|
||||||
|
</div>
|
||||||
|
|
||||||
<h2 class="text-center">支出分析</h2>
|
<h2 class="text-center">支出分析</h2>
|
||||||
|
|
||||||
<table class="table text-center">
|
<table class="table text-center">
|
||||||
@@ -78,6 +81,9 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<div th:replace="~{footer :: footer}">
|
||||||
|
</div>
|
||||||
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/js/bootstrap.bundle.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
32
src/main/resources/templates/error.html
Normal file
32
src/main/resources/templates/error.html
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html xmlns:th="http://www.thymeleaf.org">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<title>エラー</title>
|
||||||
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div th:replace="~{header :: header}">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container text-center mt-5">
|
||||||
|
|
||||||
|
<h2 class="text-danger">
|
||||||
|
エラーが発生しました
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<p th:text="${errorMessage}"></p>
|
||||||
|
|
||||||
|
<a class="btn btn-primary" th:href="@{/login}">
|
||||||
|
ログイン画面へ
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
42
src/main/resources/templates/footer.html
Normal file
42
src/main/resources/templates/footer.html
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html xmlns:th="http://www.thymeleaf.org">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<title>フッター</title>
|
||||||
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<footer th:fragment="footer" class="fixed-bottom border-top py-2" style="background-color:#E3F2FD;">
|
||||||
|
|
||||||
|
<nav data-bs-theme="light">
|
||||||
|
<div class="card-footer text-center">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col border-end">
|
||||||
|
<button type="button" class="btn btn-link text-black text-decoration-none">
|
||||||
|
<a th:href="@{/transaction/create}">入力</a>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="col border-end">
|
||||||
|
<button type="button" class="btn btn-link text-black text-decoration-none">
|
||||||
|
<a th:href="@{/transaction/list}">一覧</a>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="col border-end">
|
||||||
|
<button type="button" class="btn btn-link text-black text-decoration-none">
|
||||||
|
<a th:href="@{/analysis}">分析</a>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="col border-end">
|
||||||
|
<button type="button" class="btn btn-link text-black text-decoration-none">
|
||||||
|
<a th:href="@{/goal}">目標</a>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
</footer>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -9,18 +9,15 @@
|
|||||||
<h1>目標編集</h1>
|
<h1>目標編集</h1>
|
||||||
|
|
||||||
<form th:action="@{/goal/update}" th:object="${goalForm}" method="post">
|
<form th:action="@{/goal/update}" th:object="${goalForm}" method="post">
|
||||||
|
|
||||||
<input type="hidden" th:field="*{goalId}">
|
<input type="hidden" th:field="*{goalId}">
|
||||||
|
|
||||||
<!--
|
|
||||||
<div>
|
<div>
|
||||||
<label>目標名</label>
|
<label>目標名</label>
|
||||||
<input type="text" th:field="*{goalTitle}">
|
<input type="text" th:field="*{goalTitle}">
|
||||||
</div>
|
</div>
|
||||||
-->
|
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label>目標補足説明</label>
|
<label>目標説明</label>
|
||||||
<textarea th:field="*{goalSubtitle}"></textarea>
|
<textarea th:field="*{goalSubtitle}"></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -33,8 +30,6 @@
|
|||||||
<label>目標達成期限</label>
|
<label>目標達成期限</label>
|
||||||
<input type="date" th:field="*{deadline}">
|
<input type="date" th:field="*{deadline}">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<button type="submit">更新する</button>
|
<button type="submit">更新する</button>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -9,16 +9,14 @@
|
|||||||
<h1>目標詳細</h1>
|
<h1>目標詳細</h1>
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<!--
|
|
||||||
<tr>
|
<tr>
|
||||||
<th>目標名</th>
|
<th>目標名</th>
|
||||||
<td th:text="${goalForm.goalTitle}"></td>
|
<td th:text="${goalForm.goalTitle}"></td>
|
||||||
</tr>
|
</tr>
|
||||||
-->
|
|
||||||
|
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<th>目標補足説明</th>
|
<th>目標説明</th>
|
||||||
<td th:text="${goalForm.goalSubtitle}"></td>
|
<td th:text="${goalForm.goalSubtitle}"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -31,7 +29,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<a th:href="@{/goal/{goalId}/edit(goalId=${goalForm.goalId})}">編集する</a>
|
<a th:href="@{/goal/edit}">編集する</a>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
29
src/main/resources/templates/header.html
Normal file
29
src/main/resources/templates/header.html
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html xmlns:th="http://www.thymeleaf.org">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<title>ヘッダー</title>
|
||||||
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<header th:fragment="header">
|
||||||
|
|
||||||
|
<nav class="navbar" style="background-color: #e3f2fd;" data-bs-theme="light">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<a th:href="@{/menu}" class="navbar-brand fw-bold">Monegement</a>
|
||||||
|
<div class="d-flex gap-2">
|
||||||
|
<a class="btn btn-outline-primary btn-sm" th:href="@{/course}">
|
||||||
|
コース
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-outline-secondary btn-sm" th:href="@{/profile}">
|
||||||
|
プロフィール
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
</header>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -13,11 +13,11 @@
|
|||||||
<div th:if="${errorMessage}" th:text="${errorMessage}"></div>
|
<div th:if="${errorMessage}" th:text="${errorMessage}"></div>
|
||||||
<form th:action="@{/login}" th:object="${loginForm}" method="post">
|
<form th:action="@{/login}" th:object="${loginForm}" method="post">
|
||||||
<div>
|
<div>
|
||||||
<label for="emailAddress">メールアドレス</label>
|
<label for="mailAddress">メールアドレス</label>
|
||||||
|
|
||||||
<input type="email"
|
<input type="email"
|
||||||
id="emailAddress"
|
id="mailAddress"
|
||||||
th:field="{emailAddress}"
|
th:field="*{mailAddress}"
|
||||||
required>
|
required>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
<input type="password"
|
<input type="password"
|
||||||
id="password"
|
id="password"
|
||||||
th:field="{password}"
|
th:field="*{password}"
|
||||||
required>
|
required>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -36,11 +36,11 @@
|
|||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<a href="@{user/register}">新規会員登録</a>
|
<a th:href="@{user/register}">新規会員登録</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<a href="@{password/authentication}">パスワードを忘れた方</a>
|
<a th:href="@{/authentication}">パスワードを忘れた方</a>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
72
src/main/resources/templates/menu.html
Normal file
72
src/main/resources/templates/menu.html
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html xmlns:th="http://www.thymeleaf.org">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Calendar</title>
|
||||||
|
<link rel="stylesheet" th:href="@{/css/menu.css}">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<span class="year" th:text="|${year}年|"></span>
|
||||||
|
<span class="month" th:text="|${month}月|"></span>
|
||||||
|
|
||||||
|
<table id="calendar">
|
||||||
|
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th class="holiday">日</th>
|
||||||
|
<th>月</th>
|
||||||
|
<th>火</th>
|
||||||
|
<th>水</th>
|
||||||
|
<th>木</th>
|
||||||
|
<th>金</th>
|
||||||
|
<th>土</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
|
||||||
|
<tr th:each="week : ${#numbers.sequence(0, 5)}">
|
||||||
|
|
||||||
|
<td th:each="weekDay : ${#numbers.sequence(0, 6)}">
|
||||||
|
|
||||||
|
<div th:if="${week * 7 + weekDay - firstDayOfWeek + 1 >= 1 and week * 7 + weekDay - firstDayOfWeek + 1 <= lastDay}">
|
||||||
|
|
||||||
|
<div class="date" th:text="${week * 7 + weekDay - firstDayOfWeek + 1}">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div th:each="income : ${incomeList}"
|
||||||
|
th:if="${income.date.dayOfMonth == week * 7 + weekDay - firstDayOfWeek + 1}"
|
||||||
|
class="income"
|
||||||
|
th:text="|収入 +${income.amount}円|"
|
||||||
|
style="color: blue;">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div th:each="expense : ${expenseList}"
|
||||||
|
th:if="${expense.date.dayOfMonth == week * 7 + weekDay - firstDayOfWeek + 1}"
|
||||||
|
class="expense"
|
||||||
|
th:text="|支出 -${expense.amount}円|"
|
||||||
|
style="color: red;">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<h2>
|
||||||
|
<span th:text="|収入:${totalIncome}|"></span>
|
||||||
|
<span th:text="|支出:${totalExpense}|"></span>
|
||||||
|
</h2>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
42
src/main/resources/templates/password_reset.html
Normal file
42
src/main/resources/templates/password_reset.html
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="ja"xmlns:th="http://www.thymeleaf.org">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>パスワード再設定</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header></header>
|
||||||
|
|
||||||
|
<main>
|
||||||
|
<h1>パスワード再設定</h1>
|
||||||
|
|
||||||
|
<form th:action="@{/password_reset}" th:object="${passwordResetForm}" method="post">
|
||||||
|
<div>
|
||||||
|
<label for="password">新しいパスワード</label>
|
||||||
|
<input type="password"
|
||||||
|
id="password"
|
||||||
|
th:field="*{password}"
|
||||||
|
minlength="8"
|
||||||
|
maxlength="255"
|
||||||
|
required>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label for="passwordConfirm">パスワード確認</label>
|
||||||
|
<input type="password"
|
||||||
|
id="passwordConfirm"
|
||||||
|
th:field="*{passwordConfirm}"
|
||||||
|
minlength="8"
|
||||||
|
maxlength="255"
|
||||||
|
required>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button type="submit">再設定</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<div th:if="${errorMessage}">
|
||||||
|
<p th:text="${errorMessage}"></p>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
68
src/main/resources/templates/transaction_create.html
Normal file
68
src/main/resources/templates/transaction_create.html
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Insert title here</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<h1>取引登録</h1>
|
||||||
|
|
||||||
|
<form th:action="@{/transaction/create}" th:object="${transactionForm}" method="post">
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label for="transactionDate">日付</label>
|
||||||
|
<input type="date" id="transactionDate" th:field="*{transactionDate}">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label for="transactionType">収入・支出</label>
|
||||||
|
|
||||||
|
<select id="transactionType" th:field="*{transactionType}">
|
||||||
|
|
||||||
|
<option value="">選択してください</option>
|
||||||
|
<option value="1">支出</option>
|
||||||
|
<option value="2">収入</option>
|
||||||
|
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label for="categoryId">カテゴリ</label>
|
||||||
|
|
||||||
|
<select id="categoryId" th:field="*{categoryId}">
|
||||||
|
|
||||||
|
<option value="">選択してください</option>
|
||||||
|
|
||||||
|
<option th:each="category : ${categoryFormList}" th:value="${category.categoryId}"
|
||||||
|
th:text="${category.categoryName}">
|
||||||
|
</option>
|
||||||
|
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label for="amount">金額</label>
|
||||||
|
|
||||||
|
<input type="number" id="amount" th:field="*{amount}" min="0" placeholder="金額を入力してください">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<input type="hidden" name="today" id="today" th:value="${today}">
|
||||||
|
|
||||||
|
<button type="submit">登録</button>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
38
src/main/resources/templates/transaction_detail.html
Normal file
38
src/main/resources/templates/transaction_detail.html
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html xmlns:th="http://www.thymeleaf.org">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>収支詳細</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<h1 th:text="${today}"></h1>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<ul>
|
||||||
|
<li th:each="transactionForm : ${transactionFormList}">
|
||||||
|
<p>カテゴリ名:<span th:text="${transactionForm.categoryName}"></span>
|
||||||
|
<br>金額:<span th:text="${transactionForm.amount}"></span>
|
||||||
|
</p>
|
||||||
|
<form th:action="@{/transaction/delete}" method="post">
|
||||||
|
<input type="hidden" name="today" id="today" th:value="${today}">
|
||||||
|
<input type="hidden" name="transactionId" id="transactionId" value="${transactionForm.transactionId}">
|
||||||
|
|
||||||
|
<button type="submit">削除</button>
|
||||||
|
</form>
|
||||||
|
<hr />
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<form th:action="@{/transaction/create}" method="get">
|
||||||
|
<input type="hidden" name="today" id="today" th:value="${today}">
|
||||||
|
|
||||||
|
<button type="submit">新規登録</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
29
src/main/resources/templates/transaction_list.html
Normal file
29
src/main/resources/templates/transaction_list.html
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html xmlns:th="http://www.thymeleaf.org">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>一覧</title>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div th:each="transactionForm : ${transactionFormMap}">
|
||||||
|
|
||||||
|
<a th:href="@{/transaction/detail(todayDates=${transactionForm.key})}">
|
||||||
|
<h3 th:text="${transactionForm.key}"></h3>
|
||||||
|
</a>
|
||||||
|
<ul>
|
||||||
|
<li th:each="transaction : ${transactionForm.value}">
|
||||||
|
<p>カテゴリ名:<span th:text="${transaction.categoryName}"></span>
|
||||||
|
<br>金額:<span th:text="${transaction.amount}"></span>
|
||||||
|
</p>
|
||||||
|
<hr />
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
@@ -98,28 +98,18 @@
|
|||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label for="goalId">目標</label>
|
<label for="goalId">目標</label>
|
||||||
<select id="goalId"
|
<input type="number"
|
||||||
|
id="goalId"
|
||||||
th:field="*{goalId}"
|
th:field="*{goalId}"
|
||||||
|
min="0"
|
||||||
required>
|
required>
|
||||||
<option value="">選択してください</option>
|
|
||||||
<option th:each="goal : ${goalList}"
|
|
||||||
th:value="${goal.goalId}"
|
|
||||||
th:text="${goal.goalTitle}">
|
|
||||||
</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label for="courseId">コース</label>
|
<label>コース</label>
|
||||||
<select id="courseId"
|
<input type="hidden" th:field="*{courseId}">
|
||||||
th:field="*{courseId}"
|
<span th:text="${selectedCourseName}">未選択</span>
|
||||||
required>
|
<button type="button"onclick="location.href='/select-course'">コース選択</button>
|
||||||
<option value="">選択してください</option>
|
|
||||||
<option th:each="course : ${courseList}"
|
|
||||||
th:value="${course.courseId}"
|
|
||||||
th:text="${course.courseName}">
|
|
||||||
</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
Reference in New Issue
Block a user