From 63db275af1b016238bd659d12f0e1d15ee4a4072 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 8 Jan 2024 19:14:09 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20MALL=EF=BC=9A=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=BC=82=E6=AD=A5=E8=AE=B0=E5=BD=95=E5=95=86=E5=93=81=E8=AE=BF?= =?UTF-8?q?=E9=97=AE=E6=97=A5=E5=BF=97=E3=80=81=E8=AE=BF=E9=97=AE=E6=AC=A1?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../product/service/history/ProductBrowseHistoryService.java | 2 ++ .../yudao/module/product/service/spu/ProductSpuService.java | 3 +++ 2 files changed, 5 insertions(+) diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/history/ProductBrowseHistoryService.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/history/ProductBrowseHistoryService.java index b3cfc3d7a..2e204d75f 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/history/ProductBrowseHistoryService.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/history/ProductBrowseHistoryService.java @@ -3,6 +3,7 @@ package cn.iocoder.yudao.module.product.service.history; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.product.controller.admin.history.vo.ProductBrowseHistoryPageReqVO; import cn.iocoder.yudao.module.product.dal.dataobject.history.ProductBrowseHistoryDO; +import org.springframework.scheduling.annotation.Async; import java.util.Collection; @@ -20,6 +21,7 @@ public interface ProductBrowseHistoryService { * @param spuId SPU 编号 * @return 编号 */ + @Async Long createBrowseHistory(Long userId, Long spuId); /** diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/spu/ProductSpuService.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/spu/ProductSpuService.java index d8f83c68d..aa2d01832 100755 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/spu/ProductSpuService.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/spu/ProductSpuService.java @@ -6,6 +6,8 @@ import cn.iocoder.yudao.module.product.controller.app.spu.vo.AppProductSpuPageRe import cn.iocoder.yudao.module.product.dal.dataobject.spu.ProductSpuDO; import jakarta.validation.Valid; +import org.springframework.scheduling.annotation.Async; + import java.util.Collection; import java.util.List; import java.util.Map; @@ -154,6 +156,7 @@ public interface ProductSpuService { * @param id 商品 SPU 编号 * @param incrCount 增加的数量 */ + @Async void updateBrowseCount(Long id, int incrCount); }