feat(移动端): todo事项

优化注册页面
master
wayn 4 years ago
parent d2d222b645
commit 21066b4d5b

@ -33,7 +33,7 @@
<spring-boot.version>2.4.4</spring-boot.version>
<mysql.connector.java.version>8.0.19</mysql.connector.java.version>
<jedis.version>3.3.0</jedis.version>
<elasticsearch.version>7.4.2</elasticsearch.version>
<elasticsearch.version>[7.9.2,)</elasticsearch.version>
<lombok.version>1.18.6</lombok.version>
<mybatis-plus.version>3.4.2</mybatis-plus.version>
<druid.version>1.2.4</druid.version>

@ -63,7 +63,9 @@ public class CacheConfig extends CachingConfigurerSupport {
RedisTemplate<String, Object> redisTemplate = new RedisTemplate<>();
redisTemplate.setConnectionFactory(jedisConnectionFactory);
redisTemplate.setKeySerializer(keySerializer());
redisTemplate.setHashKeySerializer(keySerializer());
redisTemplate.setValueSerializer(valueSerializer());
redisTemplate.setHashValueSerializer(valueSerializer());
redisTemplate.afterPropertiesSet();
return redisTemplate;
}

@ -1,6 +1,7 @@
package com.wayn.data.redis.manager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.DependsOn;
import org.springframework.data.redis.core.HashOperations;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.ValueOperations;

@ -20,6 +20,7 @@ import org.springframework.web.client.RestTemplate;
import java.io.IOException;
import java.util.Map;
import java.util.concurrent.TimeUnit;
@Slf4j
@RabbitListener(queues = "EmailDirectQueue")
@ -68,6 +69,7 @@ public class EmailDirectReceiver {
// multiple参数确认收到消息false只确认当前consumer一个消息收到true确认所有consumer获得的消息
channel.basicAck(deliveryTag, false);
redisCache.setCacheMapValue("email_consumer_set", msgId, "email has send");
redisCache.expire("email_consumer_set", 180, TimeUnit.SECONDS);
} catch (Exception e) {
channel.basicNack(deliveryTag, false, true);
log.error(e.getMessage(), e);

@ -19,6 +19,7 @@ import org.springframework.util.MultiValueMap;
import org.springframework.web.client.RestTemplate;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
@Slf4j
public class OrderDirectReceiver {
@ -70,6 +71,7 @@ public class OrderDirectReceiver {
// multiple参数确认收到消息false只确认当前consumer一个消息收到true确认所有consumer获得的消息
channel.basicAck(deliveryTag, false);
redisCache.setCacheMapValue("order_consumer_set", msgId, "order done");
redisCache.expire("order_consumer_set", 180, TimeUnit.SECONDS);
} catch (Exception e) {
channel.basicNack(deliveryTag, false, true);
log.error(e.getMessage(), e);

Loading…
Cancel
Save