parent
b396f8a1a4
commit
f713dd0f61
@ -0,0 +1,29 @@
|
||||
package com.luoo.user.listener;
|
||||
|
||||
import com.luoo.user.service.StoreService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
|
||||
import org.springframework.amqp.rabbit.annotation.RabbitListener;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @program: luoo_parent
|
||||
* @description: 门店浏览次数记录
|
||||
* @author: yawei.huang
|
||||
* @create: 2024-08-22 08:43
|
||||
**/
|
||||
@Component
|
||||
@RabbitListener(queues = "store_visit")
|
||||
@Slf4j
|
||||
public class StoreVisitCountListener {
|
||||
|
||||
@Autowired
|
||||
private StoreService storeService;
|
||||
|
||||
@RabbitHandler
|
||||
public void executeDraw(String id) {
|
||||
log.info("store_visit-id:{}", id);
|
||||
storeService.addVisitCount(id);
|
||||
}
|
||||
}
|
Loading…
Reference in new issue