退款模式
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品-报损
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user