商品列表 V2
This commit is contained in:
@@ -2,6 +2,7 @@ package cn.ysk.cashier.controller.product;
|
||||
|
||||
import cn.ysk.cashier.annotation.AnonymousAccess;
|
||||
import cn.ysk.cashier.annotation.Log;
|
||||
import cn.ysk.cashier.dto.product.TbProductQueryV2Criteria;
|
||||
import cn.ysk.cashier.dto.product.TbProductSortCriteria;
|
||||
import cn.ysk.cashier.vo.TbProductVo;
|
||||
import cn.ysk.cashier.service.product.TbProductService;
|
||||
@@ -33,7 +34,11 @@ public class TbProductController {
|
||||
return new ResponseEntity<>(tbProductService.queryAll(criteria, false),HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/list/v2")
|
||||
@ApiOperation("查询商品列表 新")
|
||||
public ResponseEntity<Object> queryTbProductV2(TbProductQueryV2Criteria criteria){
|
||||
return new ResponseEntity<>(tbProductService.queryAllV2(criteria),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
@ApiOperation("查询/productForAdmin")
|
||||
@@ -41,26 +46,29 @@ public class TbProductController {
|
||||
return new ResponseEntity<>(tbProductService.queryAll(criteria, true),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/isHot")
|
||||
public ResponseEntity<Object> updateIsHot(@RequestParam Integer isHot, @RequestParam Integer id){
|
||||
tbProductService.updateIsHot(id,isHot);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
@GetMapping("/{product}")
|
||||
@ApiOperation("查询/product")
|
||||
@ApiOperation("查询商品详情")
|
||||
public Object queryTbProductInfo(@PathVariable("product") Integer product)throws Exception{
|
||||
return tbProductService.findByProductId(product);
|
||||
}
|
||||
|
||||
@GetMapping ("/productList")
|
||||
@ApiOperation("查询/product")
|
||||
@ApiOperation("根据集合查询商品")
|
||||
public Object queryTbProductInfo(@RequestParam List<String> productList){
|
||||
return tbProductService.findByProductList(productList);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@GetMapping("/isHot")
|
||||
@ApiOperation("设为招牌菜")
|
||||
public ResponseEntity<Object> updateIsHot(@RequestParam Integer isHot, @RequestParam Integer id){
|
||||
tbProductService.updateIsHot(id,isHot);
|
||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/upProSort")
|
||||
@ApiOperation("修改商品排序")
|
||||
public ResponseEntity<Object> upProSort(@RequestBody TbProductSortCriteria param){
|
||||
|
||||
Reference in New Issue
Block a user