mirror of
https://gitee.com/coder-xiaomo/flashsale
synced 2025-01-25 19:00:25 +08:00
商品详情页
This commit is contained in:
parent
14f999e598
commit
ab0b78f278
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user