| | |
| | | package com.ruoyi.other.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.web.controller.BaseController; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | |
| | | public R<GoodsVO> goodsDetail(@PathVariable("goodsId") Long goodsId){ |
| | | return R.ok(goodsService.goodsDetail(goodsId)); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 根据类型(1=服务商品,2=单品商品)获取商品数据 |
| | | * @param type |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/getGoodsByType") |
| | | public R<List<Goods>> getGoodsByType(@RequestParam("type") Integer type){ |
| | | List<Goods> list = goodsService.list(new LambdaQueryWrapper<Goods>().eq(Goods::getType, type).eq(Goods::getDelFlag, 0).eq(Goods::getStatus, 2)); |
| | | return R.ok(list); |
| | | } |
| | | |
| | | } |
| | | |