Commit d6c4e422 authored by fangxinjiang's avatar fangxinjiang

实缴查询-fxj

parent 673c1468
...@@ -5255,19 +5255,17 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -5255,19 +5255,17 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
private R<IPage<TPaymentInfoNewVo>> getLockNew(Page<TPaymentInfo> page, TPaymentInfoSearchVo tPaymentInfo) { private R<IPage<TPaymentInfoNewVo>> getLockNew(Page<TPaymentInfo> page, TPaymentInfoSearchVo tPaymentInfo) {
String keyTemp = CacheConstants.PAYMENT_SEARCH_REPEAT; String keyTemp = CacheConstants.PAYMENT_SEARCH_REPEAT;
String requestId; String requestId = null;
try { try {
requestId = RedisDistributedLock.getLock(keyTemp,"10"); requestId = RedisDistributedLock.getLock(keyTemp,"10");
} catch (Exception e) {
throw new RuntimeException(ResultConstants.NO_GETLOCK_DATA+CommonConstants.DOWN_LINE_STRING+e.getMessage());
}
try {
if (Common.isNotNull(requestId)) { if (Common.isNotNull(requestId)) {
//查询数据 //查询数据
return new R<>(this.getTPaymentInfoNewPage(page, tPaymentInfo)); return new R<>(this.getTPaymentInfoNewPage(page, tPaymentInfo));
} else { } else {
return R.failed(ResultConstants.NO_GETLOCK_DATA_SEARCH); return R.failed(ResultConstants.NO_GETLOCK_DATA_SEARCH);
} }
} catch (Exception e) {
throw new RuntimeException(ResultConstants.NO_GETLOCK_DATA+CommonConstants.DOWN_LINE_STRING+e.getMessage());
}finally { }finally {
//主动释放锁 //主动释放锁
RedisDistributedLock.unlock(keyTemp, requestId); RedisDistributedLock.unlock(keyTemp, requestId);
...@@ -5276,19 +5274,18 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa ...@@ -5276,19 +5274,18 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
private R<IPage<TPaymentInfo>> getLock(Page<TPaymentInfo> page, TPaymentInfoSearchVo tPaymentInfo) { private R<IPage<TPaymentInfo>> getLock(Page<TPaymentInfo> page, TPaymentInfoSearchVo tPaymentInfo) {
String keyTemp = CacheConstants.PAYMENT_SEARCH_REPEAT; String keyTemp = CacheConstants.PAYMENT_SEARCH_REPEAT;
String requestId; String requestId = null;
try { try {
requestId = RedisDistributedLock.getLock(keyTemp,"10"); requestId = RedisDistributedLock.getLock(keyTemp,"10");
} catch (Exception e) {
throw new RuntimeException(ResultConstants.NO_GETLOCK_DATA+CommonConstants.DOWN_LINE_STRING+e.getMessage());
}
try {
if (Common.isNotNull(requestId)) { if (Common.isNotNull(requestId)) {
//查询数据 //查询数据
return new R<>(this.getTPaymentInfoPage(page, tPaymentInfo)); return new R<>(this.getTPaymentInfoPage(page, tPaymentInfo));
} else { } else {
return R.failed(ResultConstants.NO_GETLOCK_DATA_SEARCH); return R.failed(ResultConstants.NO_GETLOCK_DATA_SEARCH);
} }
} catch (Exception e) {
throw new RuntimeException(ResultConstants.NO_GETLOCK_DATA+CommonConstants.DOWN_LINE_STRING+e.getMessage());
}finally { }finally {
//主动释放锁 //主动释放锁
RedisDistributedLock.unlock(keyTemp, requestId); RedisDistributedLock.unlock(keyTemp, requestId);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment