feat: 所有接口路径加api前缀

This commit is contained in:
2026-08-06 10:55:01 +08:00
parent 1066f909ab
commit 7406c0eca2
50 changed files with 50 additions and 51 deletions
@@ -45,8 +45,8 @@ public class SecurityConfig {
.csrf(AbstractHttpConfigurer::disable)
.sessionManagement(session -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS))
.authorizeHttpRequests(auth -> auth
.requestMatchers("/auth/login", "/auth/register", "/auth/refresh").permitAll()
.requestMatchers("/ec/pdd/auth/callback").permitAll()
.requestMatchers("/api/auth/login", "/api/auth/register", "/api/auth/refresh").permitAll()
.requestMatchers("/api/ec/pdd/auth/callback").permitAll()
.requestMatchers("/uploads/**").permitAll() // 允许直接访问上传的文件
.requestMatchers("/doc.html", "/webjars/**", "/v3/api-docs/**", "/swagger-resources/**",
"/swagger-ui/**", "/swagger-ui.html")
@@ -20,7 +20,7 @@ import top.xyquan.ecomdmbbackend.modules.ecom.brushorder.service.BrushOrderServi
*/
@Tag(name = "电商-刷单记录管理", description = "刷单记录的增删改查接口")
@RestController
@RequestMapping("/ec/brush-order")
@RequestMapping("/api/ec/brush-order")
public class BrushOrderController {
private final BrushOrderService brushOrderService;
@@ -22,7 +22,7 @@ import java.util.List;
*/
@Tag(name = "电商-商品类目管理", description = "商品类目的增删改查接口")
@RestController
@RequestMapping("/ec/category")
@RequestMapping("/api/ec/category")
public class CategoryController {
private final CategoryService categoryService;
@@ -20,7 +20,7 @@ import top.xyquan.ecomdmbbackend.modules.ecom.importmapping.service.ImportMappin
*/
@Tag(name = "电商-导入映射模板管理", description = "导入映射模板的增删改查接口")
@RestController
@RequestMapping("/ec/import-mapping")
@RequestMapping("/api/ec/import-mapping")
public class ImportMappingController {
private final ImportMappingService importMappingService;
@@ -18,7 +18,7 @@ import top.xyquan.ecomdmbbackend.modules.ecom.importtask.service.ImportTaskServi
*/
@Tag(name = "电商-导入任务管理", description = "导入任务的创建和查询接口")
@RestController
@RequestMapping("/ec/import-task")
@RequestMapping("/api/ec/import-task")
public class ImportTaskController {
private final ImportTaskService importTaskService;
@@ -17,7 +17,7 @@ import top.xyquan.ecomdmbbackend.utils.CurrentUserContext;
*/
@Tag(name = "电商-导入任务SSE", description = "导入任务实时进度推送接口")
@RestController
@RequestMapping("/ec/import-task/sse")
@RequestMapping("/api/ec/import-task/sse")
public class ImportTaskSseController {
private final SseNotificationService sseNotificationService;
@@ -29,7 +29,7 @@ import java.util.List;
*/
@Tag(name = "电商-订单管理", description = "订单的增删改查接口")
@RestController
@RequestMapping("/ec/order")
@RequestMapping("/api/ec/order")
public class OrderController {
private final OrderService orderService;
@@ -15,7 +15,7 @@ import top.xyquan.ecomdmbbackend.modules.ecom.overview.service.CompanyOverviewSe
*/
@Tag(name = "电商-全店铺概览", description = "全店铺概览统计接口")
@RestController
@RequestMapping("/ec/store")
@RequestMapping("/api/ec/store")
public class CompanyOverviewController {
private final CompanyOverviewService companyOverviewService;
@@ -20,7 +20,7 @@ import top.xyquan.ecomdmbbackend.modules.ecom.overview.util.ExportFilenameUtils;
*/
@Tag(name = "电商-全店概览导出", description = "全店概览:按店铺 / 按品类 / 按平台汇总 Excel 导出")
@RestController
@RequestMapping("/ec/store-overview/export")
@RequestMapping("/api/ec/store-overview/export")
public class ExportController {
private final ExportService exportService;
@@ -19,7 +19,7 @@ import top.xyquan.ecomdmbbackend.modules.ecom.pdd.auth.service.PddAuthService;
*/
@Tag(name = "拼多多-授权", description = "拼多多店铺 OAuth 授权跳转与回调")
@RestController
@RequestMapping("/ec/pdd/auth")
@RequestMapping("/api/ec/pdd/auth")
public class PddAuthController {
private final PddAuthService pddAuthService;
@@ -17,7 +17,7 @@ import top.xyquan.ecomdmbbackend.modules.ecom.pdd.goods.service.PddGoodsService;
@Tag(name = "拼多多-商品管理", description = "拼多多商品的增删改查接口")
@RestController
@RequestMapping("/ec/pdd/goods")
@RequestMapping("/api/ec/pdd/goods")
public class PddGoodsController {
private final PddGoodsService pddGoodsService;
@@ -17,7 +17,7 @@ import top.xyquan.ecomdmbbackend.modules.ecom.pdd.order.service.PddOrderService;
@Tag(name = "拼多多-订单管理", description = "拼多多订单的增删改查接口")
@RestController
@RequestMapping("/ec/pdd/order")
@RequestMapping("/api/ec/pdd/order")
public class PddOrderController {
private final PddOrderService pddOrderService;
@@ -17,7 +17,7 @@ import top.xyquan.ecomdmbbackend.modules.ecom.pdd.shop.service.PddShopService;
@Tag(name = "拼多多-店铺管理", description = "拼多多店铺信息的增删改查接口")
@RestController
@RequestMapping("/ec/pdd/shop")
@RequestMapping("/api/ec/pdd/shop")
public class PddShopController {
private final PddShopService pddShopService;
@@ -18,7 +18,7 @@ import java.util.List;
*/
@Tag(name = "电商-平台字典", description = "电商平台静态字典")
@RestController
@RequestMapping("/ec/platform")
@RequestMapping("/api/ec/platform")
public class PlatformDictController {
@Operation(summary = "获取平台列表", description = "返回全部预置电商平台(code/label/sortOrder)")
@@ -22,7 +22,7 @@ import top.xyquan.ecomdmbbackend.modules.ecom.product.service.ProductService;
*/
@Tag(name = "电商-商品管理", description = "商品的增删改查接口")
@RestController
@RequestMapping("/ec/product")
@RequestMapping("/api/ec/product")
public class ProductController {
private final ProductService productService;
@@ -32,7 +32,7 @@ import top.xyquan.ecomdmbbackend.modules.ecom.product.service.ProductSkuService.
*/
@Tag(name = "电商-商品SKU管理", description = "商品SKU的增删改查接口")
@RestController
@RequestMapping("/ec/product-sku")
@RequestMapping("/api/ec/product-sku")
public class ProductSkuController {
private final ProductSkuService productSkuService;
@@ -24,7 +24,7 @@ import java.util.List;
* 推广费记录控制器
*/
@RestController
@RequestMapping("/ec/promotion-fee")
@RequestMapping("/api/ec/promotion-fee")
@RequiredArgsConstructor
@Tag(name = "电商-推广费记录管理", description = "推广费记录相关接口")
public class PromotionFeeController {
@@ -19,7 +19,7 @@ import java.util.List;
* 推广费类型控制器
*/
@RestController
@RequestMapping("/ec/promotion-fee-type")
@RequestMapping("/api/ec/promotion-fee-type")
@RequiredArgsConstructor
@Tag(name = "电商-推广费类型管理", description = "推广费类型相关接口")
public class PromotionFeeTypeController {
@@ -31,7 +31,7 @@ import top.xyquan.ecomdmbbackend.utils.FileUploadUtils;
*/
@Tag(name = "电商-店铺管理", description = "店铺的增删改查接口")
@RestController
@RequestMapping("/ec/shop")
@RequestMapping("/api/ec/shop")
public class ShopController {
private final ShopService shopService;
@@ -23,7 +23,7 @@ import top.xyquan.ecomdmbbackend.modules.ecom.shop.service.ShopService;
*/
@Tag(name = "电商-店铺导出", description = "店铺数据按商品/按品类汇总导出")
@RestController
@RequestMapping("/ec/shop/export")
@RequestMapping("/api/ec/shop/export")
public class ShopExportController {
private final ShopExportService shopExportService;
@@ -20,7 +20,7 @@ import top.xyquan.ecomdmbbackend.modules.ecom.shop.monthlytarget.service.ShopMon
*/
@Tag(name = "电商-店铺月销量目标管理", description = "店铺月销量目标的增删改查接口")
@RestController
@RequestMapping("/ec/shop-monthly-target")
@RequestMapping("/api/ec/shop-monthly-target")
public class ShopMonthlyTargetController {
private final ShopMonthlyTargetService shopMonthlyTargetService;
@@ -20,7 +20,7 @@ import top.xyquan.ecomdmbbackend.modules.ecom.workbench.service.WorkbenchService
*/
@Tag(name = "电商-工作台", description = "工作台聚合统计")
@RestController
@RequestMapping("/ec/workbench")
@RequestMapping("/api/ec/workbench")
public class WorkbenchController {
private final WorkbenchService workbenchService;
@@ -20,7 +20,7 @@ import top.xyquan.ecomdmbbackend.modules.ecom.workbench.service.WorkbenchExportS
*/
@Tag(name = "电商-工作台导出", description = "多维度经营明细:按店铺/平台/品类/商品汇总导出 Excel")
@RestController
@RequestMapping("/ec/workbench/export")
@RequestMapping("/api/ec/workbench/export")
public class WorkbenchExportController {
private final WorkbenchExportService workbenchExportService;
@@ -21,7 +21,7 @@ import top.xyquan.ecomdmbbackend.modules.open.api.constants.OpenApiScopeConstant
import java.util.List;
@RestController
@RequestMapping("/open/v1/ec")
@RequestMapping("/api/open/v1/ec")
@RequiredArgsConstructor
@Tag(name = "开放接口-元数据", description = "API Key 认证,Agent 辅助元数据")
public class OpenMetaController {
@@ -18,7 +18,7 @@ import top.xyquan.ecomdmbbackend.modules.sys.license.LicenseRequired;
import java.util.List;
@RestController
@RequestMapping("/open/v1/ec/order")
@RequestMapping("/api/open/v1/ec/order")
@RequiredArgsConstructor
@Tag(name = "开放接口-订单", description = "API Key 认证,镜像 /ec/order")
public class OpenOrderController {
@@ -17,7 +17,7 @@ import top.xyquan.ecomdmbbackend.modules.open.api.constants.OpenApiScopeConstant
import java.util.List;
@RestController
@RequestMapping("/open/v1/ec/promotion-fee")
@RequestMapping("/api/open/v1/ec/promotion-fee")
@RequiredArgsConstructor
@Tag(name = "开放接口-推广费", description = "API Key 认证,镜像 /ec/promotion-fee")
public class OpenPromotionFeeController {
@@ -22,7 +22,7 @@ import java.util.List;
*/
@Tag(name = "开放接口-API Key 管理", description = "公司拥有者管理本公司 API Key")
@RestController
@RequestMapping("/sys/open-api-key")
@RequestMapping("/api/sys/open-api-key")
@RequiredArgsConstructor
public class OpenApiKeyController {
@@ -22,7 +22,7 @@ import top.xyquan.ecomdmbbackend.modules.org.company.account.service.AccountServ
*/
@Tag(name = "组织-账户管理", description = "公司拥有者管理本公司账户")
@RestController
@RequestMapping("/company/account")
@RequestMapping("/api/company/account")
public class AccountController {
private final AccountService accountService;
@@ -20,7 +20,7 @@ import top.xyquan.ecomdmbbackend.modules.org.company.account.service.SuperAccoun
*/
@Tag(name = "超级管理员-账户管理", description = "超级管理员账户管理相关接口")
@RestController
@RequestMapping("/super/account")
@RequestMapping("/api/super/account")
public class SuperAccountController {
private final SuperAccountService superAccountService;
@@ -22,7 +22,7 @@ import top.xyquan.ecomdmbbackend.utils.FileUploadUtils;
*/
@Tag(name = "组织-公司管理", description = "公司的增删改查接口")
@RestController
@RequestMapping("/company")
@RequestMapping("/api/company")
public class CompanyController {
private final CompanyService companyService;
@@ -20,7 +20,7 @@ import java.util.List;
*/
@Tag(name = "组织-公司成员管理", description = "公司成员的增删改查接口")
@RestController
@RequestMapping("/company-member")
@RequestMapping("/api/company-member")
public class CompanyMemberController {
private final CompanyMemberService companyMemberService;
@@ -16,7 +16,7 @@ import java.util.List;
*/
@Tag(name = "组织-公司菜单管理", description = "公司菜单的增删改查接口")
@RestController
@RequestMapping("/company-menu")
@RequestMapping("/api/company-menu")
public class CompanyMenuController {
private final CompanyMenuService companyMenuService;
@@ -18,7 +18,7 @@ import java.util.List;
*/
@Tag(name = "组织-公司权限管理", description = "公司权限的分配和管理接口")
@RestController
@RequestMapping("/company-permission")
@RequestMapping("/api/company-permission")
public class CompanyPermissionController {
private final CompanyPermissionService companyPermissionService;
@@ -22,7 +22,7 @@ import java.util.List;
*/
@Tag(name = "组织-部门管理", description = "部门的增删改查接口")
@RestController
@RequestMapping("/department")
@RequestMapping("/api/department")
public class DepartmentController {
private final DepartmentService departmentService;
@@ -19,7 +19,7 @@ import java.util.List;
*/
@Tag(name = "组织-部门成员管理", description = "部门成员的增删改查接口")
@RestController
@RequestMapping("/department-member")
@RequestMapping("/api/department-member")
public class DepartmentMemberController {
private final DepartmentMemberService departmentMemberService;
@@ -20,7 +20,7 @@ import top.xyquan.ecomdmbbackend.modules.org.position.service.PositionService;
*/
@Tag(name = "组织-岗位管理", description = "岗位的增删改查接口")
@RestController
@RequestMapping("/position")
@RequestMapping("/api/position")
public class PositionController {
private final PositionService positionService;
@@ -20,7 +20,7 @@ import java.util.List;
*/
@Tag(name = "组织-职位菜单管理", description = "职位菜单的分配和管理接口")
@RestController
@RequestMapping("/position-menu")
@RequestMapping("/api/position-menu")
public class PositionPermissionController {
private final PositionMenuService positionMenuService;
@@ -19,7 +19,7 @@ import java.util.List;
*/
@Tag(name = "组织-岗位权限管理", description = "岗位权限的分配和管理接口")
@RestController
@RequestMapping("/position-permission")
@RequestMapping("/api/position-permission")
public class PositionPermissionManagementController {
private final PositionPermissionService positionPermissionService;
@@ -21,7 +21,7 @@ import top.xyquan.ecomdmbbackend.modules.sub.plan.service.PlanService;
*/
@Tag(name = "订阅-套餐管理", description = "套餐的增删改查接口")
@RestController
@RequestMapping("/plan")
@RequestMapping("/api/plan")
public class PlanController {
private final PlanService planService;
@@ -21,7 +21,7 @@ import top.xyquan.ecomdmbbackend.modules.sub.plan.pricing.service.PlanPricingSer
*/
@Tag(name = "订阅-套餐定价管理", description = "套餐定价的增删改查接口")
@RestController
@RequestMapping("/plan-pricing")
@RequestMapping("/api/plan-pricing")
public class PlanPricingController {
private final PlanPricingService planPricingService;
@@ -21,7 +21,7 @@ import top.xyquan.ecomdmbbackend.modules.sub.subscription.service.SubscriptionSe
*/
@Tag(name = "订阅-订阅管理", description = "订阅的增删改查接口")
@RestController
@RequestMapping("/subscription")
@RequestMapping("/api/subscription")
public class SubscriptionController {
private final SubscriptionService subscriptionService;
@@ -20,7 +20,7 @@ import java.util.List;
*/
@Tag(name = "系统-认证管理", description = "用户注册、登录等认证相关接口")
@RestController
@RequestMapping("/auth")
@RequestMapping("/api/auth")
public class AuthController {
private final UserService userService;
@@ -17,7 +17,7 @@ import top.xyquan.ecomdmbbackend.modules.sys.user.service.UserService;
*/
@Tag(name = "超级管理员-认证管理", description = "超级管理员专属认证相关接口")
@RestController
@RequestMapping("/super/auth")
@RequestMapping("/api/super/auth")
public class SuperAuthController {
private final UserService userService;
@@ -25,7 +25,7 @@ import java.util.List;
*/
@Tag(name = "系统-文件管理", description = "文件上传和管理相关接口")
@RestController
@RequestMapping("/sys/file")
@RequestMapping("/api/sys/file")
public class SysFileController {
private final SysFileService sysFileService;
@@ -22,7 +22,7 @@ import top.xyquan.ecomdmbbackend.modules.sys.license.service.LicenseService;
*/
@Tag(name = "系统-授权管理", description = "机器指纹查看与 License 激活/续期")
@RestController
@RequestMapping("/system")
@RequestMapping("/api/system")
public class SystemLicenseController {
private final LicenseService licenseService;
@@ -20,7 +20,7 @@ import java.util.List;
*/
@Tag(name = "系统-菜单管理", description = "菜单的增删改查接口")
@RestController
@RequestMapping("/menu")
@RequestMapping("/api/menu")
public class MenuController {
private final MenuService menuService;
@@ -17,7 +17,7 @@ import top.xyquan.ecomdmbbackend.modules.sys.menu.permission.service.MenuPermiss
*/
@Tag(name = "系统-菜单权限映射管理", description = "菜单权限映射的增删接口")
@RestController
@RequestMapping("/menu-permission")
@RequestMapping("/api/menu-permission")
public class MenuPermissionController {
private final MenuPermissionService menuPermissionService;
@@ -24,7 +24,7 @@ import java.util.List;
*/
@Tag(name = "系统-权限码管理", description = "权限码的增删改查接口")
@RestController
@RequestMapping("/permission")
@RequestMapping("/api/permission")
public class PermissionController {
private final PermissionService permissionService;
@@ -26,7 +26,7 @@ import java.util.List;
*/
@Tag(name = "系统-用户管理", description = "用户信息管理相关接口")
@RestController
@RequestMapping("/user")
@RequestMapping("/api/user")
public class UserController {
private final UserService userService;