update settle controller
This commit is contained in:
@@ -36,6 +36,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
.antMatchers(HttpMethod.POST, "/product/**").hasAnyAuthority("ADMIN", "SHOPKEEPER")
|
||||
.antMatchers(HttpMethod.DELETE, "/product/**").hasAnyAuthority("ADMIN", "SHOPKEEPER")
|
||||
.antMatchers("/cart").hasAnyAuthority("CUSTOMER", "ADMIN")
|
||||
.antMatchers("/settle/**").hasAnyAuthority("ADMIN", "CUSTOMER", "SHOPKEEPER")
|
||||
.antMatchers("/home/**").hasAnyAuthority("ADMIN", "SHOPKEEPER", "CUSTOMER")
|
||||
.antMatchers("/admin/**").hasAuthority("ADMIN")
|
||||
.and().formLogin().loginPage("/login").usernameParameter("username").passwordParameter("password");
|
||||
|
||||
@@ -30,7 +30,7 @@ public class SettleController {
|
||||
for (var cartID : shoppingCartItems) {
|
||||
System.out.println(cartID);
|
||||
}
|
||||
|
||||
model.addAttribute("shippingAddrList", user.getShippingAddrAddrList());
|
||||
return "settle.html";
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>结算</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<ul>
|
||||
<!--/*@thymesVar id="shippingAddrList" type="java.util.Set<edu.neu.neumall.entity.ShippingAddr>"*/-->
|
||||
<li th:each="addr:${shippingAddrList}">
|
||||
<span th:text="${addr.getReceiverProvince()}"></span>
|
||||
<span th:text="${addr.getReceiverCity()}"></span>
|
||||
<span th:text="${addr.getReceiverDistrict()}"></span>
|
||||
<span th:text="${addr.getReceiverPhone()}"></span>
|
||||
<span th:text="${addr.getReceiverName()}"></span>
|
||||
</li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user