|
@@ -101,8 +101,8 @@ public class ProductController extends BaseController {
|
|
/**
|
|
/**
|
|
* 商品详情页
|
|
* 商品详情页
|
|
*/
|
|
*/
|
|
- @GetMapping("/product-{id}.html")
|
|
|
|
- public String detail(final Model model, @PathVariable("id") Integer productId) {
|
|
|
|
|
|
+ @GetMapping("/product-{id}-{typeId}.html")
|
|
|
|
+ public String detail(final Model model, @PathVariable("id") Integer productId, @PathVariable("typeId") Integer typeId) {
|
|
ProductDetail detail = productService.getProductDetailById(productId);
|
|
ProductDetail detail = productService.getProductDetailById(productId);
|
|
if (detail == null || detail.getValidFlag() == 0 || detail.getValidFlag() == 9) {
|
|
if (detail == null || detail.getValidFlag() == 0 || detail.getValidFlag() == 9) {
|
|
return super.errorPath();
|
|
return super.errorPath();
|
|
@@ -115,6 +115,7 @@ public class ProductController extends BaseController {
|
|
model.addAttribute("images",images);
|
|
model.addAttribute("images",images);
|
|
model.addAttribute("productId", productId);
|
|
model.addAttribute("productId", productId);
|
|
model.addAttribute("product", detail);
|
|
model.addAttribute("product", detail);
|
|
|
|
+ model.addAttribute("typeId",typeId);
|
|
return PRODUCT_DETAIL_PATH;
|
|
return PRODUCT_DETAIL_PATH;
|
|
}
|
|
}
|
|
|
|
|