|
@@ -19,17 +19,21 @@ import org.springframework.web.bind.annotation.RequestParam;
|
|
|
@Controller
|
|
|
public class ProductController extends BaseController {
|
|
|
|
|
|
- private static final String PRODUCT_LIST_PATH = "product/list";
|
|
|
- private static final String PRODUCT_DETAIL_PATH = "product/detail";
|
|
|
- private static final String PROMOTIONS_LIST_PATH = "product/promotions";
|
|
|
+ private static final String PRODUCT_LIST_PATH = "product/list";
|
|
|
+ private static final String PRODUCT_DETAIL_PATH = "product/detail";
|
|
|
+ private static final String PROMOTIONS_LIST_PATH = "product/promotions";
|
|
|
private static final String INSTRUMENT_PAGE_PATH = "product/instrument";
|
|
|
private static final String TEMPORARY_PAGE_PATH = "product/temporary";
|
|
|
private static final String INSTRUMENT_LIST_PATH = "product/instruelist";
|
|
|
private static final String QUALITY_AUTHORRIZE_PATH = "product/qualityauthorize";
|
|
|
- /** 美博会专题页 */
|
|
|
+ private static final String ACTIVITY_TOP_PATH = "activity/activityTopic";
|
|
|
+ /**
|
|
|
+ * 美博会专题页
|
|
|
+ */
|
|
|
private static final String BEAUTY_TOP_PATH = "product/beautytopic";
|
|
|
|
|
|
private ProductService productService;
|
|
|
+
|
|
|
@Autowired
|
|
|
public void setProductService(ProductService productService) {
|
|
|
this.productService = productService;
|
|
@@ -57,7 +61,7 @@ public class ProductController extends BaseController {
|
|
|
@GetMapping("/product-{id}.html")
|
|
|
public String detail(final Model model, @PathVariable("id") Integer productId) {
|
|
|
ProductDetail detail = productService.getProductDetailById(productId);
|
|
|
- if(detail== null){
|
|
|
+ if (detail == null) {
|
|
|
return super.errorPath();
|
|
|
}
|
|
|
model.addAttribute("productId", productId);
|
|
@@ -69,7 +73,7 @@ public class ProductController extends BaseController {
|
|
|
* 仪器页
|
|
|
*/
|
|
|
@GetMapping("/product/instrument.html")
|
|
|
- public String instrument(){
|
|
|
+ public String instrument() {
|
|
|
return INSTRUMENT_PAGE_PATH;
|
|
|
}
|
|
|
|
|
@@ -77,7 +81,7 @@ public class ProductController extends BaseController {
|
|
|
* 美体节活动页
|
|
|
*/
|
|
|
@GetMapping("/product/temporary.html")
|
|
|
- public String temporary(){
|
|
|
+ public String temporary() {
|
|
|
return TEMPORARY_PAGE_PATH;
|
|
|
}
|
|
|
|
|
@@ -85,7 +89,7 @@ public class ProductController extends BaseController {
|
|
|
* 仪器列表页
|
|
|
*/
|
|
|
@GetMapping("/product/instruelist.html")
|
|
|
- public String instruelist(){
|
|
|
+ public String instruelist() {
|
|
|
return INSTRUMENT_LIST_PATH;
|
|
|
}
|
|
|
|
|
@@ -106,4 +110,11 @@ public class ProductController extends BaseController {
|
|
|
return QUALITY_AUTHORRIZE_PATH;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 活动专题页
|
|
|
+ */
|
|
|
+ @GetMapping("activity/activityTopic.html")
|
|
|
+ public String activityTopic() {
|
|
|
+ return ACTIVITY_TOP_PATH;
|
|
|
+ }
|
|
|
}
|