mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-25 09:49:20 +08:00
refactor: 调整权限代码
This commit is contained in:
+1
-1
@@ -30,7 +30,7 @@ public class PddAuthController {
|
|||||||
|
|
||||||
@Operation(summary = "获取授权跳转 URL", description = "为指定内部店铺生成拼多多授权页链接,前端新窗口打开后引导商家授权")
|
@Operation(summary = "获取授权跳转 URL", description = "为指定内部店铺生成拼多多授权页链接,前端新窗口打开后引导商家授权")
|
||||||
@GetMapping("/authorize-url")
|
@GetMapping("/authorize-url")
|
||||||
@RequirePermission(value = "biz:pdd:auth:manage", description = "拼多多授权管理", allowSuper = true)
|
@RequirePermission(value = "channel:pdd:auth:manage", description = "拼多多授权管理", allowSuper = true)
|
||||||
public ApiResponse<PddAuthorizeUrlVO> authorizeUrl(
|
public ApiResponse<PddAuthorizeUrlVO> authorizeUrl(
|
||||||
@Parameter(description = "内部店铺 ID(ec_shop.id)", required = true)
|
@Parameter(description = "内部店铺 ID(ec_shop.id)", required = true)
|
||||||
@RequestParam("shopId") Long shopId) {
|
@RequestParam("shopId") Long shopId) {
|
||||||
|
|||||||
+6
-6
@@ -29,7 +29,7 @@ public class PddGoodsController {
|
|||||||
|
|
||||||
@Operation(summary = "创建", description = "创建新的拼多多商品及SKU明细")
|
@Operation(summary = "创建", description = "创建新的拼多多商品及SKU明细")
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@RequirePermission(value = "biz:pdd:goods:manage", description = "创建拼多多商品", allowSuper = true)
|
@RequirePermission(value = "channel:pdd:goods:manage", description = "创建拼多多商品", allowSuper = true)
|
||||||
public ApiResponse<PddGoodsVO> createPddGoods(@Valid @RequestBody CreatePddGoodsDTO createPddGoodsDTO) {
|
public ApiResponse<PddGoodsVO> createPddGoods(@Valid @RequestBody CreatePddGoodsDTO createPddGoodsDTO) {
|
||||||
PddGoodsVO vo = pddGoodsService.createPddGoods(createPddGoodsDTO);
|
PddGoodsVO vo = pddGoodsService.createPddGoods(createPddGoodsDTO);
|
||||||
return ApiResponse.success("创建成功", vo);
|
return ApiResponse.success("创建成功", vo);
|
||||||
@@ -37,7 +37,7 @@ public class PddGoodsController {
|
|||||||
|
|
||||||
@Operation(summary = "更新", description = "更新现有拼多多商品信息")
|
@Operation(summary = "更新", description = "更新现有拼多多商品信息")
|
||||||
@PutMapping("/update/{id}")
|
@PutMapping("/update/{id}")
|
||||||
@RequirePermission(value = "biz:pdd:goods:manage", description = "更新拼多多商品", allowSuper = true)
|
@RequirePermission(value = "channel:pdd:goods:manage", description = "更新拼多多商品", allowSuper = true)
|
||||||
public ApiResponse<PddGoodsVO> updatePddGoods(@Valid @RequestBody UpdatePddGoodsDTO updatePddGoodsDTO,
|
public ApiResponse<PddGoodsVO> updatePddGoods(@Valid @RequestBody UpdatePddGoodsDTO updatePddGoodsDTO,
|
||||||
@Parameter(description = "商品ID") @PathVariable Long id) {
|
@Parameter(description = "商品ID") @PathVariable Long id) {
|
||||||
PddGoodsVO vo = pddGoodsService.updatePddGoods(updatePddGoodsDTO, id);
|
PddGoodsVO vo = pddGoodsService.updatePddGoods(updatePddGoodsDTO, id);
|
||||||
@@ -46,7 +46,7 @@ public class PddGoodsController {
|
|||||||
|
|
||||||
@Operation(summary = "删除", description = "删除指定拼多多商品及SKU明细")
|
@Operation(summary = "删除", description = "删除指定拼多多商品及SKU明细")
|
||||||
@DeleteMapping("/delete/{id}")
|
@DeleteMapping("/delete/{id}")
|
||||||
@RequirePermission(value = "biz:pdd:goods:manage", description = "删除拼多多商品", allowSuper = true)
|
@RequirePermission(value = "channel:pdd:goods:manage", description = "删除拼多多商品", allowSuper = true)
|
||||||
public ApiResponse<Void> deletePddGoods(@Parameter(description = "商品ID") @PathVariable Long id) {
|
public ApiResponse<Void> deletePddGoods(@Parameter(description = "商品ID") @PathVariable Long id) {
|
||||||
pddGoodsService.deletePddGoods(id);
|
pddGoodsService.deletePddGoods(id);
|
||||||
return ApiResponse.success("删除成功");
|
return ApiResponse.success("删除成功");
|
||||||
@@ -54,7 +54,7 @@ public class PddGoodsController {
|
|||||||
|
|
||||||
@Operation(summary = "分页列表", description = "分页获取拼多多商品列表,支持条件过滤")
|
@Operation(summary = "分页列表", description = "分页获取拼多多商品列表,支持条件过滤")
|
||||||
@PostMapping("/list")
|
@PostMapping("/list")
|
||||||
@RequirePermission(value = "biz:pdd:goods:read", description = "查询拼多多商品列表", allowSuper = true)
|
@RequirePermission(value = "channel:pdd:goods:read", description = "查询拼多多商品列表", allowSuper = true)
|
||||||
public ApiResponse<PageResultVO<PddGoodsVO>> getPddGoodsPage(
|
public ApiResponse<PageResultVO<PddGoodsVO>> getPddGoodsPage(
|
||||||
@Valid @RequestBody PageQueryDTO<PddGoodsFilterDTO> pageQueryDTO) {
|
@Valid @RequestBody PageQueryDTO<PddGoodsFilterDTO> pageQueryDTO) {
|
||||||
PageResultVO<PddGoodsVO> result = pddGoodsService.getPddGoodsPage(pageQueryDTO);
|
PageResultVO<PddGoodsVO> result = pddGoodsService.getPddGoodsPage(pageQueryDTO);
|
||||||
@@ -63,7 +63,7 @@ public class PddGoodsController {
|
|||||||
|
|
||||||
@Operation(summary = "详情", description = "根据ID获取拼多多商品详情,含SKU明细")
|
@Operation(summary = "详情", description = "根据ID获取拼多多商品详情,含SKU明细")
|
||||||
@GetMapping("/detail/{id}")
|
@GetMapping("/detail/{id}")
|
||||||
@RequirePermission(value = "biz:pdd:goods:read", description = "查询拼多多商品详情", allowSuper = true)
|
@RequirePermission(value = "channel:pdd:goods:read", description = "查询拼多多商品详情", allowSuper = true)
|
||||||
public ApiResponse<PddGoodsVO> getPddGoodsDetail(@Parameter(description = "商品ID") @PathVariable Long id) {
|
public ApiResponse<PddGoodsVO> getPddGoodsDetail(@Parameter(description = "商品ID") @PathVariable Long id) {
|
||||||
PddGoodsVO vo = pddGoodsService.getPddGoodsDetail(id);
|
PddGoodsVO vo = pddGoodsService.getPddGoodsDetail(id);
|
||||||
return ApiResponse.success("获取成功", vo);
|
return ApiResponse.success("获取成功", vo);
|
||||||
@@ -71,7 +71,7 @@ public class PddGoodsController {
|
|||||||
|
|
||||||
@Operation(summary = "同步商品", description = "按渠道店铺调用 pdd.goods.list.get,同步上架+下架商品及SKU到本地")
|
@Operation(summary = "同步商品", description = "按渠道店铺调用 pdd.goods.list.get,同步上架+下架商品及SKU到本地")
|
||||||
@PostMapping("/sync/{pddShopId}")
|
@PostMapping("/sync/{pddShopId}")
|
||||||
@RequirePermission(value = "biz:pdd:goods:manage", description = "同步拼多多商品", allowSuper = true)
|
@RequirePermission(value = "channel:pdd:goods:manage", description = "同步拼多多商品", allowSuper = true)
|
||||||
public ApiResponse<PddGoodsSyncResultVO> syncGoodsByPddShop(
|
public ApiResponse<PddGoodsSyncResultVO> syncGoodsByPddShop(
|
||||||
@Parameter(description = "渠道店铺ID(channel_pdd_shop.id)") @PathVariable Long pddShopId) {
|
@Parameter(description = "渠道店铺ID(channel_pdd_shop.id)") @PathVariable Long pddShopId) {
|
||||||
PddGoodsSyncResultVO result = pddGoodsService.syncGoodsByPddShop(pddShopId);
|
PddGoodsSyncResultVO result = pddGoodsService.syncGoodsByPddShop(pddShopId);
|
||||||
|
|||||||
+5
-5
@@ -28,7 +28,7 @@ public class PddOrderController {
|
|||||||
|
|
||||||
@Operation(summary = "创建", description = "创建新的拼多多订单及商品明细")
|
@Operation(summary = "创建", description = "创建新的拼多多订单及商品明细")
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@RequirePermission(value = "biz:pdd:order:manage", description = "创建拼多多订单", allowSuper = true)
|
@RequirePermission(value = "channel:pdd:order:manage", description = "创建拼多多订单", allowSuper = true)
|
||||||
public ApiResponse<PddOrderVO> createPddOrder(@Valid @RequestBody CreatePddOrderDTO createPddOrderDTO) {
|
public ApiResponse<PddOrderVO> createPddOrder(@Valid @RequestBody CreatePddOrderDTO createPddOrderDTO) {
|
||||||
PddOrderVO vo = pddOrderService.createPddOrder(createPddOrderDTO);
|
PddOrderVO vo = pddOrderService.createPddOrder(createPddOrderDTO);
|
||||||
return ApiResponse.success("创建成功", vo);
|
return ApiResponse.success("创建成功", vo);
|
||||||
@@ -36,7 +36,7 @@ public class PddOrderController {
|
|||||||
|
|
||||||
@Operation(summary = "更新", description = "更新现有拼多多订单信息")
|
@Operation(summary = "更新", description = "更新现有拼多多订单信息")
|
||||||
@PutMapping("/update/{id}")
|
@PutMapping("/update/{id}")
|
||||||
@RequirePermission(value = "biz:pdd:order:manage", description = "更新拼多多订单", allowSuper = true)
|
@RequirePermission(value = "channel:pdd:order:manage", description = "更新拼多多订单", allowSuper = true)
|
||||||
public ApiResponse<PddOrderVO> updatePddOrder(@Valid @RequestBody UpdatePddOrderDTO updatePddOrderDTO,
|
public ApiResponse<PddOrderVO> updatePddOrder(@Valid @RequestBody UpdatePddOrderDTO updatePddOrderDTO,
|
||||||
@Parameter(description = "订单ID") @PathVariable Long id) {
|
@Parameter(description = "订单ID") @PathVariable Long id) {
|
||||||
PddOrderVO vo = pddOrderService.updatePddOrder(updatePddOrderDTO, id);
|
PddOrderVO vo = pddOrderService.updatePddOrder(updatePddOrderDTO, id);
|
||||||
@@ -45,7 +45,7 @@ public class PddOrderController {
|
|||||||
|
|
||||||
@Operation(summary = "删除", description = "删除指定拼多多订单及商品明细")
|
@Operation(summary = "删除", description = "删除指定拼多多订单及商品明细")
|
||||||
@DeleteMapping("/delete/{id}")
|
@DeleteMapping("/delete/{id}")
|
||||||
@RequirePermission(value = "biz:pdd:order:manage", description = "删除拼多多订单", allowSuper = true)
|
@RequirePermission(value = "channel:pdd:order:manage", description = "删除拼多多订单", allowSuper = true)
|
||||||
public ApiResponse<Void> deletePddOrder(@Parameter(description = "订单ID") @PathVariable Long id) {
|
public ApiResponse<Void> deletePddOrder(@Parameter(description = "订单ID") @PathVariable Long id) {
|
||||||
pddOrderService.deletePddOrder(id);
|
pddOrderService.deletePddOrder(id);
|
||||||
return ApiResponse.success("删除成功");
|
return ApiResponse.success("删除成功");
|
||||||
@@ -53,7 +53,7 @@ public class PddOrderController {
|
|||||||
|
|
||||||
@Operation(summary = "分页列表", description = "分页获取拼多多订单列表,支持条件过滤")
|
@Operation(summary = "分页列表", description = "分页获取拼多多订单列表,支持条件过滤")
|
||||||
@PostMapping("/list")
|
@PostMapping("/list")
|
||||||
@RequirePermission(value = "biz:pdd:order:read", description = "查询拼多多订单列表", allowSuper = true)
|
@RequirePermission(value = "channel:pdd:order:read", description = "查询拼多多订单列表", allowSuper = true)
|
||||||
public ApiResponse<PageResultVO<PddOrderVO>> getPddOrderPage(
|
public ApiResponse<PageResultVO<PddOrderVO>> getPddOrderPage(
|
||||||
@Valid @RequestBody PageQueryDTO<PddOrderFilterDTO> pageQueryDTO) {
|
@Valid @RequestBody PageQueryDTO<PddOrderFilterDTO> pageQueryDTO) {
|
||||||
PageResultVO<PddOrderVO> result = pddOrderService.getPddOrderPage(pageQueryDTO);
|
PageResultVO<PddOrderVO> result = pddOrderService.getPddOrderPage(pageQueryDTO);
|
||||||
@@ -62,7 +62,7 @@ public class PddOrderController {
|
|||||||
|
|
||||||
@Operation(summary = "详情", description = "根据ID获取拼多多订单详情,含商品明细")
|
@Operation(summary = "详情", description = "根据ID获取拼多多订单详情,含商品明细")
|
||||||
@GetMapping("/detail/{id}")
|
@GetMapping("/detail/{id}")
|
||||||
@RequirePermission(value = "biz:pdd:order:read", description = "查询拼多多订单详情", allowSuper = true)
|
@RequirePermission(value = "channel:pdd:order:read", description = "查询拼多多订单详情", allowSuper = true)
|
||||||
public ApiResponse<PddOrderVO> getPddOrderDetail(@Parameter(description = "订单ID") @PathVariable Long id) {
|
public ApiResponse<PddOrderVO> getPddOrderDetail(@Parameter(description = "订单ID") @PathVariable Long id) {
|
||||||
PddOrderVO vo = pddOrderService.getPddOrderDetail(id);
|
PddOrderVO vo = pddOrderService.getPddOrderDetail(id);
|
||||||
return ApiResponse.success("获取成功", vo);
|
return ApiResponse.success("获取成功", vo);
|
||||||
|
|||||||
+5
-5
@@ -28,7 +28,7 @@ public class PddShopController {
|
|||||||
|
|
||||||
@Operation(summary = "创建", description = "创建新的拼多多店铺信息")
|
@Operation(summary = "创建", description = "创建新的拼多多店铺信息")
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@RequirePermission(value = "biz:pdd:shop:manage", description = "创建拼多多店铺", allowSuper = true)
|
@RequirePermission(value = "channel:pdd:shop:manage", description = "创建拼多多店铺", allowSuper = true)
|
||||||
public ApiResponse<PddShopVO> createPddShop(@Valid @RequestBody CreatePddShopDTO createPddShopDTO) {
|
public ApiResponse<PddShopVO> createPddShop(@Valid @RequestBody CreatePddShopDTO createPddShopDTO) {
|
||||||
PddShopVO vo = pddShopService.createPddShop(createPddShopDTO);
|
PddShopVO vo = pddShopService.createPddShop(createPddShopDTO);
|
||||||
return ApiResponse.success("创建成功", vo);
|
return ApiResponse.success("创建成功", vo);
|
||||||
@@ -36,7 +36,7 @@ public class PddShopController {
|
|||||||
|
|
||||||
@Operation(summary = "更新", description = "更新现有拼多多店铺信息")
|
@Operation(summary = "更新", description = "更新现有拼多多店铺信息")
|
||||||
@PutMapping("/update/{id}")
|
@PutMapping("/update/{id}")
|
||||||
@RequirePermission(value = "biz:pdd:shop:manage", description = "更新拼多多店铺", allowSuper = true)
|
@RequirePermission(value = "channel:pdd:shop:manage", description = "更新拼多多店铺", allowSuper = true)
|
||||||
public ApiResponse<PddShopVO> updatePddShop(@Valid @RequestBody UpdatePddShopDTO updatePddShopDTO,
|
public ApiResponse<PddShopVO> updatePddShop(@Valid @RequestBody UpdatePddShopDTO updatePddShopDTO,
|
||||||
@Parameter(description = "店铺ID") @PathVariable Long id) {
|
@Parameter(description = "店铺ID") @PathVariable Long id) {
|
||||||
PddShopVO vo = pddShopService.updatePddShop(updatePddShopDTO, id);
|
PddShopVO vo = pddShopService.updatePddShop(updatePddShopDTO, id);
|
||||||
@@ -45,7 +45,7 @@ public class PddShopController {
|
|||||||
|
|
||||||
@Operation(summary = "删除", description = "删除指定拼多多店铺")
|
@Operation(summary = "删除", description = "删除指定拼多多店铺")
|
||||||
@DeleteMapping("/delete/{id}")
|
@DeleteMapping("/delete/{id}")
|
||||||
@RequirePermission(value = "biz:pdd:shop:manage", description = "删除拼多多店铺", allowSuper = true)
|
@RequirePermission(value = "channel:pdd:shop:manage", description = "删除拼多多店铺", allowSuper = true)
|
||||||
public ApiResponse<Void> deletePddShop(@Parameter(description = "店铺ID") @PathVariable Long id) {
|
public ApiResponse<Void> deletePddShop(@Parameter(description = "店铺ID") @PathVariable Long id) {
|
||||||
pddShopService.deletePddShop(id);
|
pddShopService.deletePddShop(id);
|
||||||
return ApiResponse.success("删除成功");
|
return ApiResponse.success("删除成功");
|
||||||
@@ -53,7 +53,7 @@ public class PddShopController {
|
|||||||
|
|
||||||
@Operation(summary = "分页列表", description = "分页获取拼多多店铺列表,支持条件过滤")
|
@Operation(summary = "分页列表", description = "分页获取拼多多店铺列表,支持条件过滤")
|
||||||
@PostMapping("/list")
|
@PostMapping("/list")
|
||||||
@RequirePermission(value = "biz:pdd:shop:read", description = "查询拼多多店铺列表", allowSuper = true)
|
@RequirePermission(value = "channel:pdd:shop:read", description = "查询拼多多店铺列表", allowSuper = true)
|
||||||
public ApiResponse<PageResultVO<PddShopVO>> getPddShopPage(
|
public ApiResponse<PageResultVO<PddShopVO>> getPddShopPage(
|
||||||
@Valid @RequestBody PageQueryDTO<PddShopFilterDTO> pageQueryDTO) {
|
@Valid @RequestBody PageQueryDTO<PddShopFilterDTO> pageQueryDTO) {
|
||||||
PageResultVO<PddShopVO> result = pddShopService.getPddShopPage(pageQueryDTO);
|
PageResultVO<PddShopVO> result = pddShopService.getPddShopPage(pageQueryDTO);
|
||||||
@@ -62,7 +62,7 @@ public class PddShopController {
|
|||||||
|
|
||||||
@Operation(summary = "详情", description = "根据ID获取拼多多店铺详情(含授权信息,不含 token)")
|
@Operation(summary = "详情", description = "根据ID获取拼多多店铺详情(含授权信息,不含 token)")
|
||||||
@GetMapping("/detail/{id}")
|
@GetMapping("/detail/{id}")
|
||||||
@RequirePermission(value = "biz:pdd:shop:read", description = "查询拼多多店铺详情", allowSuper = true)
|
@RequirePermission(value = "channel:pdd:shop:read", description = "查询拼多多店铺详情", allowSuper = true)
|
||||||
public ApiResponse<PddShopVO> getPddShopDetail(@Parameter(description = "店铺ID") @PathVariable Long id) {
|
public ApiResponse<PddShopVO> getPddShopDetail(@Parameter(description = "店铺ID") @PathVariable Long id) {
|
||||||
PddShopVO vo = pddShopService.getPddShopDetail(id);
|
PddShopVO vo = pddShopService.getPddShopDetail(id);
|
||||||
return ApiResponse.success("获取成功", vo);
|
return ApiResponse.success("获取成功", vo);
|
||||||
|
|||||||
+5
-5
@@ -31,7 +31,7 @@ public class BrushOrderController {
|
|||||||
|
|
||||||
@Operation(summary = "创建刷单记录", description = "创建新的刷单记录")
|
@Operation(summary = "创建刷单记录", description = "创建新的刷单记录")
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@RequirePermission(value = "ecom:order:create", description = "创建刷单记录", allowSuper = true)
|
@RequirePermission(value = "ec:order:create", description = "创建刷单记录", allowSuper = true)
|
||||||
public ApiResponse<BrushOrderVO> createBrushOrder(@Valid @RequestBody CreateBrushOrderDTO createBrushOrderDTO) {
|
public ApiResponse<BrushOrderVO> createBrushOrder(@Valid @RequestBody CreateBrushOrderDTO createBrushOrderDTO) {
|
||||||
BrushOrderVO brushOrderVO = brushOrderService.createBrushOrder(createBrushOrderDTO);
|
BrushOrderVO brushOrderVO = brushOrderService.createBrushOrder(createBrushOrderDTO);
|
||||||
return ApiResponse.success("刷单记录创建成功", brushOrderVO);
|
return ApiResponse.success("刷单记录创建成功", brushOrderVO);
|
||||||
@@ -39,7 +39,7 @@ public class BrushOrderController {
|
|||||||
|
|
||||||
@Operation(summary = "更新刷单记录", description = "更新现有刷单记录信息")
|
@Operation(summary = "更新刷单记录", description = "更新现有刷单记录信息")
|
||||||
@PutMapping("/update/{id}")
|
@PutMapping("/update/{id}")
|
||||||
@RequirePermission(value = "ecom:order:update", description = "更新刷单记录", allowSuper = true)
|
@RequirePermission(value = "ec:order:update", description = "更新刷单记录", allowSuper = true)
|
||||||
public ApiResponse<BrushOrderVO> updateBrushOrder(@Valid @RequestBody UpdateBrushOrderDTO updateBrushOrderDTO,
|
public ApiResponse<BrushOrderVO> updateBrushOrder(@Valid @RequestBody UpdateBrushOrderDTO updateBrushOrderDTO,
|
||||||
@Parameter(description = "刷单记录ID") @PathVariable Long id) {
|
@Parameter(description = "刷单记录ID") @PathVariable Long id) {
|
||||||
BrushOrderVO brushOrderVO = brushOrderService.updateBrushOrder(updateBrushOrderDTO, id);
|
BrushOrderVO brushOrderVO = brushOrderService.updateBrushOrder(updateBrushOrderDTO, id);
|
||||||
@@ -48,7 +48,7 @@ public class BrushOrderController {
|
|||||||
|
|
||||||
@Operation(summary = "删除刷单记录", description = "删除指定刷单记录")
|
@Operation(summary = "删除刷单记录", description = "删除指定刷单记录")
|
||||||
@DeleteMapping("/delete/{id}")
|
@DeleteMapping("/delete/{id}")
|
||||||
@RequirePermission(value = "ecom:order:delete", description = "删除刷单记录", allowSuper = true)
|
@RequirePermission(value = "ec:order:delete", description = "删除刷单记录", allowSuper = true)
|
||||||
public ApiResponse<Void> deleteBrushOrder(
|
public ApiResponse<Void> deleteBrushOrder(
|
||||||
@Parameter(description = "刷单记录ID") @PathVariable Long id) {
|
@Parameter(description = "刷单记录ID") @PathVariable Long id) {
|
||||||
brushOrderService.deleteBrushOrder(id);
|
brushOrderService.deleteBrushOrder(id);
|
||||||
@@ -57,7 +57,7 @@ public class BrushOrderController {
|
|||||||
|
|
||||||
@Operation(summary = "分页获取刷单记录列表", description = "分页获取刷单记录列表,支持条件过滤")
|
@Operation(summary = "分页获取刷单记录列表", description = "分页获取刷单记录列表,支持条件过滤")
|
||||||
@PostMapping("/list")
|
@PostMapping("/list")
|
||||||
@RequirePermission(value = "ecom:order:read", description = "查询刷单记录列表", allowSuper = true)
|
@RequirePermission(value = "ec:order:read", description = "查询刷单记录列表", allowSuper = true)
|
||||||
public ApiResponse<PageResultVO<BrushOrderVO>> getBrushOrderPage(
|
public ApiResponse<PageResultVO<BrushOrderVO>> getBrushOrderPage(
|
||||||
@Valid @RequestBody PageQueryDTO<BrushOrderFilterDTO> pageQueryDTO) {
|
@Valid @RequestBody PageQueryDTO<BrushOrderFilterDTO> pageQueryDTO) {
|
||||||
PageResultVO<BrushOrderVO> result = brushOrderService.getBrushOrderPage(pageQueryDTO);
|
PageResultVO<BrushOrderVO> result = brushOrderService.getBrushOrderPage(pageQueryDTO);
|
||||||
@@ -66,7 +66,7 @@ public class BrushOrderController {
|
|||||||
|
|
||||||
@Operation(summary = "获取刷单记录详情", description = "根据ID获取刷单记录详情")
|
@Operation(summary = "获取刷单记录详情", description = "根据ID获取刷单记录详情")
|
||||||
@GetMapping("/detail/{id}")
|
@GetMapping("/detail/{id}")
|
||||||
@RequirePermission(value = "ecom:order:read", description = "查询刷单记录详情", allowSuper = true)
|
@RequirePermission(value = "ec:order:read", description = "查询刷单记录详情", allowSuper = true)
|
||||||
public ApiResponse<BrushOrderVO> getBrushOrderById(
|
public ApiResponse<BrushOrderVO> getBrushOrderById(
|
||||||
@Parameter(description = "刷单记录ID") @PathVariable Long id) {
|
@Parameter(description = "刷单记录ID") @PathVariable Long id) {
|
||||||
BrushOrderVO brushOrderVO = brushOrderService.getBrushOrderById(id);
|
BrushOrderVO brushOrderVO = brushOrderService.getBrushOrderById(id);
|
||||||
|
|||||||
+6
-6
@@ -33,7 +33,7 @@ public class CategoryController {
|
|||||||
|
|
||||||
@Operation(summary = "创建类目", description = "创建新的商品类目")
|
@Operation(summary = "创建类目", description = "创建新的商品类目")
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@RequirePermission(value = "ecom:category:manage", description = "创建类目", allowSuper = true)
|
@RequirePermission(value = "ec: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);
|
||||||
@@ -41,7 +41,7 @@ public class CategoryController {
|
|||||||
|
|
||||||
@Operation(summary = "更新类目", description = "更新现有商品类目信息")
|
@Operation(summary = "更新类目", description = "更新现有商品类目信息")
|
||||||
@PutMapping("/update/{id}")
|
@PutMapping("/update/{id}")
|
||||||
@RequirePermission(value = "ecom:category:manage", description = "更新类目", allowSuper = true)
|
@RequirePermission(value = "ec:category:manage", description = "更新类目", allowSuper = true)
|
||||||
public ApiResponse<CategoryVO> updateCategory(@Valid @RequestBody UpdateCategoryDTO updateCategoryDTO,
|
public ApiResponse<CategoryVO> updateCategory(@Valid @RequestBody UpdateCategoryDTO updateCategoryDTO,
|
||||||
@Parameter(description = "类目ID") @PathVariable Long id) {
|
@Parameter(description = "类目ID") @PathVariable Long id) {
|
||||||
CategoryVO categoryVO = categoryService.updateCategory(updateCategoryDTO, id);
|
CategoryVO categoryVO = categoryService.updateCategory(updateCategoryDTO, id);
|
||||||
@@ -50,7 +50,7 @@ public class CategoryController {
|
|||||||
|
|
||||||
@Operation(summary = "删除类目", description = "删除指定商品类目")
|
@Operation(summary = "删除类目", description = "删除指定商品类目")
|
||||||
@DeleteMapping("/delete/{id}")
|
@DeleteMapping("/delete/{id}")
|
||||||
@RequirePermission(value = "ecom:category:manage", description = "删除类目", allowSuper = true)
|
@RequirePermission(value = "ec:category:manage", description = "删除类目", allowSuper = true)
|
||||||
public ApiResponse<Void> deleteCategory(
|
public ApiResponse<Void> deleteCategory(
|
||||||
@Parameter(description = "类目ID") @PathVariable Long id) {
|
@Parameter(description = "类目ID") @PathVariable Long id) {
|
||||||
categoryService.deleteCategory(id);
|
categoryService.deleteCategory(id);
|
||||||
@@ -59,7 +59,7 @@ public class CategoryController {
|
|||||||
|
|
||||||
@Operation(summary = "分页获取类目列表", description = "分页获取类目列表,支持条件过滤")
|
@Operation(summary = "分页获取类目列表", description = "分页获取类目列表,支持条件过滤")
|
||||||
@PostMapping("/list")
|
@PostMapping("/list")
|
||||||
@RequirePermission(value = "ecom:category:read", description = "查询类目列表", allowSuper = true)
|
@RequirePermission(value = "ec: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);
|
||||||
@@ -68,7 +68,7 @@ public class CategoryController {
|
|||||||
|
|
||||||
@Operation(summary = "获取类目树形结构", description = "获取当前公司的所有类目,以树形结构返回")
|
@Operation(summary = "获取类目树形结构", description = "获取当前公司的所有类目,以树形结构返回")
|
||||||
@GetMapping("/tree")
|
@GetMapping("/tree")
|
||||||
@RequirePermission(value = "ecom:category:read", description = "查询类目树", allowSuper = true)
|
@RequirePermission(value = "ec: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);
|
||||||
@@ -76,7 +76,7 @@ public class CategoryController {
|
|||||||
|
|
||||||
@Operation(summary = "获取类目扁平列表", description = "获取当前公司的所有类目,以扁平列表返回,用于下拉选择")
|
@Operation(summary = "获取类目扁平列表", description = "获取当前公司的所有类目,以扁平列表返回,用于下拉选择")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@RequirePermission(value = "ecom:category:read", description = "查询类目列表", allowSuper = true)
|
@RequirePermission(value = "ec: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);
|
||||||
|
|||||||
+8
-8
@@ -41,7 +41,7 @@ public class OrderController {
|
|||||||
@Operation(summary = "创建订单", description = "创建新的订单")
|
@Operation(summary = "创建订单", description = "创建新的订单")
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@RequiresOrderCreateLicense
|
@RequiresOrderCreateLicense
|
||||||
@RequirePermission(value = "ecom:order:create", description = "创建订单", allowSuper = true)
|
@RequirePermission(value = "ec:order:create", description = "创建订单", allowSuper = true)
|
||||||
public ApiResponse<OrderVO> createOrder(@Valid @RequestBody CreateOrderDTO createOrderDTO) {
|
public ApiResponse<OrderVO> createOrder(@Valid @RequestBody CreateOrderDTO createOrderDTO) {
|
||||||
OrderVO orderVO = orderService.createOrder(createOrderDTO);
|
OrderVO orderVO = orderService.createOrder(createOrderDTO);
|
||||||
return ApiResponse.success("订单创建成功", orderVO);
|
return ApiResponse.success("订单创建成功", orderVO);
|
||||||
@@ -49,7 +49,7 @@ public class OrderController {
|
|||||||
|
|
||||||
@Operation(summary = "更新订单", description = "更新现有订单信息")
|
@Operation(summary = "更新订单", description = "更新现有订单信息")
|
||||||
@PutMapping("/update/{id}")
|
@PutMapping("/update/{id}")
|
||||||
@RequirePermission(value = "ecom:order:update", description = "更新订单", allowSuper = true)
|
@RequirePermission(value = "ec:order:update", description = "更新订单", allowSuper = true)
|
||||||
public ApiResponse<OrderVO> updateOrder(@Valid @RequestBody UpdateOrderDTO updateOrderDTO,
|
public ApiResponse<OrderVO> updateOrder(@Valid @RequestBody UpdateOrderDTO updateOrderDTO,
|
||||||
@Parameter(description = "订单ID") @PathVariable Long id) {
|
@Parameter(description = "订单ID") @PathVariable Long id) {
|
||||||
OrderVO orderVO = orderService.updateOrder(updateOrderDTO, id);
|
OrderVO orderVO = orderService.updateOrder(updateOrderDTO, id);
|
||||||
@@ -58,7 +58,7 @@ public class OrderController {
|
|||||||
|
|
||||||
@Operation(summary = "删除订单", description = "删除指定订单")
|
@Operation(summary = "删除订单", description = "删除指定订单")
|
||||||
@DeleteMapping("/delete/{id}")
|
@DeleteMapping("/delete/{id}")
|
||||||
@RequirePermission(value = "ecom:order:delete", description = "删除订单", allowSuper = true)
|
@RequirePermission(value = "ec:order:delete", description = "删除订单", allowSuper = true)
|
||||||
public ApiResponse<Void> deleteOrder(
|
public ApiResponse<Void> deleteOrder(
|
||||||
@Parameter(description = "订单ID") @PathVariable Long id) {
|
@Parameter(description = "订单ID") @PathVariable Long id) {
|
||||||
orderService.deleteOrder(id);
|
orderService.deleteOrder(id);
|
||||||
@@ -67,7 +67,7 @@ public class OrderController {
|
|||||||
|
|
||||||
@Operation(summary = "批量删除订单", description = "按ID批量删除订单,须属于当前公司")
|
@Operation(summary = "批量删除订单", description = "按ID批量删除订单,须属于当前公司")
|
||||||
@PostMapping("/batch-delete")
|
@PostMapping("/batch-delete")
|
||||||
@RequirePermission(value = "ecom:order:delete", description = "删除订单", allowSuper = true)
|
@RequirePermission(value = "ec:order:delete", description = "删除订单", allowSuper = true)
|
||||||
public ApiResponse<Void> batchDeleteOrders(@Valid @RequestBody BatchDeleteOrderDTO dto) {
|
public ApiResponse<Void> batchDeleteOrders(@Valid @RequestBody BatchDeleteOrderDTO dto) {
|
||||||
orderService.deleteOrders(dto.getOrderIds());
|
orderService.deleteOrders(dto.getOrderIds());
|
||||||
return ApiResponse.success("批量删除订单成功");
|
return ApiResponse.success("批量删除订单成功");
|
||||||
@@ -75,7 +75,7 @@ public class OrderController {
|
|||||||
|
|
||||||
@Operation(summary = "分页获取订单列表", description = "分页获取订单列表,支持条件过滤")
|
@Operation(summary = "分页获取订单列表", description = "分页获取订单列表,支持条件过滤")
|
||||||
@PostMapping("/list")
|
@PostMapping("/list")
|
||||||
@RequirePermission(value = "ecom:order:read", description = "查询订单列表", allowSuper = true)
|
@RequirePermission(value = "ec:order:read", description = "查询订单列表", allowSuper = true)
|
||||||
public ApiResponse<PageResultVO<OrderVO>> getOrderPage(
|
public ApiResponse<PageResultVO<OrderVO>> getOrderPage(
|
||||||
@Valid @RequestBody PageQueryDTO<OrderFilterDTO> pageQueryDTO) {
|
@Valid @RequestBody PageQueryDTO<OrderFilterDTO> pageQueryDTO) {
|
||||||
PageResultVO<OrderVO> result = orderService.getOrderPage(pageQueryDTO);
|
PageResultVO<OrderVO> result = orderService.getOrderPage(pageQueryDTO);
|
||||||
@@ -84,7 +84,7 @@ public class OrderController {
|
|||||||
|
|
||||||
@Operation(summary = "获取订单详情", description = "根据ID获取订单详情")
|
@Operation(summary = "获取订单详情", description = "根据ID获取订单详情")
|
||||||
@GetMapping("/detail/{id}")
|
@GetMapping("/detail/{id}")
|
||||||
@RequirePermission(value = "ecom:order:read", description = "查询订单详情", allowSuper = true)
|
@RequirePermission(value = "ec:order:read", description = "查询订单详情", allowSuper = true)
|
||||||
public ApiResponse<OrderVO> getOrderById(
|
public ApiResponse<OrderVO> getOrderById(
|
||||||
@Parameter(description = "订单ID") @PathVariable Long id) {
|
@Parameter(description = "订单ID") @PathVariable Long id) {
|
||||||
OrderVO orderVO = orderService.getOrderById(id);
|
OrderVO orderVO = orderService.getOrderById(id);
|
||||||
@@ -94,7 +94,7 @@ public class OrderController {
|
|||||||
@Operation(summary = "批量导入订单", description = "批量导入订单数据,支持部分成功部分失败")
|
@Operation(summary = "批量导入订单", description = "批量导入订单数据,支持部分成功部分失败")
|
||||||
@PostMapping("/batch-import")
|
@PostMapping("/batch-import")
|
||||||
@LicenseRequired
|
@LicenseRequired
|
||||||
@RequirePermission(value = "ecom:order:import", description = "批量导入订单", allowSuper = true)
|
@RequirePermission(value = "ec:order:import", description = "批量导入订单", allowSuper = true)
|
||||||
public ApiResponse<BatchImportResultVO> batchImportOrders(@Valid @RequestBody BatchImportOrderDTO batchImportOrderDTO) {
|
public ApiResponse<BatchImportResultVO> batchImportOrders(@Valid @RequestBody BatchImportOrderDTO batchImportOrderDTO) {
|
||||||
BatchImportResultVO result = orderService.batchImportOrders(batchImportOrderDTO);
|
BatchImportResultVO result = orderService.batchImportOrders(batchImportOrderDTO);
|
||||||
return ApiResponse.success("批量导入订单成功", result);
|
return ApiResponse.success("批量导入订单成功", result);
|
||||||
@@ -102,7 +102,7 @@ public class OrderController {
|
|||||||
|
|
||||||
@Operation(summary = "获取订单字段信息列表", description = "获取订单导入的字段信息列表")
|
@Operation(summary = "获取订单字段信息列表", description = "获取订单导入的字段信息列表")
|
||||||
@GetMapping("/fields")
|
@GetMapping("/fields")
|
||||||
@RequirePermission(value = "ecom:order:read", description = "获取订单字段信息列表", allowSuper = true)
|
@RequirePermission(value = "ec:order:read", description = "获取订单字段信息列表", allowSuper = true)
|
||||||
public ApiResponse<List<OrderFieldVO>> getOrderFieldDefs() {
|
public ApiResponse<List<OrderFieldVO>> getOrderFieldDefs() {
|
||||||
return ApiResponse.success("获取订单字段信息列表成功", OrderFieldConstants.FIELDS);
|
return ApiResponse.success("获取订单字段信息列表成功", OrderFieldConstants.FIELDS);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -22,7 +22,7 @@ public class OrderStatusDictController {
|
|||||||
|
|
||||||
@Operation(summary = "获取订单状态列表", description = "返回全局固定枚举元数据")
|
@Operation(summary = "获取订单状态列表", description = "返回全局固定枚举元数据")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@RequirePermission(value = "ecom:order:read", description = "查询订单状态列表", allowSuper = true)
|
@RequirePermission(value = "ec:order:read", description = "查询订单状态列表", allowSuper = true)
|
||||||
public ApiResponse<List<OrderStatusMetaVO>> listOrderStatuses() {
|
public ApiResponse<List<OrderStatusMetaVO>> listOrderStatuses() {
|
||||||
return ApiResponse.success("获取订单状态列表成功", OrderStatusMetaSupport.allMeta());
|
return ApiResponse.success("获取订单状态列表成功", OrderStatusMetaSupport.allMeta());
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -23,7 +23,7 @@ public class PlatformDictController {
|
|||||||
|
|
||||||
@Operation(summary = "获取平台列表", description = "返回全部预置电商平台(code/label/sortOrder)")
|
@Operation(summary = "获取平台列表", description = "返回全部预置电商平台(code/label/sortOrder)")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@RequirePermission(value = "ecom:shop:read", description = "查询平台字典", allowSuper = true)
|
@RequirePermission(value = "ec:shop:read", description = "查询平台字典", allowSuper = true)
|
||||||
public ApiResponse<List<PlatformDictVO>> listPlatforms() {
|
public ApiResponse<List<PlatformDictVO>> listPlatforms() {
|
||||||
List<PlatformDictVO> list = PlatformCode.all().stream()
|
List<PlatformDictVO> list = PlatformCode.all().stream()
|
||||||
.sorted(Comparator.comparingInt(PlatformCode::getSortOrder))
|
.sorted(Comparator.comparingInt(PlatformCode::getSortOrder))
|
||||||
|
|||||||
+4
-4
@@ -33,7 +33,7 @@ public class ProductController {
|
|||||||
|
|
||||||
@Operation(summary = "创建商品", description = "创建新的商品;响应含 skuIdsCostChangedWithLinkedOrders:新增规格且规格编码非空、商品/运费/其他成本至少一项大于 0、且本公司在库中存在关联订单的规格ID(如同编码合并),用于提示同步成本")
|
@Operation(summary = "创建商品", description = "创建新的商品;响应含 skuIdsCostChangedWithLinkedOrders:新增规格且规格编码非空、商品/运费/其他成本至少一项大于 0、且本公司在库中存在关联订单的规格ID(如同编码合并),用于提示同步成本")
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@RequirePermission(value = "ecom:product:create", description = "创建商品", allowSuper = true)
|
@RequirePermission(value = "ec:product:create", description = "创建商品", allowSuper = true)
|
||||||
public ApiResponse<CreateProductResultDTO> createProduct(@Valid @RequestBody CreateProductDTO createProductDTO) {
|
public ApiResponse<CreateProductResultDTO> createProduct(@Valid @RequestBody CreateProductDTO createProductDTO) {
|
||||||
CreateProductResultDTO result = productService.createProduct(createProductDTO);
|
CreateProductResultDTO result = productService.createProduct(createProductDTO);
|
||||||
return ApiResponse.success("商品创建成功", result);
|
return ApiResponse.success("商品创建成功", result);
|
||||||
@@ -41,7 +41,7 @@ public class ProductController {
|
|||||||
|
|
||||||
@Operation(summary = "更新商品", description = "更新现有商品信息;响应中的 skuIdsCostChangedWithLinkedOrders 为「成本已变更且存在关联订单」的规格ID,用于提示同步成本")
|
@Operation(summary = "更新商品", description = "更新现有商品信息;响应中的 skuIdsCostChangedWithLinkedOrders 为「成本已变更且存在关联订单」的规格ID,用于提示同步成本")
|
||||||
@PutMapping("/update/{id}")
|
@PutMapping("/update/{id}")
|
||||||
@RequirePermission(value = "ecom:product:update", description = "更新商品", allowSuper = true)
|
@RequirePermission(value = "ec:product:update", description = "更新商品", allowSuper = true)
|
||||||
public ApiResponse<UpdateProductResultDTO> updateProduct(@Valid @RequestBody UpdateProductDTO updateProductDTO,
|
public ApiResponse<UpdateProductResultDTO> updateProduct(@Valid @RequestBody UpdateProductDTO updateProductDTO,
|
||||||
@Parameter(description = "商品ID") @PathVariable Long id) {
|
@Parameter(description = "商品ID") @PathVariable Long id) {
|
||||||
UpdateProductResultDTO result = productService.updateProduct(updateProductDTO, id);
|
UpdateProductResultDTO result = productService.updateProduct(updateProductDTO, id);
|
||||||
@@ -50,7 +50,7 @@ public class ProductController {
|
|||||||
|
|
||||||
@Operation(summary = "删除商品", description = "删除指定商品")
|
@Operation(summary = "删除商品", description = "删除指定商品")
|
||||||
@DeleteMapping("/delete/{id}")
|
@DeleteMapping("/delete/{id}")
|
||||||
@RequirePermission(value = "ecom:product:delete", description = "删除商品", allowSuper = true)
|
@RequirePermission(value = "ec:product:delete", description = "删除商品", allowSuper = true)
|
||||||
public ApiResponse<Void> deleteProduct(
|
public ApiResponse<Void> deleteProduct(
|
||||||
@Parameter(description = "商品ID") @PathVariable Long id) {
|
@Parameter(description = "商品ID") @PathVariable Long id) {
|
||||||
productService.deleteProduct(id);
|
productService.deleteProduct(id);
|
||||||
@@ -59,7 +59,7 @@ public class ProductController {
|
|||||||
|
|
||||||
@Operation(summary = "分页获取商品列表", description = "分页获取商品列表,支持条件过滤")
|
@Operation(summary = "分页获取商品列表", description = "分页获取商品列表,支持条件过滤")
|
||||||
@PostMapping("/list")
|
@PostMapping("/list")
|
||||||
@RequirePermission(value = "ecom:product:read", description = "查询商品列表", allowSuper = true)
|
@RequirePermission(value = "ec:product:read", description = "查询商品列表", allowSuper = true)
|
||||||
public ApiResponse<PageResultVO<ProductVO>> getProductPage(
|
public ApiResponse<PageResultVO<ProductVO>> getProductPage(
|
||||||
@Valid @RequestBody PageQueryDTO<ProductFilterDTO> pageQueryDTO) {
|
@Valid @RequestBody PageQueryDTO<ProductFilterDTO> pageQueryDTO) {
|
||||||
PageResultVO<ProductVO> result = productService.getProductPage(pageQueryDTO);
|
PageResultVO<ProductVO> result = productService.getProductPage(pageQueryDTO);
|
||||||
|
|||||||
+7
-7
@@ -40,7 +40,7 @@ public class ProductSkuController {
|
|||||||
|
|
||||||
@Operation(summary = "创建商品SKU")
|
@Operation(summary = "创建商品SKU")
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@RequirePermission(value = "ecom:product:create", description = "创建商品SKU", allowSuper = true)
|
@RequirePermission(value = "ec:product:create", description = "创建商品SKU", allowSuper = true)
|
||||||
public ApiResponse<ProductSkuVO> createProductSku(@Valid @RequestBody CreateProductSkuDTO dto) {
|
public ApiResponse<ProductSkuVO> createProductSku(@Valid @RequestBody CreateProductSkuDTO dto) {
|
||||||
ProductSkuVO vo = productSkuService.createProductSku(dto);
|
ProductSkuVO vo = productSkuService.createProductSku(dto);
|
||||||
return ApiResponse.success("SKU创建成功", vo);
|
return ApiResponse.success("SKU创建成功", vo);
|
||||||
@@ -48,7 +48,7 @@ public class ProductSkuController {
|
|||||||
|
|
||||||
@Operation(summary = "更新商品SKU")
|
@Operation(summary = "更新商品SKU")
|
||||||
@PutMapping("/update/{id}")
|
@PutMapping("/update/{id}")
|
||||||
@RequirePermission(value = "ecom:product:update", description = "更新商品SKU", allowSuper = true)
|
@RequirePermission(value = "ec:product:update", description = "更新商品SKU", allowSuper = true)
|
||||||
public ApiResponse<ProductSkuVO> updateProductSku(@Valid @RequestBody UpdateProductSkuDTO dto,
|
public ApiResponse<ProductSkuVO> updateProductSku(@Valid @RequestBody UpdateProductSkuDTO dto,
|
||||||
@Parameter(description = "商品SKU ID") @PathVariable Long id) {
|
@Parameter(description = "商品SKU ID") @PathVariable Long id) {
|
||||||
ProductSkuVO vo = productSkuService.updateProductSku(dto, id);
|
ProductSkuVO vo = productSkuService.updateProductSku(dto, id);
|
||||||
@@ -57,7 +57,7 @@ public class ProductSkuController {
|
|||||||
|
|
||||||
@Operation(summary = "删除商品SKU")
|
@Operation(summary = "删除商品SKU")
|
||||||
@DeleteMapping("/delete/{id}")
|
@DeleteMapping("/delete/{id}")
|
||||||
@RequirePermission(value = "ecom:product:delete", description = "删除商品SKU", allowSuper = true)
|
@RequirePermission(value = "ec:product:delete", description = "删除商品SKU", allowSuper = true)
|
||||||
public ApiResponse<Void> deleteProductSku(@Parameter(description = "商品SKU ID") @PathVariable Long id) {
|
public ApiResponse<Void> deleteProductSku(@Parameter(description = "商品SKU ID") @PathVariable Long id) {
|
||||||
productSkuService.deleteProductSku(id);
|
productSkuService.deleteProductSku(id);
|
||||||
return ApiResponse.<Void>success("SKU删除成功", null);
|
return ApiResponse.<Void>success("SKU删除成功", null);
|
||||||
@@ -65,7 +65,7 @@ public class ProductSkuController {
|
|||||||
|
|
||||||
@Operation(summary = "分页获取商品SKU列表")
|
@Operation(summary = "分页获取商品SKU列表")
|
||||||
@PostMapping("/list")
|
@PostMapping("/list")
|
||||||
@RequirePermission(value = "ecom:product:read", description = "查询商品SKU列表", allowSuper = true)
|
@RequirePermission(value = "ec:product:read", description = "查询商品SKU列表", allowSuper = true)
|
||||||
public ApiResponse<PageResultVO<ProductSkuVO>> getProductSkuPage(
|
public ApiResponse<PageResultVO<ProductSkuVO>> getProductSkuPage(
|
||||||
@Valid @RequestBody PageQueryDTO<ProductSkuFilterDTO> pageQueryDTO) {
|
@Valid @RequestBody PageQueryDTO<ProductSkuFilterDTO> pageQueryDTO) {
|
||||||
PageResultVO<ProductSkuVO> result = productSkuService.getProductSkuPage(pageQueryDTO);
|
PageResultVO<ProductSkuVO> result = productSkuService.getProductSkuPage(pageQueryDTO);
|
||||||
@@ -74,7 +74,7 @@ public class ProductSkuController {
|
|||||||
|
|
||||||
@Operation(summary = "根据ID列表批量查询商品SKU")
|
@Operation(summary = "根据ID列表批量查询商品SKU")
|
||||||
@PostMapping("/batch-get-by-ids")
|
@PostMapping("/batch-get-by-ids")
|
||||||
@RequirePermission(value = "ecom:product:read", description = "批量查询商品SKU", allowSuper = true)
|
@RequirePermission(value = "ec:product:read", description = "批量查询商品SKU", allowSuper = true)
|
||||||
public ApiResponse<List<ProductSkuVO>> batchGetByIds(@RequestBody List<Long> skuIds) {
|
public ApiResponse<List<ProductSkuVO>> batchGetByIds(@RequestBody List<Long> skuIds) {
|
||||||
List<ProductSkuPO> skus = productSkuService.getByIds(skuIds);
|
List<ProductSkuPO> skus = productSkuService.getByIds(skuIds);
|
||||||
Long companyId = currentUserContext.getCurrentCompanyId();
|
Long companyId = currentUserContext.getCurrentCompanyId();
|
||||||
@@ -87,7 +87,7 @@ public class ProductSkuController {
|
|||||||
|
|
||||||
@Operation(summary = "根据商品名称和SKU编码精准查询")
|
@Operation(summary = "根据商品名称和SKU编码精准查询")
|
||||||
@GetMapping("/find-by-product-and-sku/{productName}/{skuCode}")
|
@GetMapping("/find-by-product-and-sku/{productName}/{skuCode}")
|
||||||
@RequirePermission(value = "ecom:product:read", description = "根据商品名称和SKU编码查询", allowSuper = true)
|
@RequirePermission(value = "ec:product:read", description = "根据商品名称和SKU编码查询", allowSuper = true)
|
||||||
public ApiResponse<ProductSkuVO> getProductSkuByProductAndSku(
|
public ApiResponse<ProductSkuVO> getProductSkuByProductAndSku(
|
||||||
@Parameter(description = "商品名称") @PathVariable String productName,
|
@Parameter(description = "商品名称") @PathVariable String productName,
|
||||||
@Parameter(description = "SKU编码") @PathVariable String skuCode) {
|
@Parameter(description = "SKU编码") @PathVariable String skuCode) {
|
||||||
@@ -97,7 +97,7 @@ public class ProductSkuController {
|
|||||||
|
|
||||||
@Operation(summary = "批量根据商品名称和SKU编码查询")
|
@Operation(summary = "批量根据商品名称和SKU编码查询")
|
||||||
@PostMapping("/find-by-product-and-skus")
|
@PostMapping("/find-by-product-and-skus")
|
||||||
@RequirePermission(value = "ecom:product:read", description = "批量根据商品名称和SKU编码查询", allowSuper = true)
|
@RequirePermission(value = "ec:product:read", description = "批量根据商品名称和SKU编码查询", allowSuper = true)
|
||||||
public ApiResponse<List<ProductVO>> getProductSkusByProductAndSkus(@RequestBody List<ProductSkuQueryDTO> queries) {
|
public ApiResponse<List<ProductVO>> getProductSkusByProductAndSkus(@RequestBody List<ProductSkuQueryDTO> queries) {
|
||||||
List<ProductVO> productVOs = productSkuService.getProductSkusByProductAndSkus(queries);
|
List<ProductVO> productVOs = productSkuService.getProductSkusByProductAndSkus(queries);
|
||||||
return ApiResponse.success("批量查询SKU成功", productVOs);
|
return ApiResponse.success("批量查询SKU成功", productVOs);
|
||||||
|
|||||||
+5
-5
@@ -46,7 +46,7 @@ public class ProductSkuCostController {
|
|||||||
|
|
||||||
@Operation(summary = "查询SKU成本历史")
|
@Operation(summary = "查询SKU成本历史")
|
||||||
@GetMapping("/{skuId}")
|
@GetMapping("/{skuId}")
|
||||||
@RequirePermission(value = "ecom:product:read", description = "查询SKU成本历史", allowSuper = true)
|
@RequirePermission(value = "ec:product:read", description = "查询SKU成本历史", allowSuper = true)
|
||||||
public ApiResponse<List<ProductSkuCostHistoryVO>> listSkuCosts(
|
public ApiResponse<List<ProductSkuCostHistoryVO>> listSkuCosts(
|
||||||
@Parameter(description = "SKU ID") @PathVariable Long skuId) {
|
@Parameter(description = "SKU ID") @PathVariable Long skuId) {
|
||||||
ProductSkuPO sku = requireCompanySku(skuId);
|
ProductSkuPO sku = requireCompanySku(skuId);
|
||||||
@@ -55,7 +55,7 @@ public class ProductSkuCostController {
|
|||||||
|
|
||||||
@Operation(summary = "SKU调价(按生效日追加/同日纠错)")
|
@Operation(summary = "SKU调价(按生效日追加/同日纠错)")
|
||||||
@PostMapping("/{skuId}")
|
@PostMapping("/{skuId}")
|
||||||
@RequirePermission(value = "ecom:product:update", description = "SKU调价", allowSuper = true)
|
@RequirePermission(value = "ec:product:update", description = "SKU调价", allowSuper = true)
|
||||||
public ApiResponse<ProductSkuVO> adjustSkuCost(
|
public ApiResponse<ProductSkuVO> adjustSkuCost(
|
||||||
@Parameter(description = "SKU ID") @PathVariable Long skuId,
|
@Parameter(description = "SKU ID") @PathVariable Long skuId,
|
||||||
@Valid @RequestBody AdjustSkuCostDTO dto) {
|
@Valid @RequestBody AdjustSkuCostDTO dto) {
|
||||||
@@ -73,7 +73,7 @@ public class ProductSkuCostController {
|
|||||||
|
|
||||||
@Operation(summary = "同步SKU成本到历史订单")
|
@Operation(summary = "同步SKU成本到历史订单")
|
||||||
@PostMapping("/sync-to-orders")
|
@PostMapping("/sync-to-orders")
|
||||||
@RequirePermission(value = "ecom:product:update", description = "同步成本到订单", allowSuper = true)
|
@RequirePermission(value = "ec:product:update", description = "同步成本到订单", allowSuper = true)
|
||||||
public ApiResponse<Integer> syncCostsToOrders(@Valid @RequestBody SyncCostDTO syncCostDTO) {
|
public ApiResponse<Integer> syncCostsToOrders(@Valid @RequestBody SyncCostDTO syncCostDTO) {
|
||||||
requireCompanySku(syncCostDTO.getSkuId());
|
requireCompanySku(syncCostDTO.getSkuId());
|
||||||
int updatedCount = orderService.syncCostsToOrders(
|
int updatedCount = orderService.syncCostsToOrders(
|
||||||
@@ -88,7 +88,7 @@ public class ProductSkuCostController {
|
|||||||
|
|
||||||
@Operation(summary = "统计成本同步将影响的订单数量")
|
@Operation(summary = "统计成本同步将影响的订单数量")
|
||||||
@PostMapping("/count-orders-for-sync")
|
@PostMapping("/count-orders-for-sync")
|
||||||
@RequirePermission(value = "ecom:product:read", description = "统计成本同步订单数", allowSuper = true)
|
@RequirePermission(value = "ec:product:read", description = "统计成本同步订单数", allowSuper = true)
|
||||||
public ApiResponse<Long> countOrdersForCostSync(@Valid @RequestBody BatchSyncCostDTO batchSyncCostDTO) {
|
public ApiResponse<Long> countOrdersForCostSync(@Valid @RequestBody BatchSyncCostDTO batchSyncCostDTO) {
|
||||||
Long companyId = currentUserContext.getCurrentCompanyId();
|
Long companyId = currentUserContext.getCurrentCompanyId();
|
||||||
List<ProductSkuPO> skus = productSkuService.getByIds(batchSyncCostDTO.getSkuIds());
|
List<ProductSkuPO> skus = productSkuService.getByIds(batchSyncCostDTO.getSkuIds());
|
||||||
@@ -110,7 +110,7 @@ public class ProductSkuCostController {
|
|||||||
|
|
||||||
@Operation(summary = "批量同步SKU当前生效成本到历史订单")
|
@Operation(summary = "批量同步SKU当前生效成本到历史订单")
|
||||||
@PostMapping("/batch-sync-to-orders")
|
@PostMapping("/batch-sync-to-orders")
|
||||||
@RequirePermission(value = "ecom:product:update", description = "批量同步成本到订单", allowSuper = true)
|
@RequirePermission(value = "ec:product:update", description = "批量同步成本到订单", allowSuper = true)
|
||||||
public ApiResponse<Integer> batchSyncCostsToOrders(@Valid @RequestBody BatchSyncCostDTO batchSyncCostDTO) {
|
public ApiResponse<Integer> batchSyncCostsToOrders(@Valid @RequestBody BatchSyncCostDTO batchSyncCostDTO) {
|
||||||
Long companyId = currentUserContext.getCurrentCompanyId();
|
Long companyId = currentUserContext.getCurrentCompanyId();
|
||||||
List<ProductSkuPO> skus = productSkuService.getByIds(batchSyncCostDTO.getSkuIds());
|
List<ProductSkuPO> skus = productSkuService.getByIds(batchSyncCostDTO.getSkuIds());
|
||||||
|
|||||||
+6
-6
@@ -33,7 +33,7 @@ public class PromotionFeeController {
|
|||||||
|
|
||||||
@PostMapping
|
@PostMapping
|
||||||
@Operation(summary = "创建推广费记录", description = "创建新的推广费记录")
|
@Operation(summary = "创建推广费记录", description = "创建新的推广费记录")
|
||||||
@RequirePermission(value = "ecom:order:create", description = "创建推广费记录", allowSuper = true)
|
@RequirePermission(value = "ec:order:create", description = "创建推广费记录", allowSuper = true)
|
||||||
public ApiResponse<Long> createPromotionFee(@Valid @RequestBody CreatePromotionFeeDTO dto) {
|
public ApiResponse<Long> createPromotionFee(@Valid @RequestBody CreatePromotionFeeDTO dto) {
|
||||||
Long id = promotionFeeService.createPromotionFee(dto);
|
Long id = promotionFeeService.createPromotionFee(dto);
|
||||||
return ApiResponse.success("推广费记录创建成功", id);
|
return ApiResponse.success("推广费记录创建成功", id);
|
||||||
@@ -41,7 +41,7 @@ public class PromotionFeeController {
|
|||||||
|
|
||||||
@PutMapping
|
@PutMapping
|
||||||
@Operation(summary = "更新推广费记录", description = "更新推广费记录信息")
|
@Operation(summary = "更新推广费记录", description = "更新推广费记录信息")
|
||||||
@RequirePermission(value = "ecom:order:update", description = "更新推广费记录", allowSuper = true)
|
@RequirePermission(value = "ec:order:update", description = "更新推广费记录", allowSuper = true)
|
||||||
public ApiResponse<Void> updatePromotionFee(@Valid @RequestBody UpdatePromotionFeeDTO dto) {
|
public ApiResponse<Void> updatePromotionFee(@Valid @RequestBody UpdatePromotionFeeDTO dto) {
|
||||||
promotionFeeService.updatePromotionFee(dto);
|
promotionFeeService.updatePromotionFee(dto);
|
||||||
return ApiResponse.success("推广费记录更新成功");
|
return ApiResponse.success("推广费记录更新成功");
|
||||||
@@ -49,7 +49,7 @@ public class PromotionFeeController {
|
|||||||
|
|
||||||
@DeleteMapping("/{id}")
|
@DeleteMapping("/{id}")
|
||||||
@Operation(summary = "删除推广费记录", description = "删除指定的推广费记录")
|
@Operation(summary = "删除推广费记录", description = "删除指定的推广费记录")
|
||||||
@RequirePermission(value = "ecom:order:delete", description = "删除推广费记录", allowSuper = true)
|
@RequirePermission(value = "ec:order:delete", description = "删除推广费记录", allowSuper = true)
|
||||||
public ApiResponse<Void> deletePromotionFee(
|
public ApiResponse<Void> deletePromotionFee(
|
||||||
@Parameter(description = "记录ID", required = true) @PathVariable Long id) {
|
@Parameter(description = "记录ID", required = true) @PathVariable Long id) {
|
||||||
promotionFeeService.deletePromotionFee(id);
|
promotionFeeService.deletePromotionFee(id);
|
||||||
@@ -58,7 +58,7 @@ public class PromotionFeeController {
|
|||||||
|
|
||||||
@GetMapping("/{id}")
|
@GetMapping("/{id}")
|
||||||
@Operation(summary = "查询推广费记录详情", description = "根据ID查询推广费记录详情")
|
@Operation(summary = "查询推广费记录详情", description = "根据ID查询推广费记录详情")
|
||||||
@RequirePermission(value = "ecom:order:read", description = "查询推广费记录详情", allowSuper = true)
|
@RequirePermission(value = "ec:order:read", description = "查询推广费记录详情", allowSuper = true)
|
||||||
public ApiResponse<PromotionFeeVO> getPromotionFeeById(
|
public ApiResponse<PromotionFeeVO> getPromotionFeeById(
|
||||||
@Parameter(description = "记录ID", required = true) @PathVariable Long id) {
|
@Parameter(description = "记录ID", required = true) @PathVariable Long id) {
|
||||||
PromotionFeeVO vo = promotionFeeService.getPromotionFeeById(id);
|
PromotionFeeVO vo = promotionFeeService.getPromotionFeeById(id);
|
||||||
@@ -67,7 +67,7 @@ public class PromotionFeeController {
|
|||||||
|
|
||||||
@PostMapping("/list")
|
@PostMapping("/list")
|
||||||
@Operation(summary = "分页查询推广费记录", description = "分页查询推广费记录列表")
|
@Operation(summary = "分页查询推广费记录", description = "分页查询推广费记录列表")
|
||||||
@RequirePermission(value = "ecom:order:read", description = "查询推广费记录列表", allowSuper = true)
|
@RequirePermission(value = "ec:order:read", description = "查询推广费记录列表", allowSuper = true)
|
||||||
public ApiResponse<PageResultVO<PromotionFeeVO>> getPromotionFeePage(
|
public ApiResponse<PageResultVO<PromotionFeeVO>> getPromotionFeePage(
|
||||||
@Valid @RequestBody PageQueryDTO<PromotionFeeFilterDTO> pageQueryDTO) {
|
@Valid @RequestBody PageQueryDTO<PromotionFeeFilterDTO> pageQueryDTO) {
|
||||||
PageResultVO<PromotionFeeVO> result = promotionFeeService.getPromotionFeePage(pageQueryDTO);
|
PageResultVO<PromotionFeeVO> result = promotionFeeService.getPromotionFeePage(pageQueryDTO);
|
||||||
@@ -76,7 +76,7 @@ public class PromotionFeeController {
|
|||||||
|
|
||||||
@GetMapping("/fields")
|
@GetMapping("/fields")
|
||||||
@Operation(summary = "获取推广费导入字段定义", description = "获取推广费导入时可映射的系统字段列表")
|
@Operation(summary = "获取推广费导入字段定义", description = "获取推广费导入时可映射的系统字段列表")
|
||||||
@RequirePermission(value = "ecom:order:read", description = "查询导入字段", allowSuper = true)
|
@RequirePermission(value = "ec:order:read", description = "查询导入字段", allowSuper = true)
|
||||||
public ApiResponse<List<PromotionFeeFieldVO>> getPromotionFeeFields() {
|
public ApiResponse<List<PromotionFeeFieldVO>> getPromotionFeeFields() {
|
||||||
return ApiResponse.success("获取推广费导入字段成功", PromotionFeeFieldConstants.FIELDS);
|
return ApiResponse.success("获取推广费导入字段成功", PromotionFeeFieldConstants.FIELDS);
|
||||||
}
|
}
|
||||||
|
|||||||
+7
-7
@@ -28,7 +28,7 @@ public class PromotionFeeTypeController {
|
|||||||
|
|
||||||
@PostMapping
|
@PostMapping
|
||||||
@Operation(summary = "创建推广费类型", description = "创建新的推广费类型")
|
@Operation(summary = "创建推广费类型", description = "创建新的推广费类型")
|
||||||
@RequirePermission(value = "ecom:order:create", description = "创建推广费类型", allowSuper = true)
|
@RequirePermission(value = "ec:order:create", description = "创建推广费类型", allowSuper = true)
|
||||||
public ApiResponse<Long> createPromotionFeeType(@Valid @RequestBody CreatePromotionFeeTypeDTO dto) {
|
public ApiResponse<Long> createPromotionFeeType(@Valid @RequestBody CreatePromotionFeeTypeDTO dto) {
|
||||||
Long id = promotionFeeTypeService.createPromotionFeeType(dto);
|
Long id = promotionFeeTypeService.createPromotionFeeType(dto);
|
||||||
return ApiResponse.success("推广费类型创建成功", id);
|
return ApiResponse.success("推广费类型创建成功", id);
|
||||||
@@ -36,7 +36,7 @@ public class PromotionFeeTypeController {
|
|||||||
|
|
||||||
@PutMapping
|
@PutMapping
|
||||||
@Operation(summary = "更新推广费类型", description = "更新推广费类型信息")
|
@Operation(summary = "更新推广费类型", description = "更新推广费类型信息")
|
||||||
@RequirePermission(value = "ecom:order:update", description = "更新推广费类型", allowSuper = true)
|
@RequirePermission(value = "ec:order:update", description = "更新推广费类型", allowSuper = true)
|
||||||
public ApiResponse<Void> updatePromotionFeeType(@Valid @RequestBody UpdatePromotionFeeTypeDTO dto) {
|
public ApiResponse<Void> updatePromotionFeeType(@Valid @RequestBody UpdatePromotionFeeTypeDTO dto) {
|
||||||
promotionFeeTypeService.updatePromotionFeeType(dto);
|
promotionFeeTypeService.updatePromotionFeeType(dto);
|
||||||
return ApiResponse.success("推广费类型更新成功");
|
return ApiResponse.success("推广费类型更新成功");
|
||||||
@@ -44,7 +44,7 @@ public class PromotionFeeTypeController {
|
|||||||
|
|
||||||
@DeleteMapping("/{id}")
|
@DeleteMapping("/{id}")
|
||||||
@Operation(summary = "删除推广费类型", description = "删除指定的推广费类型")
|
@Operation(summary = "删除推广费类型", description = "删除指定的推广费类型")
|
||||||
@RequirePermission(value = "ecom:order:delete", description = "删除推广费类型", allowSuper = true)
|
@RequirePermission(value = "ec:order:delete", description = "删除推广费类型", allowSuper = true)
|
||||||
public ApiResponse<Void> deletePromotionFeeType(
|
public ApiResponse<Void> deletePromotionFeeType(
|
||||||
@Parameter(description = "类型ID", required = true) @PathVariable Long id) {
|
@Parameter(description = "类型ID", required = true) @PathVariable Long id) {
|
||||||
promotionFeeTypeService.deletePromotionFeeType(id);
|
promotionFeeTypeService.deletePromotionFeeType(id);
|
||||||
@@ -53,7 +53,7 @@ public class PromotionFeeTypeController {
|
|||||||
|
|
||||||
@GetMapping("/{id}")
|
@GetMapping("/{id}")
|
||||||
@Operation(summary = "查询推广费类型详情", description = "根据ID查询推广费类型详情")
|
@Operation(summary = "查询推广费类型详情", description = "根据ID查询推广费类型详情")
|
||||||
@RequirePermission(value = "ecom:order:read", description = "查询推广费类型详情", allowSuper = true)
|
@RequirePermission(value = "ec:order:read", description = "查询推广费类型详情", allowSuper = true)
|
||||||
public ApiResponse<PromotionFeeTypeVO> getPromotionFeeTypeById(
|
public ApiResponse<PromotionFeeTypeVO> getPromotionFeeTypeById(
|
||||||
@Parameter(description = "类型ID", required = true) @PathVariable Long id) {
|
@Parameter(description = "类型ID", required = true) @PathVariable Long id) {
|
||||||
PromotionFeeTypeVO vo = promotionFeeTypeService.getPromotionFeeTypeById(id);
|
PromotionFeeTypeVO vo = promotionFeeTypeService.getPromotionFeeTypeById(id);
|
||||||
@@ -62,7 +62,7 @@ public class PromotionFeeTypeController {
|
|||||||
|
|
||||||
@GetMapping("/active")
|
@GetMapping("/active")
|
||||||
@Operation(summary = "查询启用的推广费类型列表", description = "查询所有启用的推广费类型")
|
@Operation(summary = "查询启用的推广费类型列表", description = "查询所有启用的推广费类型")
|
||||||
@RequirePermission(value = "ecom:order:read", description = "查询启用的推广费类型", allowSuper = true)
|
@RequirePermission(value = "ec:order:read", description = "查询启用的推广费类型", allowSuper = true)
|
||||||
public ApiResponse<List<PromotionFeeTypeVO>> getActivePromotionFeeTypeList() {
|
public ApiResponse<List<PromotionFeeTypeVO>> getActivePromotionFeeTypeList() {
|
||||||
List<PromotionFeeTypeVO> list = promotionFeeTypeService.getActivePromotionFeeTypeList();
|
List<PromotionFeeTypeVO> list = promotionFeeTypeService.getActivePromotionFeeTypeList();
|
||||||
return ApiResponse.success("获取启用的推广费类型列表成功", list);
|
return ApiResponse.success("获取启用的推广费类型列表成功", list);
|
||||||
@@ -70,7 +70,7 @@ public class PromotionFeeTypeController {
|
|||||||
|
|
||||||
@GetMapping("/all")
|
@GetMapping("/all")
|
||||||
@Operation(summary = "查询所有推广费类型列表", description = "查询所有推广费类型(包括禁用的)")
|
@Operation(summary = "查询所有推广费类型列表", description = "查询所有推广费类型(包括禁用的)")
|
||||||
@RequirePermission(value = "ecom:order:read", description = "查询所有推广费类型", allowSuper = true)
|
@RequirePermission(value = "ec:order:read", description = "查询所有推广费类型", allowSuper = true)
|
||||||
public ApiResponse<List<PromotionFeeTypeVO>> getAllPromotionFeeTypeList() {
|
public ApiResponse<List<PromotionFeeTypeVO>> getAllPromotionFeeTypeList() {
|
||||||
List<PromotionFeeTypeVO> list = promotionFeeTypeService.getAllPromotionFeeTypeList();
|
List<PromotionFeeTypeVO> list = promotionFeeTypeService.getAllPromotionFeeTypeList();
|
||||||
return ApiResponse.success("获取所有推广费类型列表成功", list);
|
return ApiResponse.success("获取所有推广费类型列表成功", list);
|
||||||
@@ -78,7 +78,7 @@ public class PromotionFeeTypeController {
|
|||||||
|
|
||||||
@PostMapping("/init")
|
@PostMapping("/init")
|
||||||
@Operation(summary = "初始化推广费类型数据", description = "为当前公司初始化默认的推广费类型数据")
|
@Operation(summary = "初始化推广费类型数据", description = "为当前公司初始化默认的推广费类型数据")
|
||||||
@RequirePermission(value = "ecom:order:create", description = "初始化推广费类型", allowSuper = true)
|
@RequirePermission(value = "ec:order:create", description = "初始化推广费类型", allowSuper = true)
|
||||||
public ApiResponse<Void> initPromotionFeeType() {
|
public ApiResponse<Void> initPromotionFeeType() {
|
||||||
promotionFeeTypeService.initPromotionFeeTypeForCurrentCompany();
|
promotionFeeTypeService.initPromotionFeeTypeForCurrentCompany();
|
||||||
return ApiResponse.success("推广费类型初始化成功");
|
return ApiResponse.success("推广费类型初始化成功");
|
||||||
|
|||||||
+7
-7
@@ -37,7 +37,7 @@ public class ShopController {
|
|||||||
|
|
||||||
@Operation(summary = "创建店铺", description = "创建新的店铺")
|
@Operation(summary = "创建店铺", description = "创建新的店铺")
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@RequirePermission(value = "ecom:shop:manage", description = "创建店铺", allowSuper = true)
|
@RequirePermission(value = "ec:shop:manage", description = "创建店铺", allowSuper = true)
|
||||||
public ApiResponse<ShopVO> createShop(@Valid @RequestBody CreateShopDTO createShopDTO) {
|
public ApiResponse<ShopVO> createShop(@Valid @RequestBody CreateShopDTO createShopDTO) {
|
||||||
ShopVO shopVO = shopService.createShop(createShopDTO);
|
ShopVO shopVO = shopService.createShop(createShopDTO);
|
||||||
return ApiResponse.success("店铺创建成功", shopVO);
|
return ApiResponse.success("店铺创建成功", shopVO);
|
||||||
@@ -45,7 +45,7 @@ public class ShopController {
|
|||||||
|
|
||||||
@Operation(summary = "更新店铺", description = "更新现有店铺信息")
|
@Operation(summary = "更新店铺", description = "更新现有店铺信息")
|
||||||
@PutMapping("/update/{id}")
|
@PutMapping("/update/{id}")
|
||||||
@RequirePermission(value = "ecom:shop:manage", description = "更新店铺", allowSuper = true)
|
@RequirePermission(value = "ec:shop:manage", description = "更新店铺", allowSuper = true)
|
||||||
public ApiResponse<ShopVO> updateShop(@Valid @RequestBody UpdateShopDTO updateShopDTO,
|
public ApiResponse<ShopVO> updateShop(@Valid @RequestBody UpdateShopDTO updateShopDTO,
|
||||||
@Parameter(description = "店铺ID") @PathVariable Long id) {
|
@Parameter(description = "店铺ID") @PathVariable Long id) {
|
||||||
ShopVO shopVO = shopService.updateShop(updateShopDTO, id);
|
ShopVO shopVO = shopService.updateShop(updateShopDTO, id);
|
||||||
@@ -54,7 +54,7 @@ public class ShopController {
|
|||||||
|
|
||||||
@Operation(summary = "删除店铺", description = "删除指定店铺")
|
@Operation(summary = "删除店铺", description = "删除指定店铺")
|
||||||
@DeleteMapping("/delete/{id}")
|
@DeleteMapping("/delete/{id}")
|
||||||
@RequirePermission(value = "ecom:shop:manage", description = "删除店铺", allowSuper = true)
|
@RequirePermission(value = "ec:shop:manage", description = "删除店铺", allowSuper = true)
|
||||||
public ApiResponse<Void> deleteShop(
|
public ApiResponse<Void> deleteShop(
|
||||||
@Parameter(description = "店铺ID") @PathVariable Long id) {
|
@Parameter(description = "店铺ID") @PathVariable Long id) {
|
||||||
shopService.deleteShop(id);
|
shopService.deleteShop(id);
|
||||||
@@ -63,7 +63,7 @@ public class ShopController {
|
|||||||
|
|
||||||
@Operation(summary = "分页获取店铺列表", description = "分页获取店铺列表;已绑定外部店时仅附带渠道店简要信息(id/名称/logo 等),详情请调渠道店铺详情接口")
|
@Operation(summary = "分页获取店铺列表", description = "分页获取店铺列表;已绑定外部店时仅附带渠道店简要信息(id/名称/logo 等),详情请调渠道店铺详情接口")
|
||||||
@PostMapping("/list")
|
@PostMapping("/list")
|
||||||
@RequirePermission(value = "ecom:shop:read", description = "查询店铺列表", allowSuper = true)
|
@RequirePermission(value = "ec:shop:read", description = "查询店铺列表", allowSuper = true)
|
||||||
public ApiResponse<PageResultVO<ShopVO>> getShopPage(
|
public ApiResponse<PageResultVO<ShopVO>> getShopPage(
|
||||||
@Valid @RequestBody PageQueryDTO<ShopFilterDTO> pageQueryDTO) {
|
@Valid @RequestBody PageQueryDTO<ShopFilterDTO> pageQueryDTO) {
|
||||||
PageResultVO<ShopVO> result = shopService.getShopPage(pageQueryDTO);
|
PageResultVO<ShopVO> result = shopService.getShopPage(pageQueryDTO);
|
||||||
@@ -72,7 +72,7 @@ public class ShopController {
|
|||||||
|
|
||||||
@Operation(summary = "店铺详情", description = "根据内部店铺ID获取详情;按 platformCode 嵌套平台店铺简要信息,完整渠道店/授权请再调渠道店铺详情")
|
@Operation(summary = "店铺详情", description = "根据内部店铺ID获取详情;按 platformCode 嵌套平台店铺简要信息,完整渠道店/授权请再调渠道店铺详情")
|
||||||
@GetMapping("/detail/{id}")
|
@GetMapping("/detail/{id}")
|
||||||
@RequirePermission(value = "ecom:shop:read", description = "查询店铺详情", allowSuper = true)
|
@RequirePermission(value = "ec:shop:read", description = "查询店铺详情", allowSuper = true)
|
||||||
public ApiResponse<ShopVO> getShopDetail(@Parameter(description = "店铺ID") @PathVariable Long id) {
|
public ApiResponse<ShopVO> getShopDetail(@Parameter(description = "店铺ID") @PathVariable Long id) {
|
||||||
ShopVO vo = shopService.getShopDetail(id);
|
ShopVO vo = shopService.getShopDetail(id);
|
||||||
return ApiResponse.success("获取成功", vo);
|
return ApiResponse.success("获取成功", vo);
|
||||||
@@ -80,7 +80,7 @@ public class ShopController {
|
|||||||
|
|
||||||
@Operation(summary = "上传店铺Logo", description = "上传店铺Logo图片,支持跨公司共享")
|
@Operation(summary = "上传店铺Logo", description = "上传店铺Logo图片,支持跨公司共享")
|
||||||
@PostMapping("/upload-logo")
|
@PostMapping("/upload-logo")
|
||||||
@RequirePermission(value = "ecom:shop:manage", description = "上传店铺Logo", allowSuper = true)
|
@RequirePermission(value = "ec:shop:manage", description = "上传店铺Logo", allowSuper = true)
|
||||||
public ApiResponse<SysFileUploadVO> uploadLogo(@RequestParam("file") MultipartFile file) {
|
public ApiResponse<SysFileUploadVO> uploadLogo(@RequestParam("file") MultipartFile file) {
|
||||||
// 检查是否为图片文件
|
// 检查是否为图片文件
|
||||||
if (!FileUploadUtils.isImageFile(file.getOriginalFilename())) {
|
if (!FileUploadUtils.isImageFile(file.getOriginalFilename())) {
|
||||||
@@ -93,7 +93,7 @@ public class ShopController {
|
|||||||
|
|
||||||
@Operation(summary = "分页获取店铺商品信息", description = "通过中间表分页获取店铺商品信息,包含商品基本信息和规格列表")
|
@Operation(summary = "分页获取店铺商品信息", description = "通过中间表分页获取店铺商品信息,包含商品基本信息和规格列表")
|
||||||
@PostMapping("/products/list")
|
@PostMapping("/products/list")
|
||||||
@RequirePermission(value = "ecom:shop:read", description = "查询店铺商品列表", allowSuper = true)
|
@RequirePermission(value = "ec:shop:read", description = "查询店铺商品列表", allowSuper = true)
|
||||||
public ApiResponse<PageResultVO<ProductVO>> getShopProductPage(
|
public ApiResponse<PageResultVO<ProductVO>> getShopProductPage(
|
||||||
@Valid @RequestBody PageQueryDTO<ShopProductPageFilterDTO> pageQueryDTO) {
|
@Valid @RequestBody PageQueryDTO<ShopProductPageFilterDTO> pageQueryDTO) {
|
||||||
PageResultVO<ProductVO> result = shopService.getShopProductPage(pageQueryDTO);
|
PageResultVO<ProductVO> result = shopService.getShopProductPage(pageQueryDTO);
|
||||||
|
|||||||
+5
-5
@@ -31,7 +31,7 @@ public class ShopMonthlyTargetController {
|
|||||||
|
|
||||||
@Operation(summary = "创建店铺月销量目标", description = "创建新的店铺月销量目标")
|
@Operation(summary = "创建店铺月销量目标", description = "创建新的店铺月销量目标")
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@RequirePermission(value = "ecom:shop:manage", description = "创建店铺月销量目标", allowSuper = true)
|
@RequirePermission(value = "ec:shop:manage", description = "创建店铺月销量目标", allowSuper = true)
|
||||||
public ApiResponse<ShopMonthlyTargetVO> createShopMonthlyTarget(@Valid @RequestBody CreateShopMonthlyTargetDTO createDTO) {
|
public ApiResponse<ShopMonthlyTargetVO> createShopMonthlyTarget(@Valid @RequestBody CreateShopMonthlyTargetDTO createDTO) {
|
||||||
ShopMonthlyTargetVO vo = shopMonthlyTargetService.createShopMonthlyTarget(createDTO);
|
ShopMonthlyTargetVO vo = shopMonthlyTargetService.createShopMonthlyTarget(createDTO);
|
||||||
return ApiResponse.success("店铺月销量目标创建成功", vo);
|
return ApiResponse.success("店铺月销量目标创建成功", vo);
|
||||||
@@ -39,7 +39,7 @@ public class ShopMonthlyTargetController {
|
|||||||
|
|
||||||
@Operation(summary = "更新店铺月销量目标", description = "更新现有店铺月销量目标信息")
|
@Operation(summary = "更新店铺月销量目标", description = "更新现有店铺月销量目标信息")
|
||||||
@PutMapping("/update/{id}")
|
@PutMapping("/update/{id}")
|
||||||
@RequirePermission(value = "ecom:shop:manage", description = "更新店铺月销量目标", allowSuper = true)
|
@RequirePermission(value = "ec:shop:manage", description = "更新店铺月销量目标", allowSuper = true)
|
||||||
public ApiResponse<ShopMonthlyTargetVO> updateShopMonthlyTarget(@Valid @RequestBody UpdateShopMonthlyTargetDTO updateDTO,
|
public ApiResponse<ShopMonthlyTargetVO> updateShopMonthlyTarget(@Valid @RequestBody UpdateShopMonthlyTargetDTO updateDTO,
|
||||||
@Parameter(description = "目标ID") @PathVariable Long id) {
|
@Parameter(description = "目标ID") @PathVariable Long id) {
|
||||||
ShopMonthlyTargetVO vo = shopMonthlyTargetService.updateShopMonthlyTarget(updateDTO, id);
|
ShopMonthlyTargetVO vo = shopMonthlyTargetService.updateShopMonthlyTarget(updateDTO, id);
|
||||||
@@ -48,7 +48,7 @@ public class ShopMonthlyTargetController {
|
|||||||
|
|
||||||
@Operation(summary = "删除店铺月销量目标", description = "删除指定店铺月销量目标")
|
@Operation(summary = "删除店铺月销量目标", description = "删除指定店铺月销量目标")
|
||||||
@DeleteMapping("/delete/{id}")
|
@DeleteMapping("/delete/{id}")
|
||||||
@RequirePermission(value = "ecom:shop:manage", description = "删除店铺月销量目标", allowSuper = true)
|
@RequirePermission(value = "ec:shop:manage", description = "删除店铺月销量目标", allowSuper = true)
|
||||||
public ApiResponse<Void> deleteShopMonthlyTarget(
|
public ApiResponse<Void> deleteShopMonthlyTarget(
|
||||||
@Parameter(description = "目标ID") @PathVariable Long id) {
|
@Parameter(description = "目标ID") @PathVariable Long id) {
|
||||||
shopMonthlyTargetService.deleteShopMonthlyTarget(id);
|
shopMonthlyTargetService.deleteShopMonthlyTarget(id);
|
||||||
@@ -57,7 +57,7 @@ public class ShopMonthlyTargetController {
|
|||||||
|
|
||||||
@Operation(summary = "分页获取店铺月销量目标列表", description = "分页获取店铺月销量目标列表,支持条件过滤")
|
@Operation(summary = "分页获取店铺月销量目标列表", description = "分页获取店铺月销量目标列表,支持条件过滤")
|
||||||
@PostMapping("/list")
|
@PostMapping("/list")
|
||||||
@RequirePermission(value = "ecom:shop:read", description = "查询店铺月销量目标列表", allowSuper = true)
|
@RequirePermission(value = "ec:shop:read", description = "查询店铺月销量目标列表", allowSuper = true)
|
||||||
public ApiResponse<PageResultVO<ShopMonthlyTargetVO>> getShopMonthlyTargetPage(
|
public ApiResponse<PageResultVO<ShopMonthlyTargetVO>> getShopMonthlyTargetPage(
|
||||||
@Valid @RequestBody PageQueryDTO<ShopMonthlyTargetFilterDTO> pageQueryDTO) {
|
@Valid @RequestBody PageQueryDTO<ShopMonthlyTargetFilterDTO> pageQueryDTO) {
|
||||||
PageResultVO<ShopMonthlyTargetVO> result = shopMonthlyTargetService.getShopMonthlyTargetPage(pageQueryDTO);
|
PageResultVO<ShopMonthlyTargetVO> result = shopMonthlyTargetService.getShopMonthlyTargetPage(pageQueryDTO);
|
||||||
@@ -66,7 +66,7 @@ public class ShopMonthlyTargetController {
|
|||||||
|
|
||||||
@Operation(summary = "获取店铺月销量目标详情", description = "根据ID获取店铺月销量目标详情")
|
@Operation(summary = "获取店铺月销量目标详情", description = "根据ID获取店铺月销量目标详情")
|
||||||
@GetMapping("/detail/{id}")
|
@GetMapping("/detail/{id}")
|
||||||
@RequirePermission(value = "ecom:shop:read", description = "查询店铺月销量目标详情", allowSuper = true)
|
@RequirePermission(value = "ec:shop:read", description = "查询店铺月销量目标详情", allowSuper = true)
|
||||||
public ApiResponse<ShopMonthlyTargetVO> getShopMonthlyTargetById(
|
public ApiResponse<ShopMonthlyTargetVO> getShopMonthlyTargetById(
|
||||||
@Parameter(description = "目标ID") @PathVariable Long id) {
|
@Parameter(description = "目标ID") @PathVariable Long id) {
|
||||||
ShopMonthlyTargetVO vo = shopMonthlyTargetService.getShopMonthlyTargetById(id);
|
ShopMonthlyTargetVO vo = shopMonthlyTargetService.getShopMonthlyTargetById(id);
|
||||||
|
|||||||
+4
-4
@@ -32,7 +32,7 @@ public class PlanController {
|
|||||||
|
|
||||||
@Operation(summary = "创建套餐", description = "创建新的订阅套餐")
|
@Operation(summary = "创建套餐", description = "创建新的订阅套餐")
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@RequirePermission(value = "system:company:manage", description = "创建套餐", allowSuper = true)
|
@RequirePermission(value = "sys:company:manage", description = "创建套餐", allowSuper = true)
|
||||||
public ApiResponse<PlanVO> createPlan(@Valid @RequestBody CreatePlanDTO createPlanDTO) {
|
public ApiResponse<PlanVO> createPlan(@Valid @RequestBody CreatePlanDTO createPlanDTO) {
|
||||||
PlanVO planVO = planService.createPlan(createPlanDTO);
|
PlanVO planVO = planService.createPlan(createPlanDTO);
|
||||||
return ApiResponse.success("套餐创建成功", planVO);
|
return ApiResponse.success("套餐创建成功", planVO);
|
||||||
@@ -40,7 +40,7 @@ public class PlanController {
|
|||||||
|
|
||||||
@Operation(summary = "更新套餐", description = "更新现有套餐信息")
|
@Operation(summary = "更新套餐", description = "更新现有套餐信息")
|
||||||
@PutMapping("/update/{planId}")
|
@PutMapping("/update/{planId}")
|
||||||
@RequirePermission(value = "system:company:manage", description = "更新套餐", allowSuper = true)
|
@RequirePermission(value = "sys:company:manage", description = "更新套餐", allowSuper = true)
|
||||||
public ApiResponse<PlanVO> updatePlan(@Valid @RequestBody UpdatePlanDTO updatePlanDTO,
|
public ApiResponse<PlanVO> updatePlan(@Valid @RequestBody UpdatePlanDTO updatePlanDTO,
|
||||||
@PathVariable Long planId) {
|
@PathVariable Long planId) {
|
||||||
PlanVO planVO = planService.updatePlan(updatePlanDTO, planId);
|
PlanVO planVO = planService.updatePlan(updatePlanDTO, planId);
|
||||||
@@ -49,7 +49,7 @@ public class PlanController {
|
|||||||
|
|
||||||
@Operation(summary = "删除套餐", description = "删除指定套餐")
|
@Operation(summary = "删除套餐", description = "删除指定套餐")
|
||||||
@DeleteMapping("/delete/{planId}")
|
@DeleteMapping("/delete/{planId}")
|
||||||
@RequirePermission(value = "system:company:manage", description = "删除套餐", allowSuper = true)
|
@RequirePermission(value = "sys:company:manage", description = "删除套餐", allowSuper = true)
|
||||||
public ApiResponse<Void> deletePlan(
|
public ApiResponse<Void> deletePlan(
|
||||||
@Parameter(description = "套餐ID") @PathVariable Long planId) {
|
@Parameter(description = "套餐ID") @PathVariable Long planId) {
|
||||||
planService.deletePlan(planId);
|
planService.deletePlan(planId);
|
||||||
@@ -58,7 +58,7 @@ public class PlanController {
|
|||||||
|
|
||||||
@Operation(summary = "分页获取套餐列表", description = "分页获取套餐列表,支持条件过滤")
|
@Operation(summary = "分页获取套餐列表", description = "分页获取套餐列表,支持条件过滤")
|
||||||
@PostMapping("/list")
|
@PostMapping("/list")
|
||||||
@RequirePermission(value = "system:company:manage", description = "查询套餐列表", allowSuper = true)
|
@RequirePermission(value = "sys:company:manage", description = "查询套餐列表", allowSuper = true)
|
||||||
public ApiResponse<PageResultVO<PlanListVO>> getPlanPage(
|
public ApiResponse<PageResultVO<PlanListVO>> getPlanPage(
|
||||||
@Valid @RequestBody PageQueryDTO<PlanFilterDTO> pageQueryDTO) {
|
@Valid @RequestBody PageQueryDTO<PlanFilterDTO> pageQueryDTO) {
|
||||||
PageResultVO<PlanListVO> result = planService.getPlanPage(pageQueryDTO);
|
PageResultVO<PlanListVO> result = planService.getPlanPage(pageQueryDTO);
|
||||||
|
|||||||
+4
-4
@@ -32,7 +32,7 @@ public class SubscriptionController {
|
|||||||
|
|
||||||
@Operation(summary = "创建订阅", description = "创建新的订阅记录")
|
@Operation(summary = "创建订阅", description = "创建新的订阅记录")
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@RequirePermission(value = "system:company:manage", description = "创建订阅", allowSuper = true)
|
@RequirePermission(value = "sys:company:manage", description = "创建订阅", allowSuper = true)
|
||||||
public ApiResponse<SubscriptionVO> createSubscription(
|
public ApiResponse<SubscriptionVO> createSubscription(
|
||||||
@Valid @RequestBody CreateSubscriptionDTO createSubscriptionDTO) {
|
@Valid @RequestBody CreateSubscriptionDTO createSubscriptionDTO) {
|
||||||
SubscriptionVO subscriptionVO = subscriptionService.createSubscription(createSubscriptionDTO);
|
SubscriptionVO subscriptionVO = subscriptionService.createSubscription(createSubscriptionDTO);
|
||||||
@@ -41,7 +41,7 @@ public class SubscriptionController {
|
|||||||
|
|
||||||
@Operation(summary = "更新订阅", description = "更新现有订阅信息")
|
@Operation(summary = "更新订阅", description = "更新现有订阅信息")
|
||||||
@PutMapping("/update/{id}")
|
@PutMapping("/update/{id}")
|
||||||
@RequirePermission(value = "system:company:manage", description = "更新订阅", allowSuper = true)
|
@RequirePermission(value = "sys:company:manage", description = "更新订阅", allowSuper = true)
|
||||||
public ApiResponse<SubscriptionVO> updateSubscription(
|
public ApiResponse<SubscriptionVO> updateSubscription(
|
||||||
@Valid @RequestBody UpdateSubscriptionDTO updateSubscriptionDTO,
|
@Valid @RequestBody UpdateSubscriptionDTO updateSubscriptionDTO,
|
||||||
@PathVariable Long id) {
|
@PathVariable Long id) {
|
||||||
@@ -51,7 +51,7 @@ public class SubscriptionController {
|
|||||||
|
|
||||||
@Operation(summary = "删除订阅", description = "删除指定订阅")
|
@Operation(summary = "删除订阅", description = "删除指定订阅")
|
||||||
@DeleteMapping("/delete/{id}")
|
@DeleteMapping("/delete/{id}")
|
||||||
@RequirePermission(value = "system:company:manage", description = "删除订阅", allowSuper = true)
|
@RequirePermission(value = "sys:company:manage", description = "删除订阅", allowSuper = true)
|
||||||
public ApiResponse<Void> deleteSubscription(
|
public ApiResponse<Void> deleteSubscription(
|
||||||
@Parameter(description = "订阅ID") @PathVariable Long id) {
|
@Parameter(description = "订阅ID") @PathVariable Long id) {
|
||||||
subscriptionService.deleteSubscription(id);
|
subscriptionService.deleteSubscription(id);
|
||||||
@@ -60,7 +60,7 @@ public class SubscriptionController {
|
|||||||
|
|
||||||
@Operation(summary = "分页获取订阅列表", description = "分页获取订阅列表,支持条件过滤")
|
@Operation(summary = "分页获取订阅列表", description = "分页获取订阅列表,支持条件过滤")
|
||||||
@PostMapping("/list")
|
@PostMapping("/list")
|
||||||
@RequirePermission(value = "system:company:manage", description = "查询订阅列表", allowSuper = true)
|
@RequirePermission(value = "sys:company:manage", description = "查询订阅列表", allowSuper = true)
|
||||||
public ApiResponse<PageResultVO<SubscriptionListVO>> getSubscriptionPage(
|
public ApiResponse<PageResultVO<SubscriptionListVO>> getSubscriptionPage(
|
||||||
@Valid @RequestBody PageQueryDTO<SubscriptionFilterDTO> pageQueryDTO) {
|
@Valid @RequestBody PageQueryDTO<SubscriptionFilterDTO> pageQueryDTO) {
|
||||||
PageResultVO<SubscriptionListVO> result = subscriptionService.getSubscriptionPage(pageQueryDTO);
|
PageResultVO<SubscriptionListVO> result = subscriptionService.getSubscriptionPage(pageQueryDTO);
|
||||||
|
|||||||
+4
-4
@@ -33,14 +33,14 @@ public class SystemLicenseController {
|
|||||||
|
|
||||||
@Operation(summary = "获取当前授权信息")
|
@Operation(summary = "获取当前授权信息")
|
||||||
@GetMapping("/license")
|
@GetMapping("/license")
|
||||||
@RequirePermission(value = "system:license:read", description = "查看授权信息")
|
@RequirePermission(value = "sys:license:read", description = "查看授权信息")
|
||||||
public ApiResponse<LicenseSummaryVO> getLicense() {
|
public ApiResponse<LicenseSummaryVO> getLicense() {
|
||||||
return ApiResponse.success(licenseService.getLicenseSummary());
|
return ApiResponse.success(licenseService.getLicenseSummary());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "激活/更新授权 License")
|
@Operation(summary = "激活/更新授权 License")
|
||||||
@PutMapping("/license")
|
@PutMapping("/license")
|
||||||
@RequirePermission(value = "system:license:manage", description = "激活或更新授权")
|
@RequirePermission(value = "sys:license:manage", description = "激活或更新授权")
|
||||||
public ApiResponse<LicenseSummaryVO> updateLicense(@Valid @RequestBody ActivateLicenseDTO dto) {
|
public ApiResponse<LicenseSummaryVO> updateLicense(@Valid @RequestBody ActivateLicenseDTO dto) {
|
||||||
LicenseSummaryVO summary = licenseService.updateLicense(dto);
|
LicenseSummaryVO summary = licenseService.updateLicense(dto);
|
||||||
return ApiResponse.success("授权更新成功", summary);
|
return ApiResponse.success("授权更新成功", summary);
|
||||||
@@ -48,7 +48,7 @@ public class SystemLicenseController {
|
|||||||
|
|
||||||
@Operation(summary = "激活授权 License")
|
@Operation(summary = "激活授权 License")
|
||||||
@PostMapping("/license/activate")
|
@PostMapping("/license/activate")
|
||||||
@RequirePermission(value = "system:license:manage", description = "激活授权")
|
@RequirePermission(value = "sys:license:manage", description = "激活授权")
|
||||||
public ApiResponse<LicenseSummaryVO> activateLicense(@Valid @RequestBody ActivateLicenseDTO dto) {
|
public ApiResponse<LicenseSummaryVO> activateLicense(@Valid @RequestBody ActivateLicenseDTO dto) {
|
||||||
LicenseSummaryVO summary = licenseService.updateLicense(dto);
|
LicenseSummaryVO summary = licenseService.updateLicense(dto);
|
||||||
return ApiResponse.success("授权激活成功", summary);
|
return ApiResponse.success("授权激活成功", summary);
|
||||||
@@ -56,7 +56,7 @@ public class SystemLicenseController {
|
|||||||
|
|
||||||
@Operation(summary = "获取本机机器指纹")
|
@Operation(summary = "获取本机机器指纹")
|
||||||
@GetMapping("/fingerprint")
|
@GetMapping("/fingerprint")
|
||||||
@RequirePermission(value = "system:license:read", description = "查看机器指纹")
|
@RequirePermission(value = "sys:license:read", description = "查看机器指纹")
|
||||||
public ApiResponse<FingerprintVO> fingerprint() {
|
public ApiResponse<FingerprintVO> fingerprint() {
|
||||||
return ApiResponse.success(FingerprintVO.builder()
|
return ApiResponse.success(FingerprintVO.builder()
|
||||||
.fingerprint(MachineFingerprintUtil.computeFingerprint())
|
.fingerprint(MachineFingerprintUtil.computeFingerprint())
|
||||||
|
|||||||
+7
-7
@@ -31,7 +31,7 @@ public class MenuController {
|
|||||||
|
|
||||||
@Operation(summary = "创建菜单", description = "创建新的菜单")
|
@Operation(summary = "创建菜单", description = "创建新的菜单")
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@RequirePermission(value = "system:menu:create", description = "创建菜单", allowSuper = true)
|
@RequirePermission(value = "sys:menu:create", description = "创建菜单", allowSuper = true)
|
||||||
public ApiResponse<MenuVO> createMenu(@Valid @RequestBody CreateMenuDTO createMenuDTO) {
|
public ApiResponse<MenuVO> createMenu(@Valid @RequestBody CreateMenuDTO createMenuDTO) {
|
||||||
MenuVO menuVO = menuService.createMenu(createMenuDTO);
|
MenuVO menuVO = menuService.createMenu(createMenuDTO);
|
||||||
return ApiResponse.success("菜单创建成功", menuVO);
|
return ApiResponse.success("菜单创建成功", menuVO);
|
||||||
@@ -39,7 +39,7 @@ public class MenuController {
|
|||||||
|
|
||||||
@Operation(summary = "更新菜单", description = "更新现有菜单信息")
|
@Operation(summary = "更新菜单", description = "更新现有菜单信息")
|
||||||
@PutMapping("/update/{id}")
|
@PutMapping("/update/{id}")
|
||||||
@RequirePermission(value = "system:menu:update", description = "更新菜单", allowSuper = true)
|
@RequirePermission(value = "sys:menu:update", description = "更新菜单", allowSuper = true)
|
||||||
public ApiResponse<MenuVO> updateMenu(@Valid @RequestBody UpdateMenuDTO updateMenuDTO,
|
public ApiResponse<MenuVO> updateMenu(@Valid @RequestBody UpdateMenuDTO updateMenuDTO,
|
||||||
@PathVariable Long id) {
|
@PathVariable Long id) {
|
||||||
MenuVO menuVO = menuService.updateMenu(updateMenuDTO, id);
|
MenuVO menuVO = menuService.updateMenu(updateMenuDTO, id);
|
||||||
@@ -48,7 +48,7 @@ public class MenuController {
|
|||||||
|
|
||||||
@Operation(summary = "删除菜单", description = "删除指定菜单")
|
@Operation(summary = "删除菜单", description = "删除指定菜单")
|
||||||
@DeleteMapping("/delete/{id}")
|
@DeleteMapping("/delete/{id}")
|
||||||
@RequirePermission(value = "system:menu:delete", description = "删除菜单", allowSuper = true)
|
@RequirePermission(value = "sys:menu:delete", description = "删除菜单", allowSuper = true)
|
||||||
public ApiResponse<Void> deleteMenu(
|
public ApiResponse<Void> deleteMenu(
|
||||||
@Parameter(description = "菜单ID") @PathVariable Long id) {
|
@Parameter(description = "菜单ID") @PathVariable Long id) {
|
||||||
menuService.deleteMenu(id);
|
menuService.deleteMenu(id);
|
||||||
@@ -57,7 +57,7 @@ public class MenuController {
|
|||||||
|
|
||||||
@Operation(summary = "获取菜单树", description = "获取完整的菜单树结构")
|
@Operation(summary = "获取菜单树", description = "获取完整的菜单树结构")
|
||||||
@GetMapping("/tree")
|
@GetMapping("/tree")
|
||||||
@RequirePermission(value = "system:menu:read", description = "获取菜单树", allowSuper = true)
|
@RequirePermission(value = "sys:menu:read", description = "获取菜单树", allowSuper = true)
|
||||||
public ApiResponse<List<MenuVO>> getMenuTree() {
|
public ApiResponse<List<MenuVO>> getMenuTree() {
|
||||||
List<MenuVO> menuTree = menuService.getMenuTree();
|
List<MenuVO> menuTree = menuService.getMenuTree();
|
||||||
return ApiResponse.success("获取菜单树成功", menuTree);
|
return ApiResponse.success("获取菜单树成功", menuTree);
|
||||||
@@ -65,7 +65,7 @@ public class MenuController {
|
|||||||
|
|
||||||
@Operation(summary = "获取所有菜单", description = "获取所有菜单的列表")
|
@Operation(summary = "获取所有菜单", description = "获取所有菜单的列表")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@RequirePermission(value = "system:menu:read", description = "获取所有菜单", allowSuper = true)
|
@RequirePermission(value = "sys:menu:read", description = "获取所有菜单", allowSuper = true)
|
||||||
public ApiResponse<List<MenuVO>> getAllMenus() {
|
public ApiResponse<List<MenuVO>> getAllMenus() {
|
||||||
List<MenuVO> menuList = menuService.getAllMenus();
|
List<MenuVO> menuList = menuService.getAllMenus();
|
||||||
return ApiResponse.success("获取菜单列表成功", menuList);
|
return ApiResponse.success("获取菜单列表成功", menuList);
|
||||||
@@ -73,7 +73,7 @@ public class MenuController {
|
|||||||
|
|
||||||
@Operation(summary = "获取菜单详情", description = "根据ID获取菜单详细信息")
|
@Operation(summary = "获取菜单详情", description = "根据ID获取菜单详细信息")
|
||||||
@GetMapping("/detail/{id}")
|
@GetMapping("/detail/{id}")
|
||||||
@RequirePermission(value = "system:menu:read", description = "获取菜单详情", allowSuper = true)
|
@RequirePermission(value = "sys:menu:read", description = "获取菜单详情", allowSuper = true)
|
||||||
public ApiResponse<MenuVO> getMenuDetail(
|
public ApiResponse<MenuVO> getMenuDetail(
|
||||||
@Parameter(description = "菜单ID") @PathVariable Long id) {
|
@Parameter(description = "菜单ID") @PathVariable Long id) {
|
||||||
MenuVO menuVO = menuService.getMenuDetail(id);
|
MenuVO menuVO = menuService.getMenuDetail(id);
|
||||||
@@ -82,7 +82,7 @@ public class MenuController {
|
|||||||
|
|
||||||
@Operation(summary = "批量菜单排序", description = "批量更新菜单的排序值")
|
@Operation(summary = "批量菜单排序", description = "批量更新菜单的排序值")
|
||||||
@PostMapping("/batch-sort")
|
@PostMapping("/batch-sort")
|
||||||
@RequirePermission(value = "system:menu:update", description = "批量菜单排序", allowSuper = true)
|
@RequirePermission(value = "sys:menu:update", description = "批量菜单排序", allowSuper = true)
|
||||||
public ApiResponse<Void> batchSortMenu(@Valid @RequestBody BatchSortMenuDTO batchSortMenuDTO) {
|
public ApiResponse<Void> batchSortMenu(@Valid @RequestBody BatchSortMenuDTO batchSortMenuDTO) {
|
||||||
menuService.batchSortMenu(batchSortMenuDTO);
|
menuService.batchSortMenu(batchSortMenuDTO);
|
||||||
return ApiResponse.success("菜单排序成功");
|
return ApiResponse.success("菜单排序成功");
|
||||||
|
|||||||
+11
-11
@@ -37,7 +37,7 @@ public class PermissionController {
|
|||||||
|
|
||||||
@Operation(summary = "创建权限", description = "创建新的权限")
|
@Operation(summary = "创建权限", description = "创建新的权限")
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@RequirePermission(value = "system:permission:manage", description = "创建权限", allowSuper = true)
|
@RequirePermission(value = "sys:permission:manage", description = "创建权限", allowSuper = true)
|
||||||
public ApiResponse<PermissionVO> createPermission(@Valid @RequestBody CreatePermissionDTO createPermissionDTO) {
|
public ApiResponse<PermissionVO> createPermission(@Valid @RequestBody CreatePermissionDTO createPermissionDTO) {
|
||||||
PermissionVO permissionVO = permissionService.createPermission(createPermissionDTO);
|
PermissionVO permissionVO = permissionService.createPermission(createPermissionDTO);
|
||||||
return ApiResponse.success("权限创建成功", permissionVO);
|
return ApiResponse.success("权限创建成功", permissionVO);
|
||||||
@@ -45,7 +45,7 @@ public class PermissionController {
|
|||||||
|
|
||||||
@Operation(summary = "更新权限", description = "更新现有权限信息")
|
@Operation(summary = "更新权限", description = "更新现有权限信息")
|
||||||
@PutMapping("/update/{id}")
|
@PutMapping("/update/{id}")
|
||||||
@RequirePermission(value = "system:permission:manage", description = "更新权限", allowSuper = true)
|
@RequirePermission(value = "sys:permission:manage", description = "更新权限", allowSuper = true)
|
||||||
public ApiResponse<PermissionVO> updatePermission(@Valid @RequestBody UpdatePermissionDTO updatePermissionDTO,
|
public ApiResponse<PermissionVO> updatePermission(@Valid @RequestBody UpdatePermissionDTO updatePermissionDTO,
|
||||||
@PathVariable Long id) {
|
@PathVariable Long id) {
|
||||||
PermissionVO permissionVO = permissionService.updatePermission(updatePermissionDTO, id);
|
PermissionVO permissionVO = permissionService.updatePermission(updatePermissionDTO, id);
|
||||||
@@ -54,7 +54,7 @@ public class PermissionController {
|
|||||||
|
|
||||||
@Operation(summary = "删除权限", description = "删除指定权限")
|
@Operation(summary = "删除权限", description = "删除指定权限")
|
||||||
@DeleteMapping("/delete/{id}")
|
@DeleteMapping("/delete/{id}")
|
||||||
@RequirePermission(value = "system:permission:manage", description = "删除权限", allowSuper = true)
|
@RequirePermission(value = "sys:permission:manage", description = "删除权限", allowSuper = true)
|
||||||
public ApiResponse<Void> deletePermission(
|
public ApiResponse<Void> deletePermission(
|
||||||
@Parameter(description = "权限ID") @PathVariable Long id) {
|
@Parameter(description = "权限ID") @PathVariable Long id) {
|
||||||
permissionService.deletePermission(id);
|
permissionService.deletePermission(id);
|
||||||
@@ -63,7 +63,7 @@ public class PermissionController {
|
|||||||
|
|
||||||
@Operation(summary = "分页获取权限列表", description = "根据条件分页获取权限列表")
|
@Operation(summary = "分页获取权限列表", description = "根据条件分页获取权限列表")
|
||||||
@PostMapping("/list")
|
@PostMapping("/list")
|
||||||
@RequirePermission(value = "system:permission:read", description = "查询权限列表", allowSuper = true)
|
@RequirePermission(value = "sys:permission:read", description = "查询权限列表", allowSuper = true)
|
||||||
public ApiResponse<PageResultVO<PermissionVO>> getPermissionPage(
|
public ApiResponse<PageResultVO<PermissionVO>> getPermissionPage(
|
||||||
@Valid @RequestBody PageQueryDTO<PermissionFilterDTO> filterDTO) {
|
@Valid @RequestBody PageQueryDTO<PermissionFilterDTO> filterDTO) {
|
||||||
PageResultVO<PermissionVO> pageResult = permissionService.getPermissionPage(filterDTO);
|
PageResultVO<PermissionVO> pageResult = permissionService.getPermissionPage(filterDTO);
|
||||||
@@ -72,7 +72,7 @@ public class PermissionController {
|
|||||||
|
|
||||||
@Operation(summary = "获取权限详情", description = "根据ID获取权限详细信息")
|
@Operation(summary = "获取权限详情", description = "根据ID获取权限详细信息")
|
||||||
@GetMapping("/detail/{id}")
|
@GetMapping("/detail/{id}")
|
||||||
@RequirePermission(value = "system:permission:read", description = "获取权限详情", allowSuper = true)
|
@RequirePermission(value = "sys:permission:read", description = "获取权限详情", allowSuper = true)
|
||||||
public ApiResponse<PermissionVO> getPermissionDetail(
|
public ApiResponse<PermissionVO> getPermissionDetail(
|
||||||
@Parameter(description = "权限ID") @PathVariable Long id) {
|
@Parameter(description = "权限ID") @PathVariable Long id) {
|
||||||
PermissionVO permissionVO = permissionService.getPermissionDetail(id);
|
PermissionVO permissionVO = permissionService.getPermissionDetail(id);
|
||||||
@@ -81,7 +81,7 @@ public class PermissionController {
|
|||||||
|
|
||||||
@Operation(summary = "获取所有权限", description = "获取所有启用的权限列表")
|
@Operation(summary = "获取所有权限", description = "获取所有启用的权限列表")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@RequirePermission(value = "system:permission:read", description = "获取所有权限", allowSuper = true)
|
@RequirePermission(value = "sys:permission:read", description = "获取所有权限", allowSuper = true)
|
||||||
public ApiResponse<List<PermissionVO>> getAllPermissions() {
|
public ApiResponse<List<PermissionVO>> getAllPermissions() {
|
||||||
List<PermissionVO> permissionList = permissionService.getAllPermissions();
|
List<PermissionVO> permissionList = permissionService.getAllPermissions();
|
||||||
return ApiResponse.success("获取所有权限成功", permissionList);
|
return ApiResponse.success("获取所有权限成功", permissionList);
|
||||||
@@ -89,7 +89,7 @@ public class PermissionController {
|
|||||||
|
|
||||||
@Operation(summary = "获取权限树", description = "获取权限树状结构(用于前端展示)")
|
@Operation(summary = "获取权限树", description = "获取权限树状结构(用于前端展示)")
|
||||||
@GetMapping("/tree")
|
@GetMapping("/tree")
|
||||||
@RequirePermission(value = "system:permission:read", description = "获取权限树", allowSuper = true)
|
@RequirePermission(value = "sys:permission:read", description = "获取权限树", allowSuper = true)
|
||||||
public ApiResponse<List<PermissionVO>> getPermissionTree() {
|
public ApiResponse<List<PermissionVO>> getPermissionTree() {
|
||||||
List<PermissionVO> tree = permissionService.getPermissionTree();
|
List<PermissionVO> tree = permissionService.getPermissionTree();
|
||||||
return ApiResponse.success("获取权限树成功", tree);
|
return ApiResponse.success("获取权限树成功", tree);
|
||||||
@@ -97,7 +97,7 @@ public class PermissionController {
|
|||||||
|
|
||||||
@Operation(summary = "获取公司可见的权限树", description = "只返回当前用户所属公司的已分配权限及其祖先节点")
|
@Operation(summary = "获取公司可见的权限树", description = "只返回当前用户所属公司的已分配权限及其祖先节点")
|
||||||
@GetMapping("/tree/company")
|
@GetMapping("/tree/company")
|
||||||
@RequirePermission(value = "system:permission:read", description = "获取公司可见权限树", allowSuper = true)
|
@RequirePermission(value = "sys:permission:read", description = "获取公司可见权限树", allowSuper = true)
|
||||||
public ApiResponse<List<PermissionVO>> getCompanyVisiblePermissionTree() {
|
public ApiResponse<List<PermissionVO>> getCompanyVisiblePermissionTree() {
|
||||||
Long companyId = currentUserContext.getCurrentCompanyId();
|
Long companyId = currentUserContext.getCurrentCompanyId();
|
||||||
List<PermissionVO> tree = permissionService.getCompanyVisiblePermissionTree(companyId);
|
List<PermissionVO> tree = permissionService.getCompanyVisiblePermissionTree(companyId);
|
||||||
@@ -106,7 +106,7 @@ public class PermissionController {
|
|||||||
|
|
||||||
@Operation(summary = "获取职位可见的权限树", description = "只返回已分配权限及其祖先节点")
|
@Operation(summary = "获取职位可见的权限树", description = "只返回已分配权限及其祖先节点")
|
||||||
@GetMapping("/tree/position/{positionId}")
|
@GetMapping("/tree/position/{positionId}")
|
||||||
@RequirePermission(value = "system:permission:read", description = "获取职位可见权限树", allowSuper = true)
|
@RequirePermission(value = "sys:permission:read", description = "获取职位可见权限树", allowSuper = true)
|
||||||
public ApiResponse<List<PermissionVO>> getPositionVisiblePermissionTree(
|
public ApiResponse<List<PermissionVO>> getPositionVisiblePermissionTree(
|
||||||
@Parameter(description = "职位ID") @PathVariable Long positionId) {
|
@Parameter(description = "职位ID") @PathVariable Long positionId) {
|
||||||
List<PermissionVO> tree = permissionService.getPositionVisiblePermissionTree(positionId);
|
List<PermissionVO> tree = permissionService.getPositionVisiblePermissionTree(positionId);
|
||||||
@@ -115,7 +115,7 @@ public class PermissionController {
|
|||||||
|
|
||||||
@Operation(summary = "获取系统权限树", description = "返回全量权限树(整个平台的权限,用于平台超管管理)")
|
@Operation(summary = "获取系统权限树", description = "返回全量权限树(整个平台的权限,用于平台超管管理)")
|
||||||
@GetMapping("/system/tree")
|
@GetMapping("/system/tree")
|
||||||
@RequirePermission(value = "system:permission:read", description = "获取系统权限树", allowSuper = true)
|
@RequirePermission(value = "sys:permission:read", description = "获取系统权限树", allowSuper = true)
|
||||||
public ApiResponse<List<PermissionVO>> getSystemPermissionTree() {
|
public ApiResponse<List<PermissionVO>> getSystemPermissionTree() {
|
||||||
List<PermissionVO> tree = permissionService.getSystemPermissionTree();
|
List<PermissionVO> tree = permissionService.getSystemPermissionTree();
|
||||||
return ApiResponse.success("获取系统权限树成功", tree);
|
return ApiResponse.success("获取系统权限树成功", tree);
|
||||||
@@ -123,7 +123,7 @@ public class PermissionController {
|
|||||||
|
|
||||||
@Operation(summary = "批量更新权限排序")
|
@Operation(summary = "批量更新权限排序")
|
||||||
@PutMapping("/sort")
|
@PutMapping("/sort")
|
||||||
@RequirePermission(value = "system:permission:update", description = "批量更新权限排序", allowSuper = true)
|
@RequirePermission(value = "sys:permission:update", description = "批量更新权限排序", allowSuper = true)
|
||||||
public ApiResponse<Void> batchSortPermission(
|
public ApiResponse<Void> batchSortPermission(
|
||||||
@RequestBody @Valid BatchSortPermissionDTO dto) {
|
@RequestBody @Valid BatchSortPermissionDTO dto) {
|
||||||
permissionService.batchSortPermission(dto);
|
permissionService.batchSortPermission(dto);
|
||||||
|
|||||||
+3
-3
@@ -53,7 +53,7 @@ public class UserController {
|
|||||||
|
|
||||||
@Operation(summary = "更新用户信息", description = "更新当前登录用户的基本信息")
|
@Operation(summary = "更新用户信息", description = "更新当前登录用户的基本信息")
|
||||||
@PutMapping("/info")
|
@PutMapping("/info")
|
||||||
@RequirePermission(value = "system:user:update", description = "更新用户信息", allowSuper = true)
|
@RequirePermission(value = "sys:user:update", description = "更新用户信息", allowSuper = true)
|
||||||
public ApiResponse<UserVO> updateUserInfo(@Valid @RequestBody UpdateUserInfoDTO updateUserInfoDTO) {
|
public ApiResponse<UserVO> updateUserInfo(@Valid @RequestBody UpdateUserInfoDTO updateUserInfoDTO) {
|
||||||
UserVO userVO = userService.updateCurrentUserInfo(updateUserInfoDTO);
|
UserVO userVO = userService.updateCurrentUserInfo(updateUserInfoDTO);
|
||||||
return ApiResponse.success("用户信息更新成功", userVO);
|
return ApiResponse.success("用户信息更新成功", userVO);
|
||||||
@@ -68,7 +68,7 @@ public class UserController {
|
|||||||
|
|
||||||
@Operation(summary = "上传用户头像", description = "上传用户头像图片")
|
@Operation(summary = "上传用户头像", description = "上传用户头像图片")
|
||||||
@PostMapping("/upload-avatar")
|
@PostMapping("/upload-avatar")
|
||||||
@RequirePermission(value = "system:user:update", description = "上传用户头像", allowSuper = true)
|
@RequirePermission(value = "sys:user:update", description = "上传用户头像", allowSuper = true)
|
||||||
public ApiResponse<UserVO> uploadAvatar(@RequestParam("file") MultipartFile file) {
|
public ApiResponse<UserVO> uploadAvatar(@RequestParam("file") MultipartFile file) {
|
||||||
// 检查是否为图片文件
|
// 检查是否为图片文件
|
||||||
if (!FileUploadUtils.isImageFile(file.getOriginalFilename())) {
|
if (!FileUploadUtils.isImageFile(file.getOriginalFilename())) {
|
||||||
@@ -88,7 +88,7 @@ public class UserController {
|
|||||||
|
|
||||||
@Operation(summary = "分页查询用户列表", description = "分页查询用户列表,支持多种过滤条件")
|
@Operation(summary = "分页查询用户列表", description = "分页查询用户列表,支持多种过滤条件")
|
||||||
@PostMapping("/list")
|
@PostMapping("/list")
|
||||||
@RequirePermission(value = "system:user:read", description = "查询用户列表", allowSuper = true)
|
@RequirePermission(value = "sys:user:read", description = "查询用户列表", allowSuper = true)
|
||||||
public ApiResponse<PageResultVO<UserVO>> getUserPage(
|
public ApiResponse<PageResultVO<UserVO>> getUserPage(
|
||||||
@Valid @RequestBody PageQueryDTO<UserFilterDTO> pageQuery) {
|
@Valid @RequestBody PageQueryDTO<UserFilterDTO> pageQuery) {
|
||||||
PageResultVO<UserVO> pageResult = userService.getUserPage(pageQuery);
|
PageResultVO<UserVO> pageResult = userService.getUserPage(pageQuery);
|
||||||
|
|||||||
@@ -104,6 +104,7 @@ const PromotionFeeIcon = createIconifyIcon('lucide:dollar-sign');
|
|||||||
const ToolbarToggleIcon = createIconifyIcon('lucide:sliders-horizontal');
|
const ToolbarToggleIcon = createIconifyIcon('lucide:sliders-horizontal');
|
||||||
const ReceiptIcon = createIconifyIcon('lucide:receipt');
|
const ReceiptIcon = createIconifyIcon('lucide:receipt');
|
||||||
const CalendarIcon = createIconifyIcon('lucide:calendar');
|
const CalendarIcon = createIconifyIcon('lucide:calendar');
|
||||||
|
const RefreshIcon = createIconifyIcon('lucide:refresh-cw');
|
||||||
|
|
||||||
function goToImportOrder() {
|
function goToImportOrder() {
|
||||||
void router.push('/import/order');
|
void router.push('/import/order');
|
||||||
@@ -557,6 +558,27 @@ async function refreshActiveDataTab() {
|
|||||||
await loadTabData(tab as DataTabKey);
|
await loadTabData(tab as DataTabKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const refreshing = ref(false);
|
||||||
|
|
||||||
|
/** 手动刷新:强制重拉当前 Tab(含区间对比) */
|
||||||
|
async function handleManualRefresh() {
|
||||||
|
if (refreshing.value) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
refreshing.value = true;
|
||||||
|
try {
|
||||||
|
if (activeTab.value === 'periodCompare') {
|
||||||
|
await periodCompareTabRef.value?.refresh?.();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const tab = activeTab.value as DataTabKey;
|
||||||
|
tabLoaded[tab] = false;
|
||||||
|
await loadTabData(tab);
|
||||||
|
} finally {
|
||||||
|
refreshing.value = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const activeTab = ref('finance');
|
const activeTab = ref('finance');
|
||||||
|
|
||||||
function handleShopNavigate(shopId: number) {
|
function handleShopNavigate(shopId: number) {
|
||||||
@@ -589,6 +611,7 @@ const salesRankTabRef = ref<InstanceType<typeof WorkbenchSalesRankTab> | null>(
|
|||||||
const periodCompareTabRef = ref<
|
const periodCompareTabRef = ref<
|
||||||
| (InstanceType<typeof WorkbenchPeriodCompareTab> & {
|
| (InstanceType<typeof WorkbenchPeriodCompareTab> & {
|
||||||
redraw: () => Promise<void>;
|
redraw: () => Promise<void>;
|
||||||
|
refresh: () => Promise<void>;
|
||||||
})
|
})
|
||||||
| null
|
| null
|
||||||
>(null);
|
>(null);
|
||||||
@@ -852,6 +875,30 @@ onUnmounted(() => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Popover>
|
</Popover>
|
||||||
|
|
||||||
|
<div
|
||||||
|
:class="[
|
||||||
|
toolbarShellClass,
|
||||||
|
refreshing ? 'cursor-wait opacity-70' : 'cursor-pointer',
|
||||||
|
]"
|
||||||
|
role="button"
|
||||||
|
title="刷新当前页数据"
|
||||||
|
@click="handleManualRefresh"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
:class="[toolbarPanelClass, 'flex items-center gap-1 px-2 py-1']"
|
||||||
|
>
|
||||||
|
<RefreshIcon
|
||||||
|
class="h-4 w-4 shrink-0"
|
||||||
|
:class="{ 'animate-spin': refreshing }"
|
||||||
|
/>
|
||||||
|
<span
|
||||||
|
class="whitespace-nowrap text-xs font-bold text-slate-700 dark:text-slate-300"
|
||||||
|
>
|
||||||
|
刷新
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -686,7 +686,7 @@ watch(
|
|||||||
{ deep: true },
|
{ deep: true },
|
||||||
);
|
);
|
||||||
|
|
||||||
defineExpose({ redraw });
|
defineExpose({ redraw, refresh: fetchSlices });
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|||||||
+1
-1
@@ -13,7 +13,7 @@ import {
|
|||||||
storeOverviewHints,
|
storeOverviewHints,
|
||||||
} from '#/utils/overview-table-hints';
|
} from '#/utils/overview-table-hints';
|
||||||
|
|
||||||
import { FINANCE_PANEL_SHELL } from '../finance-ui';
|
import { FINANCE_PANEL_SHELL } from '../constants/finance-ui';
|
||||||
|
|
||||||
defineOptions({ name: 'WorkbenchCategorySummaryTable' });
|
defineOptions({ name: 'WorkbenchCategorySummaryTable' });
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@ import { computed, nextTick, onMounted, onUnmounted, ref, watch } from 'vue';
|
|||||||
import { EchartsUI, useEcharts } from '@vben/plugins/echarts';
|
import { EchartsUI, useEcharts } from '@vben/plugins/echarts';
|
||||||
|
|
||||||
import { formatWanShort, formatYuanDetail } from '../../../utils/money';
|
import { formatWanShort, formatYuanDetail } from '../../../utils/money';
|
||||||
import { FINANCE_PANEL_SHELL } from '../finance-ui';
|
import { FINANCE_PANEL_SHELL } from '../constants/finance-ui';
|
||||||
|
|
||||||
defineOptions({ name: 'WorkbenchFinancePlatformSalesPieChart' });
|
defineOptions({ name: 'WorkbenchFinancePlatformSalesPieChart' });
|
||||||
|
|
||||||
|
|||||||
+4
-4
@@ -1,6 +1,6 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { WorkbenchVO } from '#/api/bi/workbench/types';
|
import type { WorkbenchVO } from '#/api/bi/workbench/types';
|
||||||
import type { FinanceKpiCardId } from '../kpi-catalog';
|
import type { FinanceKpiCardId } from '../constants/kpi-catalog';
|
||||||
|
|
||||||
import { computed, nextTick, onMounted, onUnmounted, ref, watch } from 'vue';
|
import { computed, nextTick, onMounted, onUnmounted, ref, watch } from 'vue';
|
||||||
|
|
||||||
@@ -9,18 +9,18 @@ import { Popover, Tooltip } from 'ant-design-vue';
|
|||||||
import OverviewColumnHint from '#/components/overview/OverviewColumnHint.vue';
|
import OverviewColumnHint from '#/components/overview/OverviewColumnHint.vue';
|
||||||
|
|
||||||
import { formatYuanDetail, yuanToWanNum } from '../../../utils/money';
|
import { formatYuanDetail, yuanToWanNum } from '../../../utils/money';
|
||||||
import { getFinanceKpiHint } from '../finance-kpi-hints';
|
import { getFinanceKpiHint } from '../constants/finance-kpi-hints';
|
||||||
import {
|
import {
|
||||||
FINANCE_KPI_CARD_SHELL,
|
FINANCE_KPI_CARD_SHELL,
|
||||||
FINANCE_TONE_ICON,
|
FINANCE_TONE_ICON,
|
||||||
} from '../finance-ui';
|
} from '../constants/finance-ui';
|
||||||
import {
|
import {
|
||||||
cardById,
|
cardById,
|
||||||
clampFinanceKpiColsPerRow,
|
clampFinanceKpiColsPerRow,
|
||||||
kpiMetaByLabel,
|
kpiMetaByLabel,
|
||||||
normalizePrimary,
|
normalizePrimary,
|
||||||
sortCardIdsByCatalog,
|
sortCardIdsByCatalog,
|
||||||
} from '../kpi-catalog';
|
} from '../constants/kpi-catalog';
|
||||||
|
|
||||||
defineOptions({ name: 'WorkbenchFinanceKpiGrid' });
|
defineOptions({ name: 'WorkbenchFinanceKpiGrid' });
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { FinanceKpiCardId } from '../kpi-catalog';
|
import type { FinanceKpiCardId } from '../constants/kpi-catalog';
|
||||||
|
|
||||||
import { ref, watch } from 'vue';
|
import { ref, watch } from 'vue';
|
||||||
|
|
||||||
@@ -14,7 +14,7 @@ import {
|
|||||||
FINANCE_KPI_DEFAULT_VISIBLE_CARDS,
|
FINANCE_KPI_DEFAULT_VISIBLE_CARDS,
|
||||||
normalizePrimary,
|
normalizePrimary,
|
||||||
type FinanceKpiColsPerRow,
|
type FinanceKpiColsPerRow,
|
||||||
} from '../kpi-catalog';
|
} from '../constants/kpi-catalog';
|
||||||
|
|
||||||
defineOptions({ name: 'WorkbenchFinanceKpiSettingsModal' });
|
defineOptions({ name: 'WorkbenchFinanceKpiSettingsModal' });
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@ import { computed, nextTick, onMounted, onUnmounted, ref, watch } from 'vue';
|
|||||||
import { EchartsUI, useEcharts } from '@vben/plugins/echarts';
|
import { EchartsUI, useEcharts } from '@vben/plugins/echarts';
|
||||||
|
|
||||||
import { formatWanWithYuanDetail, yuanToWanNum } from '../../../utils/money';
|
import { formatWanWithYuanDetail, yuanToWanNum } from '../../../utils/money';
|
||||||
import { FINANCE_PANEL_SHELL } from '../finance-ui';
|
import { FINANCE_PANEL_SHELL } from '../constants/finance-ui';
|
||||||
|
|
||||||
defineOptions({ name: 'WorkbenchFinanceTrendChart' });
|
defineOptions({ name: 'WorkbenchFinanceTrendChart' });
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -11,7 +11,7 @@ import {
|
|||||||
storeOverviewHints,
|
storeOverviewHints,
|
||||||
} from '#/utils/overview-table-hints';
|
} from '#/utils/overview-table-hints';
|
||||||
|
|
||||||
import { FINANCE_PANEL_SHELL } from '../finance-ui';
|
import { FINANCE_PANEL_SHELL } from '../constants/finance-ui';
|
||||||
|
|
||||||
defineOptions({ name: 'WorkbenchPlatformSummaryCard' });
|
defineOptions({ name: 'WorkbenchPlatformSummaryCard' });
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -13,7 +13,7 @@ import {
|
|||||||
storeOverviewHints,
|
storeOverviewHints,
|
||||||
} from '#/utils/overview-table-hints';
|
} from '#/utils/overview-table-hints';
|
||||||
|
|
||||||
import { FINANCE_PANEL_SHELL } from '../finance-ui';
|
import { FINANCE_PANEL_SHELL } from '../constants/finance-ui';
|
||||||
|
|
||||||
const JumpIcon = createIconifyIcon('tdesign:jump');
|
const JumpIcon = createIconifyIcon('tdesign:jump');
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -13,7 +13,7 @@ import {
|
|||||||
normalizePrimary,
|
normalizePrimary,
|
||||||
sortCardIdsByCatalog,
|
sortCardIdsByCatalog,
|
||||||
type FinanceKpiCardId,
|
type FinanceKpiCardId,
|
||||||
} from './kpi-catalog';
|
} from '../constants/kpi-catalog';
|
||||||
|
|
||||||
type PrefsV2 = {
|
type PrefsV2 = {
|
||||||
version: 2;
|
version: 2;
|
||||||
@@ -13,8 +13,8 @@ import FinanceKpiSettingsModal from './components/FinanceKpiSettingsModal.vue';
|
|||||||
import FinanceTrendChart from './components/FinanceTrendChart.vue';
|
import FinanceTrendChart from './components/FinanceTrendChart.vue';
|
||||||
import OverviewTables from './components/OverviewTables.vue';
|
import OverviewTables from './components/OverviewTables.vue';
|
||||||
|
|
||||||
import { useFinanceKpiPreferences } from './useFinanceKpiPreferences';
|
import { useFinanceKpiPreferences } from './composables/useFinanceKpiPreferences';
|
||||||
import type { FinanceKpiCardId } from './kpi-catalog';
|
import type { FinanceKpiCardId } from './constants/kpi-catalog';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
buildCategoryOverviewFromDimRows,
|
buildCategoryOverviewFromDimRows,
|
||||||
|
|||||||
Reference in New Issue
Block a user