parent
becd6e50d8
commit
79d1a7c87c
@ -0,0 +1,16 @@
|
|||||||
|
package com.mashibing.mapper;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Insert;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zjw
|
||||||
|
* @description
|
||||||
|
*/
|
||||||
|
public interface ResendMapper {
|
||||||
|
|
||||||
|
@Insert("insert into resend (id,message,exchange,routing_key,send_time) values (#{id},#{message},#{exchange},#{routingKey},#{sendTime})")
|
||||||
|
void save(Map map);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
package com.mashibing.util;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author zjw
|
||||||
|
* @description
|
||||||
|
*/
|
||||||
|
public class GlobalCache {
|
||||||
|
|
||||||
|
private static Map map = new HashMap();
|
||||||
|
|
||||||
|
public static void set(String key,Object value){
|
||||||
|
map.put(key,value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Object get(String key){
|
||||||
|
Object value = map.get(key);
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void remove(String key){
|
||||||
|
map.remove(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in new issue