From a4e938874dbc0376125324cb170f5885f88da8a7 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期一, 11 十一月 2019 16:45:51 +0800
Subject: [PATCH] 板栗商城退款修改,获取用户的会员运营ID与渠道ID修改
---
fanli/src/main/java/com/yeshi/fanli/aspect/RequestSerializableAspect.java | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/fanli/src/main/java/com/yeshi/fanli/aspect/RequestSerializableAspect.java b/fanli/src/main/java/com/yeshi/fanli/aspect/RequestSerializableAspect.java
index 3d31429..a18292e 100644
--- a/fanli/src/main/java/com/yeshi/fanli/aspect/RequestSerializableAspect.java
+++ b/fanli/src/main/java/com/yeshi/fanli/aspect/RequestSerializableAspect.java
@@ -96,8 +96,10 @@
cacheKey = "rs-" + StringUtil.Md5(cacheKey);
// jiedis鍘熷瓙鎬у仛鎷︽埅
Jedis jedis = jedisPool.getResource();
+ long threadId= Thread.currentThread().getId();
+ LogHelper.test("杩涘叆鎷︽埅:"+cacheKey+"-"+threadId);
try {
- Constant.waitingThreadSet.add(Thread.currentThread().getId());
+ Constant.waitingThreadSet.add(threadId);
long result = 0;
long startTime = System.currentTimeMillis();
// 绛夊緟鍝嶅簲
@@ -106,12 +108,13 @@
LogHelper.error("瑙﹀彂骞跺彂閿�:" + cacheAlias);
LogHelper.error("redis閿�:" + cacheKey);
if (result <= 0) {
+ LogHelper.test("绛夊緟:"+threadId);
try {
Thread.sleep(50);
} catch (InterruptedException e) {
e.printStackTrace();
}
- if (System.currentTimeMillis() - startTime > 1000 * 60L) {
+ if (System.currentTimeMillis() - startTime > 1000 * 30L) {
Constant.waitingThreadSet.remove(Thread.currentThread().getId());
out.print(JsonUtil.loadFalseResult("杩炴帴瓒呮椂"));
return null;
@@ -119,6 +122,8 @@
} else {
// 璁剧疆30绉掑鐞嗘椂闂�
jedis.expire(cacheKey, 30);
+ LogHelper.test("鑾峰彇鍒伴攣:"+threadId);
+ break;
}
}
@@ -129,8 +134,10 @@
e.printStackTrace();
LogHelper.errorDetailInfo(e);
} finally {
+ LogHelper.test("鏂规硶鎵ц瀹屾瘯:"+threadId);
jedis.del(cacheKey);
Constant.waitingThreadSet.remove(Thread.currentThread().getId());
+ LogHelper.test("閲婃斁閿�:"+threadId);
}
}
} finally {
--
Gitblit v1.8.0