退款模式

This commit is contained in:
2026-04-21 18:13:35 +08:00
parent 0f51159f95
commit 28f5ead83a
13 changed files with 5 additions and 274 deletions

View File

@@ -226,17 +226,6 @@ public class ProductController {
return CzgResult.success();
}
/**
* 商品-退款退至库存 开关
*/
@PostMapping("refundToStock")
@OperationLog("商品-退款退至库存")
//@SaAdminCheckPermission("product:update")
public CzgResult<Void> refundToStock(@RequestBody @Validated({DefaultGroup.class}) ProdRefundToStockParam param) {
productService.refundToStock(param);
asyncProductToShop(param.getId());
return CzgResult.success();
}
/**
* 商品-报损

View File

@@ -143,25 +143,11 @@ public class ShopProdCategoryController {
return CzgResult.success();
}
/**
* 启用
*/
@PostMapping("upRefundStock")
@OperationLog("商品分类-退菜退库存")
public CzgResult<Void> enableShopProdCategory(ShopProdCategoryDTO dto) {
//效验数据
AssertUtil.isNull(dto, "{}不能为空", "id");
shopProdCategoryService.upRefundStock(dto.getId(),dto.getIsRefundStock());
asyncToBranchShop(dto.getId());
return CzgResult.success();
}
private void asyncToBranchShop(Long id) {
long shopId = StpKit.USER.getShopId(0L);
long sysUserId = StpKit.USER.getLoginIdAsLong();
ThreadUtil.execAsync(() -> {
shopSyncService.syncCategoryBySourceShop(shopId, id, sysUserId);
});
ThreadUtil.execAsync(() -> shopSyncService.syncCategoryBySourceShop(shopId, id, sysUserId));
}
}