From 51a4ff5d777028d52a19c314a99f796334cb7b51 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期六, 23 十一月 2019 18:30:01 +0800 Subject: [PATCH] 配置文件修改 --- fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/SpecialServiceImpl.java | 34 +++++++++++++++++++++++++++++----- 1 files changed, 29 insertions(+), 5 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/SpecialServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/SpecialServiceImpl.java index 3328cd6..5a7ce9c 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/SpecialServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/homemodule/SpecialServiceImpl.java @@ -30,6 +30,7 @@ import com.yeshi.fanli.service.inter.homemodule.SpecialCardService; import com.yeshi.fanli.service.inter.homemodule.SpecialPlaceService; import com.yeshi.fanli.service.inter.homemodule.SpecialService; +import com.yeshi.fanli.util.Constant; import com.yeshi.fanli.util.StringUtil; import com.yeshi.fanli.util.VersionUtil; @@ -458,7 +459,10 @@ else if (VersionUtil.greaterThan_1_5_60(acceptData.getPlatform(), acceptData.getVersion())) indexArc = "index_arc_1.5.6"; - List<Special> listArc = specialMapper.listByPlaceKey(indexArc, sex); + int platformCode = Constant.getPlatformCode(acceptData.getPlatform()); + int version = Integer.parseInt(acceptData.getVersion()); + + List<Special> listArc = specialMapper.listByPlaceKey(indexArc, sex, platformCode, version); if (listArc == null) { listArc = new ArrayList<Special>(); } else if (listArc.size() > 0) { @@ -506,7 +510,7 @@ && configService.iosOnLining(Integer.parseInt(acceptData.getVersion()))) { // 濡傛灉IOS褰撳墠鐗堟湰澶勪簬瀹℃牳鐘舵�佸氨涓嶈繑鍥� } else { - listActivity = specialMapper.listByPlaceKey("index_activity", null); + listActivity = specialMapper.listByPlaceKey("index_activity", null, platformCode, version); } if (listActivity == null) { @@ -529,7 +533,7 @@ indexBlock = "index_block_1.5.6"; JSONObject blockJsonMap = new JSONObject(); - List<Special> listBlock = specialMapper.listByPlaceKey(indexBlock, sex); + List<Special> listBlock = specialMapper.listByPlaceKey(indexBlock, sex, platformCode, version); if (listBlock == null) { listBlock = new ArrayList<Special>(); } else if (listBlock.size() > 0) { @@ -563,9 +567,29 @@ } @Override - public List<Special> listByPlaceKey(String placeKey) { - return specialMapper.listByPlaceKey(placeKey, null); + public List<Special> listByPlaceKey(String placeKey, Integer platform, Integer versionCode) { + return specialMapper.listByPlaceKey(placeKey, null, platform, versionCode); } + + + @Override + public List<Special> listByPlaceKeyList(long start, int count, List<String> list, Integer platform, Integer versionCode) { + return specialMapper.listByPlaceKeyList(start, count, list, null, platform, versionCode); + } + + + @Override + public long countByPlaceKeyList(List<String> list, Integer platform, Integer versionCode) { + return specialMapper.countByPlaceKeyList(list, null, platform, versionCode); + } + + + @Override + @Cacheable(value = "specialCache", key = "'listByPlaceKeyHasLabel'+#start+'-'+#platform+'-'+#versionCode+'-'+#list") + public List<Special> listByPlaceKeyHasLabel(long start, int count, List<String> list, Integer platform, Integer versionCode) { + return specialMapper.listByPlaceKeyHasLabel(start, count, list, null, platform, versionCode); + } + /** * 澶勭悊 鏁版嵁 -- Gitblit v1.8.0