From fc91fcf22224762d3d9c4bce358977bc6b0eec3a Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期一, 05 八月 2019 15:37:23 +0800
Subject: [PATCH] 订单隐藏位数修改

---
 fanli/src/main/java/com/yeshi/fanli/util/cache/TaoBaoGoodsCacheUtil.java |   58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 58 insertions(+), 0 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/util/cache/TaoBaoGoodsCacheUtil.java b/fanli/src/main/java/com/yeshi/fanli/util/cache/TaoBaoGoodsCacheUtil.java
index 1206fc3..494f25e 100644
--- a/fanli/src/main/java/com/yeshi/fanli/util/cache/TaoBaoGoodsCacheUtil.java
+++ b/fanli/src/main/java/com/yeshi/fanli/util/cache/TaoBaoGoodsCacheUtil.java
@@ -42,4 +42,62 @@
 			return null;
 	}
 
+	/**
+	 * 鏄惁鍙互娣诲姞鍒版洿鏂伴槦鍒椾腑
+	 * 
+	 * @param auctionId
+	 * @return
+	 */
+	public boolean canAddToUpdateQueue(Long auctionId) {
+		String key = "tb-u-q-" + auctionId;
+		String value = redisManager.getCommonString(key);
+		if (StringUtil.isNullOrEmpty(value))
+			return true;
+		else
+			return false;
+	}
+
+	/**
+	 * 澧炲姞娣诲姞鍒伴槦鍒椾腑鐨勮褰�
+	 * 
+	 * @param auctionId
+	 */
+	public void addAddToQueueHistory(Long auctionId) {
+		String key = "tb-u-q-" + auctionId;
+		redisManager.cacheCommonString(key, "1", 60 * 60 * 2);// 鏈夋晥鏈�2涓皬鏃�
+	}
+
+	/**
+	 * 鏌ヨ鍟嗗搧鏄惁闇�瑕佹洿鏂�
+	 * 
+	 * @param actionId
+	 * @return
+	 */
+	public boolean needUpdate(Long actionId) {
+		String key = "tb-u-" + actionId;
+		String value = redisManager.getCommonString(key);
+		if (StringUtil.isNullOrEmpty(value))
+			return true;
+		else
+			return false;
+	}
+
+	/**
+	 * 娣诲姞鏇存柊璁板綍鏁版嵁
+	 * 
+	 * @param actionId
+	 * @return
+	 */
+	public void addUpdateHistory(Long actionId) {
+		String key = "tb-u-" + actionId;
+		redisManager.cacheCommonString(key, "1", 60 * 60 * 1);// 鏈夋晥鏈�1涓皬鏃�
+	}
+
+	/**
+	 * 鍒犻櫎鏇存柊璁板綍
+	 */
+	public void removeUpdateHistory() {
+		// TODO 鍑屾櫒鍒犻櫎缂撳瓨璁板綍
+	}
+
 }

--
Gitblit v1.8.0