| | |
| | | import com.by4cloud.platformx.common.log.annotation.SysLog; |
| | | import com.by4cloud.platformx.business.entity.Product; |
| | | import com.by4cloud.platformx.business.service.ProductService; |
| | | import com.by4cloud.platformx.common.security.annotation.Inner; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import com.by4cloud.platformx.common.excel.annotation.ResponseExcel; |
| | | import io.swagger.v3.oas.annotations.security.SecurityRequirement; |
| | |
| | | return R.ok(productService.page(page, wrapper)); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param product 产品信息 |
| | | * @return |
| | | */ |
| | | @Operation(summary = "分页查询" , description = "分页查询" ) |
| | | @GetMapping("/list" ) |
| | | @PreAuthorize("@pms.hasPermission('business_product_view')" ) |
| | | @Inner(value = false) |
| | | public R getProductList(@ParameterObject Product product) { |
| | | LambdaQueryWrapper<Product> wrapper = Wrappers.lambdaQuery(); |
| | | return R.ok(productService.list(wrapper)); |
| | | } |
| | | |
| | | /** |
| | | * 层级查询 |
| | | * @param product 商品表 |
| | | * @return |
| | | */ |
| | | @Operation(summary = "层级查询" , description = "层级查询" ) |
| | | @GetMapping("/treeList" ) |
| | | //@PreAuthorize("@pms.hasPermission('business_product_view')" ) |
| | | @Inner(value = false) |
| | | public R getNewsCategoryTree(@ParameterObject Product product) { |
| | | return R.ok(productService.treeList(product.getParentId(), product.getProductName())); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 通过id查询产品信息 |