package org.hso.ecommerce.controller.intern.customers; import org.hso.ecommerce.entities.shop.CustomerOrder; import org.hso.ecommerce.repos.shop.CustomerOderRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import java.util.List; @Controller @RequestMapping("intern/customerOrders") public class CustomerOrderController { @Autowired private final CustomerOderRepository customerOrderRepository = null; @GetMapping("") public String internCustomerOrder(Model model) { List orders = customerOrderRepository.getAllOrders(); model.addAttribute("orders", orders); return "intern/customerOrders/index"; } @GetMapping("/{id}") public String internCustomerOrdersId() { return "intern/customerOrders/id"; } }