parent
79d1a7c87c
commit
a0fca4c050
@ -0,0 +1,19 @@
|
||||
package com.mashibing.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Insert;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
/**
|
||||
* @author zjw
|
||||
* @description
|
||||
*/
|
||||
public interface UserPointsIdempotentMapper {
|
||||
|
||||
@Select("select count(1) from user_points_idempotent where id = #{id}")
|
||||
int findById(@Param("id") String id);
|
||||
|
||||
@Insert("insert into user_points_idempotent (id) values (#{id})")
|
||||
void save(@Param("id") String id);
|
||||
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package com.mashibing.service;
|
||||
|
||||
import org.springframework.amqp.core.Message;
|
||||
|
||||
/**
|
||||
* @author zjw
|
||||
* @description
|
||||
*/
|
||||
public interface UserPointsConsume {
|
||||
|
||||
/**
|
||||
* 消费消息的逻辑
|
||||
* @param message
|
||||
*/
|
||||
void consume(Message message);
|
||||
|
||||
}
|
Loading…
Reference in new issue