Browse Source

修改客户app存入redis错误

dev_shibei_match
jianjun 5 years ago
parent
commit
e8f51e4429
  1. 8
      epmet-auth/src/main/java/com/epmet/redis/CustomerAppWxServiceUtil.java
  2. 2
      epmet-auth/src/main/resources/bootstrap.yml

8
epmet-auth/src/main/java/com/epmet/redis/CustomerAppWxServiceUtil.java

@ -13,6 +13,7 @@ import cn.binarywang.wx.miniapp.api.impl.WxMaServiceImpl;
import cn.binarywang.wx.miniapp.config.impl.WxMaDefaultConfigImpl;
import com.alibaba.fastjson.JSON;
import com.epmet.commons.tools.redis.RedisKeys;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.CustomerAppDTO;
import com.epmet.dto.CustomerAppRedisDTO;
@ -115,7 +116,12 @@ public class CustomerAppWxServiceUtil implements ApplicationRunner {
maServices = maServicesNew;
if (appSet != null && result != null) {
for (CustomerAppDTO app : result) {
appSet.add(appKey, app);
CustomerAppRedisDTO appRedis = ConvertUtils.sourceToTarget(app, CustomerAppRedisDTO.class);
if(appRedis == null){
logger.warn("init CustomerAppRedis fail,convert return null,appDB:{}",JSON.toJSONString(app));
continue;
}
appSet.add(appKey, appRedis);
}
}
}

2
epmet-auth/src/main/resources/bootstrap.yml

@ -10,7 +10,7 @@ spring:
allow-bean-definition-overriding: true
#环境 dev|test|prod
profiles:
active: dev
active: @spring.profiles.active@
messages:
encoding: UTF-8
basename: i18n/messages_common

Loading…
Cancel
Save