From 6e439e8cc4f3832b9ed2e8a45920d02539e180ae Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: 星期五, 11 十一月 2022 12:19:54 +0800
Subject: [PATCH] 测试工商银行 支付 可能会编译失败
---
java110-core/src/main/java/com/java110/core/factory/CommunitySettingFactory.java | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 50 insertions(+), 1 deletions(-)
diff --git a/java110-core/src/main/java/com/java110/core/factory/CommunitySettingFactory.java b/java110-core/src/main/java/com/java110/core/factory/CommunitySettingFactory.java
index 95d7c82..3710dc8 100644
--- a/java110-core/src/main/java/com/java110/core/factory/CommunitySettingFactory.java
+++ b/java110-core/src/main/java/com/java110/core/factory/CommunitySettingFactory.java
@@ -2,12 +2,13 @@
import com.java110.dto.communitySetting.CommunitySettingDto;
import com.java110.intf.community.ICommunitySettingInnerServiceSMO;
+import com.java110.po.communitySetting.CommunitySettingPo;
import com.java110.utils.cache.BaseCache;
import com.java110.utils.factory.ApplicationContextFactory;
import com.java110.utils.util.SerializeUtil;
import com.java110.utils.util.StringUtil;
import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import com.java110.core.log.LoggerFactory;
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
import redis.clients.jedis.Jedis;
@@ -53,6 +54,37 @@
return communitySettingDto.getSettingValue();
}
+ /**
+ * 鏌ヨ璁剧疆鍊�
+ *
+ * @param communityId
+ * @param key
+ * @return
+ */
+ public static String getRemark(String communityId, String key) {
+ Jedis redis = null;
+ CommunitySettingDto communitySettingDto = null;
+ try {
+ redis = getJedis();
+ Object object = SerializeUtil.unserialize(redis.get((communityId + "_" + key + "_community_setting").getBytes()));
+ if (object == null) {//杩欓噷瀛樺湪骞跺彂闂锛屼絾鏄� 绛変簬鏌ヨ浜嗗娆� 鐒跺悗澶氭鍐欑紦瀛橈紝浣滆�呰涓� 杩欑搴旇姣斿姞鍏ㄥ眬閿佹晥鐜囬珮浜�
+ communitySettingDto = getCommunitySettingFromDb(communityId, key, redis);
+ } else {
+ communitySettingDto = (CommunitySettingDto) object;
+ }
+ } finally {
+ if (redis != null) {
+ redis.close();
+ }
+ }
+
+ if (communitySettingDto == null) {
+ return null;
+ }
+
+ return communitySettingDto.getRemark();
+ }
+
public static CommunitySettingDto getCommunitySettingFromDb(String communityId, String key) {
Jedis redis = null;
try {
@@ -102,6 +134,23 @@
}
/**
+ * 鎵嬪伐淇濆瓨鏁版嵁
+ *
+ * @param communitySettingDto
+ */
+ public static void deleteCommunitySetting(CommunitySettingPo communitySettingPo) {
+ Jedis redis = null;
+ try {
+ redis = getJedis();
+ redis.del((communitySettingPo.getCommunityId() + "_" + communitySettingPo.getSettingKey() + "_community_setting").getBytes());
+ } finally {
+ if (redis != null) {
+ redis.close();
+ }
+ }
+ }
+
+ /**
* 鏌ヨ璁剧疆鍊�
*
* @param communityId
--
Gitblit v1.8.0