From 3ce9e928e082ff8abf697dba560cbfbb412e89f8 Mon Sep 17 00:00:00 2001 From: yujian <yujian@123.com> Date: 星期一, 11 十一月 2019 15:45:02 +0800 Subject: [PATCH] 商城后台编辑 --- fanli/src/main/java/com/yeshi/fanli/controller/client/v2/RedPackControllerV2.java | 33 ++++++++++++++++++++++----------- 1 files changed, 22 insertions(+), 11 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/RedPackControllerV2.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/RedPackControllerV2.java index f9acd8b..4864793 100644 --- a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/RedPackControllerV2.java +++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/RedPackControllerV2.java @@ -29,6 +29,7 @@ import com.yeshi.fanli.entity.bus.homemodule.SwiperPicture; import com.yeshi.fanli.entity.bus.user.UserInfo; import com.yeshi.fanli.entity.bus.user.UserInfoExtra; +import com.yeshi.fanli.entity.redpack.RedPackBalance; import com.yeshi.fanli.entity.redpack.RedPackDetail.RedPackDetailTypeEnum; import com.yeshi.fanli.entity.redpack.RedPackExchange; import com.yeshi.fanli.entity.redpack.RedPackWinInvite; @@ -77,8 +78,8 @@ @Resource private RedPackWinInviteService redPackWinInviteService; - - @Resource + + @Resource private RedPackWinNewUserService redPackWinNewUserService; @Resource @@ -86,10 +87,10 @@ @Resource private UserInfoExtraService userInfoExtraService; - + @Resource private JumpDetailV2Service jumpDetailV2Service; - + @Resource private SwiperPictureService swiperPictureService; @@ -380,10 +381,18 @@ out.print(JsonUtil.loadFalseResult(1, "鐢ㄦ埛鏈櫥褰�")); return; } + JSONObject data = new JSONObject(); data.put("balance", redPackBalanceService.getBalance(uid)); data.put("ruleLink", redPackConfigService.getValueByKey("invite_reward_rule_link")); data.put("shareLink", UserInviteUtil.getShareUrl(uid)); + + RedPackBalance redPackBalance = redPackBalanceService.selectByPrimaryKey(uid); + if (redPackBalance != null && redPackBalance.getState() == RedPackBalance.STATE_LOCKED) { + data.put("redPackLock", true); + } else { + data.put("redPackLock", false); + } UserInfoExtra userInfoExtra = userInfoExtraService.getUserInfoExtra(uid); if (userInfoExtra != null && !StringUtil.isNullOrEmpty(userInfoExtra.getInviteCode())) { @@ -397,10 +406,10 @@ } else out.print(JsonUtil.loadTrueResult(data)); } - - + /** * 鏂颁汉绾㈠寘璇︽儏 + * * @param acceptData * @param uid * @param out @@ -411,14 +420,16 @@ out.print(JsonUtil.loadFalseResult(1, "鐢ㄦ埛鏈櫥褰�")); return; } - + try { RedPackWinDetailVO winDetail = redPackWinNewUserService.receiveReward(uid); if (winDetail == null) { out.print(JsonUtil.loadFalseResult(1, "绾㈠寘宸茶鎶㈠厜")); return; } - + winDetail.setLogo(Constant.systemCommonConfig.getDefaultPortrait()); + winDetail.setLogoLight(Constant.systemCommonConfig.getDefaultPortrait()); + JSONObject params = new JSONObject(); params.put("url", redPackConfigService.getValueByKey("goods_shop_link_h5")); winDetail.setParams(params.toString()); @@ -427,15 +438,15 @@ winDetail.setTips(redPackConfigService.getValueByKey("new_user_win_tips")); // 2銆侀《閮ㄨ疆鎾浘 - List<SwiperPicture> oldtopPicList = swiperPictureService.getByBannerCard("index_top"); + List<SwiperPicture> oldtopPicList = swiperPictureService.getByBannerCard("redpack_win_detail_banner"); List<SwiperPicture> topPicList = new ArrayList<>(); if (oldtopPicList != null && oldtopPicList.size() > 0) topPicList.addAll(oldtopPicList); - + JSONObject data = new JSONObject(); data.put("detail", JsonUtil.getApiCommonGson().toJson(winDetail)); data.put("banner", JsonUtil.getApiCommonGson().toJson(topPicList)); - out.print(JsonUtil.loadTrueResult(data)); + out.print(JsonUtil.loadTrueResult(data)); } catch (Exception e) { out.print(JsonUtil.loadFalseResult(1, "绾㈠寘宸茶鎶㈠厜鍟�")); } -- Gitblit v1.8.0