Showing
1 changed file
with
7 additions
and
7 deletions
@@ -366,7 +366,7 @@ public class ProductIdentifyServiceImpl implements ProductIdentifyService{ | @@ -366,7 +366,7 @@ public class ProductIdentifyServiceImpl implements ProductIdentifyService{ | ||
366 | 366 | ||
367 | @Override | 367 | @Override |
368 | public int applyToBeOwner(String tagId, String nfcUid, Integer uid) throws GatewayException { | 368 | public int applyToBeOwner(String tagId, String nfcUid, Integer uid) throws GatewayException { |
369 | - IdentifyRecord identifyRecord = queryIdentifyRecord(tagId, nfcUid); | 369 | + IdentifyRecord identifyRecord = identifyRecordsMapper.selectByTagAndNfcId(tagId, nfcUid);//防止缓存更新失败 |
370 | if(identifyRecord == null){ | 370 | if(identifyRecord == null){ |
371 | throw new GatewayException(402, "鉴定信息不存在"); | 371 | throw new GatewayException(402, "鉴定信息不存在"); |
372 | } | 372 | } |
@@ -411,7 +411,7 @@ public class ProductIdentifyServiceImpl implements ProductIdentifyService{ | @@ -411,7 +411,7 @@ public class ProductIdentifyServiceImpl implements ProductIdentifyService{ | ||
411 | if(null == status || !(status.equals(OPERATE_TYPE_PASS) || status.equals(OPERATE_TYPE_REJECT))){ | 411 | if(null == status || !(status.equals(OPERATE_TYPE_PASS) || status.equals(OPERATE_TYPE_REJECT))){ |
412 | throw new GatewayException(402, "参数status错误"); | 412 | throw new GatewayException(402, "参数status错误"); |
413 | } | 413 | } |
414 | - IdentifyRecord identifyRecord = identifyRecordsMapper.selectByTagAndNfcId(tagId, nfcUid); | 414 | + IdentifyRecord identifyRecord = queryIdentifyRecord(tagId, nfcUid); |
415 | if(identifyRecord == null){ | 415 | if(identifyRecord == null){ |
416 | throw new GatewayException(402, "鉴定信息不存在"); | 416 | throw new GatewayException(402, "鉴定信息不存在"); |
417 | } | 417 | } |
@@ -436,9 +436,9 @@ public class ProductIdentifyServiceImpl implements ProductIdentifyService{ | @@ -436,9 +436,9 @@ public class ProductIdentifyServiceImpl implements ProductIdentifyService{ | ||
436 | int result = transferRecordsHistoryMapper.insert(histroy); | 436 | int result = transferRecordsHistoryMapper.insert(histroy); |
437 | 437 | ||
438 | if(status.equals(OPERATE_TYPE_REJECT)) { | 438 | if(status.equals(OPERATE_TYPE_REJECT)) { |
439 | - setFinalTimeToEnd(inboxId, fromUid); | 439 | + setFinalTimeToEnd(inboxId, identifyRecord.getOwner()); |
440 | //“不同意”则拒绝物权占有,短信通知申请⼈人“您发起商品xxxxxx的物权转 移申请,当前物权所有⼈人拒绝转移申请,您可以重新发起物权申请” | 440 | //“不同意”则拒绝物权占有,短信通知申请⼈人“您发起商品xxxxxx的物权转 移申请,当前物权所有⼈人拒绝转移申请,您可以重新发起物权申请” |
441 | - messageFacade.ownerReject(String.valueOf(toUid), queryIdentifyRecord(tagId, nfcUid).getOrderCode()); | 441 | + messageFacade.ownerReject(String.valueOf(toUid), identifyRecord.getOrderCode()); |
442 | return result; | 442 | return result; |
443 | } | 443 | } |
444 | 444 | ||
@@ -453,7 +453,7 @@ public class ProductIdentifyServiceImpl implements ProductIdentifyService{ | @@ -453,7 +453,7 @@ public class ProductIdentifyServiceImpl implements ProductIdentifyService{ | ||
453 | 453 | ||
454 | //更新identify_record | 454 | //更新identify_record |
455 | result = identifyRecordsMapper.updateOwner(tagId, nfcUid, toUid); | 455 | result = identifyRecordsMapper.updateOwner(tagId, nfcUid, toUid); |
456 | - setFinalTimeToEnd(inboxId, fromUid); | 456 | + setFinalTimeToEnd(inboxId, identifyRecord.getOwner()); |
457 | //清理缓存 | 457 | //清理缓存 |
458 | clearIdentifyCache(tagId, nfcUid); | 458 | clearIdentifyCache(tagId, nfcUid); |
459 | 459 | ||
@@ -478,10 +478,10 @@ public class ProductIdentifyServiceImpl implements ProductIdentifyService{ | @@ -478,10 +478,10 @@ public class ProductIdentifyServiceImpl implements ProductIdentifyService{ | ||
478 | jo.replace("finalTime", 0); | 478 | jo.replace("finalTime", 0); |
479 | inBoxAttrDao.updateJsonContent(uid, inboxId, jo.toJSONString()); | 479 | inBoxAttrDao.updateJsonContent(uid, inboxId, jo.toJSONString()); |
480 | //清缓存 | 480 | //清缓存 |
481 | - deleteIboxsByRedis(uid, 2); | 481 | + deleteIboxsByRedis(uid, "N"); |
482 | } | 482 | } |
483 | 483 | ||
484 | - private void deleteIboxsByRedis(int uid, int type){ | 484 | + private void deleteIboxsByRedis(int uid, String type){ |
485 | logger.info("deleteIboxsByRedis params uid is {} type is {}",uid,type); | 485 | logger.info("deleteIboxsByRedis params uid is {} type is {}",uid,type); |
486 | RedisKeyBuilder inboxKey = CacheEnum.USERS_INBOX_LIST.generateKey(uid); | 486 | RedisKeyBuilder inboxKey = CacheEnum.USERS_INBOX_LIST.generateKey(uid); |
487 | redisTemplate.delete(inboxKey); | 487 | redisTemplate.delete(inboxKey); |
-
Please register or login to post a comment