mirror of
https://gitee.com/coder-xiaomo/flashsale
synced 2025-01-10 11:48:14 +08:00
商品详情页
This commit is contained in:
parent
14f999e598
commit
ab0b78f278
@ -42,6 +42,17 @@ public class ItemController extends BaseController {
|
||||
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) {
|
||||
if (itemModel == null) {
|
||||
return null;
|
||||
|
Loading…
Reference in New Issue
Block a user