From d49287202635214ca9f9aba80f4e242b7f77d0a3 Mon Sep 17 00:00:00 2001 From: yujian <yujian> Date: 星期三, 06 三月 2019 15:12:49 +0800 Subject: [PATCH] 抽奖规则 代码bug修改 --- fanli/src/main/java/com/yeshi/fanli/controller/client/RecommendController.java | 59 ++++++++++------------------------------------------------- 1 files changed, 10 insertions(+), 49 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/RecommendController.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/RecommendController.java index be27d3b..ef3dcb4 100644 --- a/fanli/src/main/java/com/yeshi/fanli/controller/client/RecommendController.java +++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/RecommendController.java @@ -1636,14 +1636,8 @@ listswiper = swiperPictureService.getByBannerCard(swiperCard); - if (listswiper != null && listswiper.size() > 0) { - for (SwiperPicture swiperPicture : listswiper) { - swiperPicture.setBannerId(null); - swiperPicture.setCreatetime(null); - swiperPicture.setUpdatetime(null); - swiperPicture.setState(null); - swiperPicture.setRemark(null); - } + if (listswiper == null) { + listswiper = new ArrayList<SwiperPicture>(); } } catch (Exception e) { @@ -1661,12 +1655,6 @@ if (listSpecial != null && listSpecial.size() > 0) { for (Special special : listSpecial) { - special.setCreatetime(null); - special.setUpdatetime(null); - special.setState(null); - special.setRemark(null); - special.setCard(null); - special.setCardId(null); if ("闄愭椂绉掓潃".equals(special.getName())) { miaoShaSpecial = special; @@ -1680,6 +1668,7 @@ // 鍏朵粬涓撻 specialList.add(special); } + } } @@ -1713,16 +1702,18 @@ } JSONObject root = new JSONObject(); - root.put("banner", listswiper); - root.put("honest", honestList); - root.put("special", specialList); + + root.put("banner", JsonUtil.getApiCommonGson().toJson(listswiper)); + root.put("honest", JsonUtil.getApiCommonGson().toJson(honestList)); + root.put("special", JsonUtil.getApiCommonGson().toJson(specialList)); root.put("miaoSha", msJSON); + // 澧炲姞閭�璇锋湁濂� JSONObject invite = new JSONObject(); JumpDetailV2 jumpDetail = jumpDetailV2Service.getByTypeCache("invite"); invite.put("jumpDetail", jumpDetail); - invite.put("picture", "http://ec-1255749512.file.myqcloud.com/resource/weex/img/invite_input_img.png"); + invite.put("picture", configService.get("home_invite_banner")); if ("ios".equalsIgnoreCase(acceptData.getPlatform()) && configService.iosOnLining(Integer.parseInt(acceptData.getVersion()))) { @@ -2258,42 +2249,12 @@ List<Special> listSpecial = specialService.listPageBySystemAndCard(0, Integer.MAX_VALUE, specialCard, system.getId()); - if (listSpecial != null && listSpecial.size() > 0) { - for (Special special : listSpecial) { - special.setCreatetime(null); - special.setUpdatetime(null); - special.setState(null); - special.setRemark(null); - special.setCard(null); - special.setCardId(null); - - JumpDetailV2 jumpDetail = special.getJumpDetail(); - if (jumpDetail != null) { - jumpDetail.setId(null); - jumpDetail.setName(null); - } - // 閭�璇风櫥闄嗛獙璇� - if(jumpDetail.getType().equals("invite_web") && jumpDetail.getNeedLogin() - && uid != null) { - - UserInfoExtra userInfoExtra = userInfoExtraService.getUserInfoExtra(uid); - if (userInfoExtra != null && userInfoExtra.getInviteCode() != null - && userInfoExtra.getInviteCode().trim().length() > 0) { - - JSONObject params = new JSONObject(); - params.put("url", configService.get("invite_activation_success_url")); - special.setParams(params.toString()); - } - } - } - } - if (listSpecial == null) { listSpecial = new ArrayList<Special>(); } JSONObject root = new JSONObject(); - root.put("special", listSpecial); + root.put("special", JsonUtil.getApiCommonGson().toJson(listSpecial)); out.print(JsonUtil.loadTrueResult(root)); } catch (Exception e) { -- Gitblit v1.8.0