Authored by mlge

增加日志打印

... ... @@ -281,15 +281,14 @@ public class ProductIdentifyServiceImpl implements ProductIdentifyService{
RedisKeyBuilder kb = new RedisKeyBuilder().appendFixed("ufo:product:identifyRelation:").appendVar(authUid);
IdentifyRelation result = clientCache.get(kb, IdentifyRelation.class);
if( result != null){
logger.info("queryIdentifyRelation from cache success! authUid={}", authUid);
logger.info("queryIdentifyRelation from cache success! authUid={}, result={}", authUid, result);
return result;
}
result = identifyRelationMapper.selectByauthUid(authUid);
if(result != null){
clientCache.setEx(kb, result, 2 * 60 * 60 );//两小时
}
logger.info("queryIdentifyRelation from db success! authUid={}, result={}", authUid, result);
return result;
}
... ... @@ -299,13 +298,14 @@ public class ProductIdentifyServiceImpl implements ProductIdentifyService{
appendVar(tagId).appendVar(":").appendVar(nfcUid);
IdentifyRecord result = clientCache.get(kb, IdentifyRecord.class);
if( result != null){
logger.info("queryIdentifyRecord from cache success! tagId={},nfcUid={} ",tagId, nfcUid );
logger.info("queryIdentifyRecord from cache success! tagId={},nfcUid={},result={} ",tagId, nfcUid,result );
return result;
}
result = identifyRecordsMapper.selectByTagAndNfcId(tagId, nfcUid);
if(result != null){
clientCache.setEx(kb, result, 5 * 60 );
}
logger.info("queryIdentifyRecord from db success! tagId={},nfcUid={},result={} ",tagId, nfcUid,result );
return result;
}
... ...