mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-25 05:09:19 +08:00
refactor: 迁移类目模块到商品模块下
This commit is contained in:
+2
-2
@@ -9,8 +9,8 @@ import top.xyquan.ecomdmbbackend.modules.ec.shop.monthlytarget.mapper.ShopMonthl
|
|||||||
import top.xyquan.ecomdmbbackend.modules.ec.shop.monthlytarget.model.po.ShopMonthlyTargetPO;
|
import top.xyquan.ecomdmbbackend.modules.ec.shop.monthlytarget.model.po.ShopMonthlyTargetPO;
|
||||||
import top.xyquan.ecomdmbbackend.modules.bi.overview.model.vo.CompanyOverviewVO;
|
import top.xyquan.ecomdmbbackend.modules.bi.overview.model.vo.CompanyOverviewVO;
|
||||||
import top.xyquan.ecomdmbbackend.modules.bi.overview.service.CompanyOverviewService;
|
import top.xyquan.ecomdmbbackend.modules.bi.overview.service.CompanyOverviewService;
|
||||||
import top.xyquan.ecomdmbbackend.modules.ec.category.model.po.CategoryPO;
|
import top.xyquan.ecomdmbbackend.modules.ec.product.category.model.po.CategoryPO;
|
||||||
import top.xyquan.ecomdmbbackend.modules.ec.category.service.CategoryService;
|
import top.xyquan.ecomdmbbackend.modules.ec.product.category.service.CategoryService;
|
||||||
import top.xyquan.ecomdmbbackend.modules.ec.product.mapper.ProductMapper;
|
import top.xyquan.ecomdmbbackend.modules.ec.product.mapper.ProductMapper;
|
||||||
import top.xyquan.ecomdmbbackend.modules.ec.product.model.po.ProductPO;
|
import top.xyquan.ecomdmbbackend.modules.ec.product.model.po.ProductPO;
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -3,14 +3,14 @@ package top.xyquan.ecomdmbbackend.modules.bi.workbench.service.impl;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import top.xyquan.ecomdmbbackend.common.exception.BusinessException;
|
import top.xyquan.ecomdmbbackend.common.exception.BusinessException;
|
||||||
import top.xyquan.ecomdmbbackend.modules.ec.category.model.po.CategoryPO;
|
|
||||||
import top.xyquan.ecomdmbbackend.modules.ec.category.service.CategoryService;
|
|
||||||
import top.xyquan.ecomdmbbackend.modules.bi.overview.model.agg.OverviewAggRows;
|
import top.xyquan.ecomdmbbackend.modules.bi.overview.model.agg.OverviewAggRows;
|
||||||
import top.xyquan.ecomdmbbackend.modules.ec.order.status.support.OrderStatusStatResolver;
|
import top.xyquan.ecomdmbbackend.modules.ec.order.status.support.OrderStatusStatResolver;
|
||||||
import top.xyquan.ecomdmbbackend.modules.ec.order.status.support.OrderStatusStatSets;
|
import top.xyquan.ecomdmbbackend.modules.ec.order.status.support.OrderStatusStatSets;
|
||||||
import top.xyquan.ecomdmbbackend.modules.bi.overview.model.vo.CompanyOverviewVO;
|
import top.xyquan.ecomdmbbackend.modules.bi.overview.model.vo.CompanyOverviewVO;
|
||||||
import top.xyquan.ecomdmbbackend.modules.bi.overview.service.CompanyOverviewService;
|
import top.xyquan.ecomdmbbackend.modules.bi.overview.service.CompanyOverviewService;
|
||||||
import top.xyquan.ecomdmbbackend.modules.ec.platform.model.enums.PlatformCode;
|
import top.xyquan.ecomdmbbackend.modules.ec.platform.model.enums.PlatformCode;
|
||||||
|
import top.xyquan.ecomdmbbackend.modules.ec.product.category.model.po.CategoryPO;
|
||||||
|
import top.xyquan.ecomdmbbackend.modules.ec.product.category.service.CategoryService;
|
||||||
import top.xyquan.ecomdmbbackend.modules.ec.product.mapper.ProductMapper;
|
import top.xyquan.ecomdmbbackend.modules.ec.product.mapper.ProductMapper;
|
||||||
import top.xyquan.ecomdmbbackend.modules.ec.product.model.po.ProductPO;
|
import top.xyquan.ecomdmbbackend.modules.ec.product.model.po.ProductPO;
|
||||||
import top.xyquan.ecomdmbbackend.modules.ec.shop.model.po.ShopPO;
|
import top.xyquan.ecomdmbbackend.modules.ec.shop.model.po.ShopPO;
|
||||||
|
|||||||
+2
-2
@@ -14,8 +14,8 @@ import top.xyquan.ecomdmbbackend.modules.channel.pdd.order.sync.model.PddOrderSy
|
|||||||
import top.xyquan.ecomdmbbackend.modules.channel.pdd.order.sync.service.PddOrderSyncContextResolver;
|
import top.xyquan.ecomdmbbackend.modules.channel.pdd.order.sync.service.PddOrderSyncContextResolver;
|
||||||
import top.xyquan.ecomdmbbackend.modules.channel.pdd.goods.service.PddGoodsService;
|
import top.xyquan.ecomdmbbackend.modules.channel.pdd.goods.service.PddGoodsService;
|
||||||
import top.xyquan.ecomdmbbackend.modules.channel.pdd.pop.goods.PddGoodsPopApiClient;
|
import top.xyquan.ecomdmbbackend.modules.channel.pdd.pop.goods.PddGoodsPopApiClient;
|
||||||
import top.xyquan.ecomdmbbackend.modules.ec.category.model.po.CategoryPO;
|
import top.xyquan.ecomdmbbackend.modules.ec.product.category.model.po.CategoryPO;
|
||||||
import top.xyquan.ecomdmbbackend.modules.ec.category.service.CategoryService;
|
import top.xyquan.ecomdmbbackend.modules.ec.product.category.service.CategoryService;
|
||||||
import top.xyquan.ecomdmbbackend.modules.ec.product.model.po.ProductPO;
|
import top.xyquan.ecomdmbbackend.modules.ec.product.model.po.ProductPO;
|
||||||
import top.xyquan.ecomdmbbackend.modules.ec.product.model.po.ProductSkuPO;
|
import top.xyquan.ecomdmbbackend.modules.ec.product.model.po.ProductSkuPO;
|
||||||
import top.xyquan.ecomdmbbackend.modules.ec.product.service.ProductService;
|
import top.xyquan.ecomdmbbackend.modules.ec.product.service.ProductService;
|
||||||
|
|||||||
+13
-13
@@ -1,4 +1,4 @@
|
|||||||
package top.xyquan.ecomdmbbackend.modules.ec.category.controller;
|
package top.xyquan.ecomdmbbackend.modules.ec.product.category.controller;
|
||||||
|
|
||||||
import jakarta.validation.Valid;
|
import jakarta.validation.Valid;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
@@ -6,11 +6,11 @@ import top.xyquan.ecomdmbbackend.common.annotation.RequirePermission;
|
|||||||
import top.xyquan.ecomdmbbackend.common.model.dto.PageQueryDTO;
|
import top.xyquan.ecomdmbbackend.common.model.dto.PageQueryDTO;
|
||||||
import top.xyquan.ecomdmbbackend.common.model.vo.PageResultVO;
|
import top.xyquan.ecomdmbbackend.common.model.vo.PageResultVO;
|
||||||
import top.xyquan.ecomdmbbackend.common.response.ApiResponse;
|
import top.xyquan.ecomdmbbackend.common.response.ApiResponse;
|
||||||
import top.xyquan.ecomdmbbackend.modules.ec.category.model.dto.CategoryFilterDTO;
|
import top.xyquan.ecomdmbbackend.modules.ec.product.category.model.dto.CategoryFilterDTO;
|
||||||
import top.xyquan.ecomdmbbackend.modules.ec.category.model.dto.CreateCategoryDTO;
|
import top.xyquan.ecomdmbbackend.modules.ec.product.category.model.dto.CreateCategoryDTO;
|
||||||
import top.xyquan.ecomdmbbackend.modules.ec.category.model.dto.UpdateCategoryDTO;
|
import top.xyquan.ecomdmbbackend.modules.ec.product.category.model.dto.UpdateCategoryDTO;
|
||||||
import top.xyquan.ecomdmbbackend.modules.ec.category.model.vo.CategoryVO;
|
import top.xyquan.ecomdmbbackend.modules.ec.product.category.model.vo.CategoryVO;
|
||||||
import top.xyquan.ecomdmbbackend.modules.ec.category.service.CategoryService;
|
import top.xyquan.ecomdmbbackend.modules.ec.product.category.service.CategoryService;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ import java.util.List;
|
|||||||
* 商品类目管理控制器
|
* 商品类目管理控制器
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/api/ec/category")
|
@RequestMapping("/api/ec/product/category")
|
||||||
public class CategoryController {
|
public class CategoryController {
|
||||||
|
|
||||||
private final CategoryService categoryService;
|
private final CategoryService categoryService;
|
||||||
@@ -28,14 +28,14 @@ public class CategoryController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@RequirePermission(value = "ec:category:manage", description = "创建类目", allowSuper = true)
|
@RequirePermission(value = "ec:product:category:manage", description = "创建类目", allowSuper = true)
|
||||||
public ApiResponse<CategoryVO> createCategory(@Valid @RequestBody CreateCategoryDTO createCategoryDTO) {
|
public ApiResponse<CategoryVO> createCategory(@Valid @RequestBody CreateCategoryDTO createCategoryDTO) {
|
||||||
CategoryVO categoryVO = categoryService.createCategory(createCategoryDTO);
|
CategoryVO categoryVO = categoryService.createCategory(createCategoryDTO);
|
||||||
return ApiResponse.success("类目创建成功", categoryVO);
|
return ApiResponse.success("类目创建成功", categoryVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PutMapping("/update/{id}")
|
@PutMapping("/update/{id}")
|
||||||
@RequirePermission(value = "ec:category:manage", description = "更新类目", allowSuper = true)
|
@RequirePermission(value = "ec:product:category:manage", description = "更新类目", allowSuper = true)
|
||||||
public ApiResponse<CategoryVO> updateCategory(@Valid @RequestBody UpdateCategoryDTO updateCategoryDTO,
|
public ApiResponse<CategoryVO> updateCategory(@Valid @RequestBody UpdateCategoryDTO updateCategoryDTO,
|
||||||
@PathVariable Long id) {
|
@PathVariable Long id) {
|
||||||
CategoryVO categoryVO = categoryService.updateCategory(updateCategoryDTO, id);
|
CategoryVO categoryVO = categoryService.updateCategory(updateCategoryDTO, id);
|
||||||
@@ -43,7 +43,7 @@ public class CategoryController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@DeleteMapping("/delete/{id}")
|
@DeleteMapping("/delete/{id}")
|
||||||
@RequirePermission(value = "ec:category:manage", description = "删除类目", allowSuper = true)
|
@RequirePermission(value = "ec:product:category:manage", description = "删除类目", allowSuper = true)
|
||||||
public ApiResponse<Void> deleteCategory(
|
public ApiResponse<Void> deleteCategory(
|
||||||
@PathVariable Long id) {
|
@PathVariable Long id) {
|
||||||
categoryService.deleteCategory(id);
|
categoryService.deleteCategory(id);
|
||||||
@@ -51,7 +51,7 @@ public class CategoryController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/list")
|
@PostMapping("/list")
|
||||||
@RequirePermission(value = "ec:category:read", description = "查询类目列表", allowSuper = true)
|
@RequirePermission(value = "ec:product:category:read", description = "查询类目列表", allowSuper = true)
|
||||||
public ApiResponse<PageResultVO<CategoryVO>> getCategoryPage(
|
public ApiResponse<PageResultVO<CategoryVO>> getCategoryPage(
|
||||||
@Valid @RequestBody PageQueryDTO<CategoryFilterDTO> pageQueryDTO) {
|
@Valid @RequestBody PageQueryDTO<CategoryFilterDTO> pageQueryDTO) {
|
||||||
PageResultVO<CategoryVO> result = categoryService.getCategoryPage(pageQueryDTO);
|
PageResultVO<CategoryVO> result = categoryService.getCategoryPage(pageQueryDTO);
|
||||||
@@ -59,14 +59,14 @@ public class CategoryController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/tree")
|
@GetMapping("/tree")
|
||||||
@RequirePermission(value = "ec:category:read", description = "查询类目树", allowSuper = true)
|
@RequirePermission(value = "ec:product:category:read", description = "查询类目树", allowSuper = true)
|
||||||
public ApiResponse<List<CategoryVO>> getCategoryTree() {
|
public ApiResponse<List<CategoryVO>> getCategoryTree() {
|
||||||
List<CategoryVO> tree = categoryService.getCategoryTree();
|
List<CategoryVO> tree = categoryService.getCategoryTree();
|
||||||
return ApiResponse.success("获取类目树成功", tree);
|
return ApiResponse.success("获取类目树成功", tree);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@RequirePermission(value = "ec:category:read", description = "查询类目列表", allowSuper = true)
|
@RequirePermission(value = "ec:product:category:read", description = "查询类目列表", allowSuper = true)
|
||||||
public ApiResponse<List<CategoryVO>> getCategoryList() {
|
public ApiResponse<List<CategoryVO>> getCategoryList() {
|
||||||
List<CategoryVO> list = categoryService.getCategoryList();
|
List<CategoryVO> list = categoryService.getCategoryList();
|
||||||
return ApiResponse.success("获取类目列表成功", list);
|
return ApiResponse.success("获取类目列表成功", list);
|
||||||
+4
-2
@@ -1,7 +1,9 @@
|
|||||||
package top.xyquan.ecomdmbbackend.modules.ec.category.mapper;
|
package top.xyquan.ecomdmbbackend.modules.ec.product.category.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import top.xyquan.ecomdmbbackend.modules.ec.category.model.po.CategoryPO;
|
|
||||||
|
import top.xyquan.ecomdmbbackend.modules.ec.product.category.model.po.CategoryPO;
|
||||||
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package top.xyquan.ecomdmbbackend.modules.ec.category.model.dto;
|
package top.xyquan.ecomdmbbackend.modules.ec.product.category.model.dto;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package top.xyquan.ecomdmbbackend.modules.ec.category.model.dto;
|
package top.xyquan.ecomdmbbackend.modules.ec.product.category.model.dto;
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotBlank;
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package top.xyquan.ecomdmbbackend.modules.ec.category.model.dto;
|
package top.xyquan.ecomdmbbackend.modules.ec.product.category.model.dto;
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotBlank;
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package top.xyquan.ecomdmbbackend.modules.ec.category.model.po;
|
package top.xyquan.ecomdmbbackend.modules.ec.product.category.model.po;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package top.xyquan.ecomdmbbackend.modules.ec.category.model.vo;
|
package top.xyquan.ecomdmbbackend.modules.ec.product.category.model.vo;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
+6
-6
@@ -1,13 +1,13 @@
|
|||||||
package top.xyquan.ecomdmbbackend.modules.ec.category.service;
|
package top.xyquan.ecomdmbbackend.modules.ec.product.category.service;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import top.xyquan.ecomdmbbackend.common.model.dto.PageQueryDTO;
|
import top.xyquan.ecomdmbbackend.common.model.dto.PageQueryDTO;
|
||||||
import top.xyquan.ecomdmbbackend.common.model.vo.PageResultVO;
|
import top.xyquan.ecomdmbbackend.common.model.vo.PageResultVO;
|
||||||
import top.xyquan.ecomdmbbackend.modules.ec.category.model.dto.CategoryFilterDTO;
|
import top.xyquan.ecomdmbbackend.modules.ec.product.category.model.dto.CategoryFilterDTO;
|
||||||
import top.xyquan.ecomdmbbackend.modules.ec.category.model.dto.CreateCategoryDTO;
|
import top.xyquan.ecomdmbbackend.modules.ec.product.category.model.dto.CreateCategoryDTO;
|
||||||
import top.xyquan.ecomdmbbackend.modules.ec.category.model.dto.UpdateCategoryDTO;
|
import top.xyquan.ecomdmbbackend.modules.ec.product.category.model.dto.UpdateCategoryDTO;
|
||||||
import top.xyquan.ecomdmbbackend.modules.ec.category.model.po.CategoryPO;
|
import top.xyquan.ecomdmbbackend.modules.ec.product.category.model.po.CategoryPO;
|
||||||
import top.xyquan.ecomdmbbackend.modules.ec.category.model.vo.CategoryVO;
|
import top.xyquan.ecomdmbbackend.modules.ec.product.category.model.vo.CategoryVO;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
+9
-8
@@ -1,6 +1,14 @@
|
|||||||
package top.xyquan.ecomdmbbackend.modules.ec.category.service.impl;
|
package top.xyquan.ecomdmbbackend.modules.ec.product.category.service.impl;
|
||||||
|
|
||||||
import top.xyquan.ecomdmbbackend.common.utils.BeanCopyUtils;
|
import top.xyquan.ecomdmbbackend.common.utils.BeanCopyUtils;
|
||||||
|
import top.xyquan.ecomdmbbackend.modules.ec.product.category.mapper.CategoryMapper;
|
||||||
|
import top.xyquan.ecomdmbbackend.modules.ec.product.category.model.dto.CategoryFilterDTO;
|
||||||
|
import top.xyquan.ecomdmbbackend.modules.ec.product.category.model.dto.CreateCategoryDTO;
|
||||||
|
import top.xyquan.ecomdmbbackend.modules.ec.product.category.model.dto.UpdateCategoryDTO;
|
||||||
|
import top.xyquan.ecomdmbbackend.modules.ec.product.category.model.po.CategoryPO;
|
||||||
|
import top.xyquan.ecomdmbbackend.modules.ec.product.category.model.vo.CategoryVO;
|
||||||
|
import top.xyquan.ecomdmbbackend.modules.ec.product.category.service.CategoryService;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
@@ -10,13 +18,6 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
import top.xyquan.ecomdmbbackend.common.exception.BusinessException;
|
import top.xyquan.ecomdmbbackend.common.exception.BusinessException;
|
||||||
import top.xyquan.ecomdmbbackend.common.model.dto.PageQueryDTO;
|
import top.xyquan.ecomdmbbackend.common.model.dto.PageQueryDTO;
|
||||||
import top.xyquan.ecomdmbbackend.common.model.vo.PageResultVO;
|
import top.xyquan.ecomdmbbackend.common.model.vo.PageResultVO;
|
||||||
import top.xyquan.ecomdmbbackend.modules.ec.category.mapper.CategoryMapper;
|
|
||||||
import top.xyquan.ecomdmbbackend.modules.ec.category.model.dto.CategoryFilterDTO;
|
|
||||||
import top.xyquan.ecomdmbbackend.modules.ec.category.model.dto.CreateCategoryDTO;
|
|
||||||
import top.xyquan.ecomdmbbackend.modules.ec.category.model.dto.UpdateCategoryDTO;
|
|
||||||
import top.xyquan.ecomdmbbackend.modules.ec.category.model.po.CategoryPO;
|
|
||||||
import top.xyquan.ecomdmbbackend.modules.ec.category.model.vo.CategoryVO;
|
|
||||||
import top.xyquan.ecomdmbbackend.modules.ec.category.service.CategoryService;
|
|
||||||
import top.xyquan.ecomdmbbackend.utils.CurrentUserContext;
|
import top.xyquan.ecomdmbbackend.utils.CurrentUserContext;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
+2
-2
@@ -11,6 +11,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
import top.xyquan.ecomdmbbackend.common.exception.BusinessException;
|
import top.xyquan.ecomdmbbackend.common.exception.BusinessException;
|
||||||
import top.xyquan.ecomdmbbackend.common.model.dto.PageQueryDTO;
|
import top.xyquan.ecomdmbbackend.common.model.dto.PageQueryDTO;
|
||||||
import top.xyquan.ecomdmbbackend.common.model.vo.PageResultVO;
|
import top.xyquan.ecomdmbbackend.common.model.vo.PageResultVO;
|
||||||
|
import top.xyquan.ecomdmbbackend.modules.ec.product.category.service.CategoryService;
|
||||||
import top.xyquan.ecomdmbbackend.modules.ec.product.mapper.ProductMapper;
|
import top.xyquan.ecomdmbbackend.modules.ec.product.mapper.ProductMapper;
|
||||||
import top.xyquan.ecomdmbbackend.modules.ec.product.model.dto.CreateProductDTO;
|
import top.xyquan.ecomdmbbackend.modules.ec.product.model.dto.CreateProductDTO;
|
||||||
import top.xyquan.ecomdmbbackend.modules.ec.product.model.dto.CreateProductResultDTO;
|
import top.xyquan.ecomdmbbackend.modules.ec.product.model.dto.CreateProductResultDTO;
|
||||||
@@ -26,7 +27,6 @@ import top.xyquan.ecomdmbbackend.modules.ec.product.model.vo.ProductSkuVO;
|
|||||||
import top.xyquan.ecomdmbbackend.modules.ec.order.service.OrderService;
|
import top.xyquan.ecomdmbbackend.modules.ec.order.service.OrderService;
|
||||||
import top.xyquan.ecomdmbbackend.modules.ec.product.service.ProductService;
|
import top.xyquan.ecomdmbbackend.modules.ec.product.service.ProductService;
|
||||||
import top.xyquan.ecomdmbbackend.modules.ec.product.service.ProductSkuService;
|
import top.xyquan.ecomdmbbackend.modules.ec.product.service.ProductSkuService;
|
||||||
import top.xyquan.ecomdmbbackend.modules.ec.category.service.CategoryService;
|
|
||||||
import top.xyquan.ecomdmbbackend.modules.sys.file.mapper.SysFileMapper;
|
import top.xyquan.ecomdmbbackend.modules.sys.file.mapper.SysFileMapper;
|
||||||
import top.xyquan.ecomdmbbackend.modules.sys.file.model.po.SysFilePO;
|
import top.xyquan.ecomdmbbackend.modules.sys.file.model.po.SysFilePO;
|
||||||
import top.xyquan.ecomdmbbackend.utils.CurrentUserContext;
|
import top.xyquan.ecomdmbbackend.utils.CurrentUserContext;
|
||||||
@@ -580,7 +580,7 @@ public class ProductServiceImpl extends ServiceImpl<ProductMapper, ProductPO> im
|
|||||||
|
|
||||||
// 查询类目名称
|
// 查询类目名称
|
||||||
if (product.getCategoryId() != null) {
|
if (product.getCategoryId() != null) {
|
||||||
top.xyquan.ecomdmbbackend.modules.ec.category.model.po.CategoryPO category =
|
top.xyquan.ecomdmbbackend.modules.ec.product.category.model.po.CategoryPO category =
|
||||||
categoryService.getById(product.getCategoryId());
|
categoryService.getById(product.getCategoryId());
|
||||||
if (category != null) {
|
if (category != null) {
|
||||||
productVO.setCategoryName(category.getName());
|
productVO.setCategoryName(category.getName());
|
||||||
|
|||||||
@@ -12,40 +12,40 @@ import { requestClient } from '#/api/request';
|
|||||||
* 创建类目
|
* 创建类目
|
||||||
*/
|
*/
|
||||||
export async function createCategoryApi(data: CategoryDTO.Create) {
|
export async function createCategoryApi(data: CategoryDTO.Create) {
|
||||||
return requestClient.post<CategoryVO.Info>('/ec/category/create', data);
|
return requestClient.post<CategoryVO.Info>('/ec/product/category/create', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新类目
|
* 更新类目
|
||||||
*/
|
*/
|
||||||
export async function updateCategoryApi(id: number, data: CategoryDTO.Update) {
|
export async function updateCategoryApi(id: number, data: CategoryDTO.Update) {
|
||||||
return requestClient.put<CategoryVO.Info>(`/ec/category/update/${id}`, data);
|
return requestClient.put<CategoryVO.Info>(`/ec/product/category/update/${id}`, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除类目
|
* 删除类目
|
||||||
*/
|
*/
|
||||||
export async function deleteCategoryApi(id: number) {
|
export async function deleteCategoryApi(id: number) {
|
||||||
return requestClient.delete(`/ec/category/delete/${id}`);
|
return requestClient.delete(`/ec/product/category/delete/${id}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页获取类目列表
|
* 分页获取类目列表
|
||||||
*/
|
*/
|
||||||
export async function getCategoryPageApi(params: PageQueryDTO<CategoryDTO.Filters>) {
|
export async function getCategoryPageApi(params: PageQueryDTO<CategoryDTO.Filters>) {
|
||||||
return requestClient.post<PageResultVO<CategoryVO.Info>>('/ec/category/list', params);
|
return requestClient.post<PageResultVO<CategoryVO.Info>>('/ec/product/category/list', params);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取类目树形结构
|
* 获取类目树形结构
|
||||||
*/
|
*/
|
||||||
export async function getCategoryTreeApi() {
|
export async function getCategoryTreeApi() {
|
||||||
return requestClient.get<CategoryVO.Info[]>('/ec/category/tree');
|
return requestClient.get<CategoryVO.Info[]>('/ec/product/category/tree');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取类目扁平列表
|
* 获取类目扁平列表
|
||||||
*/
|
*/
|
||||||
export async function getCategoryListApi() {
|
export async function getCategoryListApi() {
|
||||||
return requestClient.get<CategoryVO.Info[]>('/ec/category/list');
|
return requestClient.get<CategoryVO.Info[]>('/ec/product/category/list');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user