mirror of
				https://gitee.com/coder-xiaomo/flashsale
				synced 2025-11-04 22:23:14 +08:00 
			
		
		
		
	商品详情页
This commit is contained in:
		@@ -42,6 +42,17 @@ public class ItemController extends BaseController {
 | 
				
			|||||||
        return CommonReturnType.create(itemVO);
 | 
					        return CommonReturnType.create(itemVO);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // 商品详情页浏览
 | 
				
			||||||
 | 
					    @RequestMapping(value = "/get", method = {RequestMethod.GET})
 | 
				
			||||||
 | 
					    @ResponseBody
 | 
				
			||||||
 | 
					    public CommonReturnType getItem(@RequestParam(name = "id") Integer id) {
 | 
				
			||||||
 | 
					        ItemModel itemModel = itemService.getItemById(id);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        ItemVO itemVO = convertVOFromModel(itemModel);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        return CommonReturnType.create(itemVO);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private ItemVO convertVOFromModel(ItemModel itemModel) {
 | 
					    private ItemVO convertVOFromModel(ItemModel itemModel) {
 | 
				
			||||||
        if (itemModel == null) {
 | 
					        if (itemModel == null) {
 | 
				
			||||||
            return null;
 | 
					            return null;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user