mirror of
				https://gitee.com/hhyykk/ipms-sjy.git
				synced 2025-11-04 04:08:43 +08:00 
			
		
		
		
	✨ MALL:默认异步记录商品访问日志、访问次数
This commit is contained in:
		@@ -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);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
 
 | 
			
		||||
@@ -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);
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user