From dd5b15229cb15459fa7c31ccea77dac28cbfafbd Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期一, 13 四月 2020 10:04:20 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/div' into div --- fanli/src/main/java/com/yeshi/fanli/service/impl/goods/TaoBaoCouponServiceImpl.java | 14 ++++++-------- 1 files changed, 6 insertions(+), 8 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/goods/TaoBaoCouponServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/goods/TaoBaoCouponServiceImpl.java index 99273e1..5cd6e6d 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/goods/TaoBaoCouponServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/goods/TaoBaoCouponServiceImpl.java @@ -23,6 +23,7 @@ import com.yeshi.fanli.service.inter.goods.TaoBaoCouponService; import com.yeshi.fanli.service.inter.taobao.TaoBaoUnionConfigService; import com.yeshi.fanli.util.Constant; +import com.yeshi.fanli.util.RedisKeyEnum; import com.yeshi.fanli.util.RedisManager; import com.yeshi.fanli.util.StringUtil; import com.yeshi.fanli.util.taobao.TaoBaoCouponUtil; @@ -86,9 +87,8 @@ @Override public List<TaoBaoCoupon> getTaoBaoCouponListBykeys(List<String> searchKeys, int page) { - if (searchKeys == null || searchKeys.size() == 0) { - searchKeys = new ArrayList<String>(); - searchKeys.add(""); + if (searchKeys != null && searchKeys.size() == 0) { + searchKeys = null; } return taoBaoCouponMapper.getTaoBaoCouponListBykeys((page - 1) * Constant.PAGE_SIZE, Constant.PAGE_SIZE,searchKeys); @@ -96,11 +96,9 @@ @Override public int getCount(List<String> searchKeys) { - if (searchKeys == null || searchKeys.size() == 0) { - searchKeys = new ArrayList<String>(); - searchKeys.add(""); + if (searchKeys != null && searchKeys.size() == 0) { + searchKeys = null; } - return taoBaoCouponMapper.countTaoBaoCouponListBykeys(searchKeys); } @@ -117,7 +115,7 @@ @Override public List<TaoBaoGoodsBrief> getTaoBaoCouponList(int page) { System.out.println("杩涘叆浜嗘柟娉�"); - String key = "cachecoupon-" + page; + String key = RedisKeyEnum.getRedisKey(RedisKeyEnum.taobaoCachecoupon, page +""); String resultStr = ""; try { resultStr = redisManager.getCommonString(key); -- Gitblit v1.8.0