商品修改 发送通知

This commit is contained in:
2026-04-14 13:44:27 +08:00
parent 85bc610c10
commit c1c7cbba7b
4 changed files with 72 additions and 0 deletions

View File

@@ -202,6 +202,18 @@ public class ProductController {
return CzgResult.success();
}
/**
* 商品-标记售罄
*/
@PostMapping("markIsAutoSoldOut")
//@SaStaffCheckPermission("yun_xu_shou_qing_shang_pin")
//@SaAdminCheckPermission("product:markIsSoldOut")
public CzgResult<Void> markIsAutoSoldOut(@RequestBody @Validated({DefaultGroup.class}) ProductIsAutoSaleParam param) {
productService.markProductIsAutoSoldOut(StpKit.USER.getShopId(), param);
ThreadUtil.execAsync(() -> rabbitPublisher.sendProductInfoChangeMsg(Convert.toStr(StpKit.USER.getShopId())));
return CzgResult.success();
}
/**
* 商品-绑定耗材
*/
@@ -211,6 +223,7 @@ public class ProductController {
public CzgResult<Void> bindCons(@RequestBody @Validated({DefaultGroup.class}) ProdConsBindDTO param) {
AssertUtil.isNull(param.getId(), "商品Id不能为空");
prodConsRelationService.saveProdConsRelation(param);
ThreadUtil.execAsync(() -> rabbitPublisher.sendProductInfoChangeMsg(Convert.toStr(StpKit.USER.getShopId())));
asyncConsProToShop(param.getId());
return CzgResult.success();
}