Showing
1 changed file
with
4 additions
and
4 deletions
@@ -281,15 +281,14 @@ public class ProductIdentifyServiceImpl implements ProductIdentifyService{ | @@ -281,15 +281,14 @@ public class ProductIdentifyServiceImpl implements ProductIdentifyService{ | ||
281 | RedisKeyBuilder kb = new RedisKeyBuilder().appendFixed("ufo:product:identifyRelation:").appendVar(authUid); | 281 | RedisKeyBuilder kb = new RedisKeyBuilder().appendFixed("ufo:product:identifyRelation:").appendVar(authUid); |
282 | IdentifyRelation result = clientCache.get(kb, IdentifyRelation.class); | 282 | IdentifyRelation result = clientCache.get(kb, IdentifyRelation.class); |
283 | if( result != null){ | 283 | if( result != null){ |
284 | - logger.info("queryIdentifyRelation from cache success! authUid={}", authUid); | 284 | + logger.info("queryIdentifyRelation from cache success! authUid={}, result={}", authUid, result); |
285 | return result; | 285 | return result; |
286 | } | 286 | } |
287 | - | ||
288 | result = identifyRelationMapper.selectByauthUid(authUid); | 287 | result = identifyRelationMapper.selectByauthUid(authUid); |
289 | - | ||
290 | if(result != null){ | 288 | if(result != null){ |
291 | clientCache.setEx(kb, result, 2 * 60 * 60 );//两小时 | 289 | clientCache.setEx(kb, result, 2 * 60 * 60 );//两小时 |
292 | } | 290 | } |
291 | + logger.info("queryIdentifyRelation from db success! authUid={}, result={}", authUid, result); | ||
293 | return result; | 292 | return result; |
294 | } | 293 | } |
295 | 294 | ||
@@ -299,13 +298,14 @@ public class ProductIdentifyServiceImpl implements ProductIdentifyService{ | @@ -299,13 +298,14 @@ public class ProductIdentifyServiceImpl implements ProductIdentifyService{ | ||
299 | appendVar(tagId).appendVar(":").appendVar(nfcUid); | 298 | appendVar(tagId).appendVar(":").appendVar(nfcUid); |
300 | IdentifyRecord result = clientCache.get(kb, IdentifyRecord.class); | 299 | IdentifyRecord result = clientCache.get(kb, IdentifyRecord.class); |
301 | if( result != null){ | 300 | if( result != null){ |
302 | - logger.info("queryIdentifyRecord from cache success! tagId={},nfcUid={} ",tagId, nfcUid ); | 301 | + logger.info("queryIdentifyRecord from cache success! tagId={},nfcUid={},result={} ",tagId, nfcUid,result ); |
303 | return result; | 302 | return result; |
304 | } | 303 | } |
305 | result = identifyRecordsMapper.selectByTagAndNfcId(tagId, nfcUid); | 304 | result = identifyRecordsMapper.selectByTagAndNfcId(tagId, nfcUid); |
306 | if(result != null){ | 305 | if(result != null){ |
307 | clientCache.setEx(kb, result, 5 * 60 ); | 306 | clientCache.setEx(kb, result, 5 * 60 ); |
308 | } | 307 | } |
308 | + logger.info("queryIdentifyRecord from db success! tagId={},nfcUid={},result={} ",tagId, nfcUid,result ); | ||
309 | return result; | 309 | return result; |
310 | } | 310 | } |
311 | 311 |
-
Please register or login to post a comment