|
@@ -5,8 +5,10 @@ import com.fjhx.xmhjc.entity.about.vo.AboutUsHonorVo;
|
|
import com.fjhx.xmhjc.entity.product.dto.ProductInfoSelectDto;
|
|
import com.fjhx.xmhjc.entity.product.dto.ProductInfoSelectDto;
|
|
import com.fjhx.xmhjc.entity.product.vo.ProductCategoryVo;
|
|
import com.fjhx.xmhjc.entity.product.vo.ProductCategoryVo;
|
|
import com.fjhx.xmhjc.entity.product.vo.ProductInfoVo;
|
|
import com.fjhx.xmhjc.entity.product.vo.ProductInfoVo;
|
|
|
|
+import com.fjhx.xmhjc.entity.product.vo.ProductSubCategoryVo;
|
|
import com.fjhx.xmhjc.service.product.ProductCategoryService;
|
|
import com.fjhx.xmhjc.service.product.ProductCategoryService;
|
|
import com.fjhx.xmhjc.service.product.ProductInfoService;
|
|
import com.fjhx.xmhjc.service.product.ProductInfoService;
|
|
|
|
+import com.fjhx.xmhjc.service.product.ProductSubCategoryService;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
@@ -18,6 +20,8 @@ public class OpenProductController {
|
|
@Resource
|
|
@Resource
|
|
private ProductCategoryService productCategoryService;
|
|
private ProductCategoryService productCategoryService;
|
|
@Resource
|
|
@Resource
|
|
|
|
+ private ProductSubCategoryService subCategoryService;
|
|
|
|
+ @Resource
|
|
private ProductInfoService productInfoService;
|
|
private ProductInfoService productInfoService;
|
|
|
|
|
|
@PostMapping("/categoryList")
|
|
@PostMapping("/categoryList")
|
|
@@ -26,9 +30,16 @@ public class OpenProductController {
|
|
return list;
|
|
return list;
|
|
}
|
|
}
|
|
|
|
|
|
- @PostMapping("/info/{categoryId}")
|
|
|
|
- public Page<ProductInfoVo> productInfoList(@PathVariable Long categoryId, @RequestBody ProductInfoSelectDto dto) {
|
|
|
|
- Page<ProductInfoVo> list = productInfoService.pageByOpen(categoryId, dto);
|
|
|
|
|
|
+
|
|
|
|
+ @PostMapping("/subCategoryList/{categoryId}")
|
|
|
|
+ public List<ProductSubCategoryVo> subCategoryList(@PathVariable Long categoryId) {
|
|
|
|
+ List<ProductSubCategoryVo> list = subCategoryService.listByOpen(categoryId);
|
|
|
|
+ return list;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @PostMapping("/info/{categoryId}/{subCategoryId}")
|
|
|
|
+ public Page<ProductInfoVo> productInfoList(@PathVariable Long categoryId, @PathVariable Long subCategoryId, @RequestBody ProductInfoSelectDto dto) {
|
|
|
|
+ Page<ProductInfoVo> list = productInfoService.pageByOpen(categoryId, subCategoryId, dto);
|
|
return list;
|
|
return list;
|
|
}
|
|
}
|
|
|
|
|