From c8f11c229b87d1652b6da0b15576c166cd51eb8b Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期三, 01 一月 2020 14:25:22 +0800 Subject: [PATCH] 首页悬浮图mapperbug修改,增加商品详情中的比例展示 --- fanli/src/main/java/com/yeshi/fanli/controller/client/v1/ConfigController.java | 86 +++++++++++++++++++++++++++++++++++++------ 1 files changed, 74 insertions(+), 12 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/v1/ConfigController.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/v1/ConfigController.java index 5a2d633..4784d9b 100644 --- a/fanli/src/main/java/com/yeshi/fanli/controller/client/v1/ConfigController.java +++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/v1/ConfigController.java @@ -1,6 +1,8 @@ package com.yeshi.fanli.controller.client.v1; import java.io.PrintWriter; +import java.util.ArrayList; +import java.util.List; import javax.annotation.Resource; @@ -12,19 +14,26 @@ import com.yeshi.fanli.entity.accept.AcceptData; import com.yeshi.fanli.entity.bus.homemodule.FloatAD; +import com.yeshi.fanli.entity.bus.homemodule.SwiperPicture; +import com.yeshi.fanli.entity.bus.homemodule.FloatAD.FloatADTypeEnum; import com.yeshi.fanli.entity.bus.msg.MsgDeviceReadState; +import com.yeshi.fanli.entity.bus.user.UserActiveLog; import com.yeshi.fanli.entity.config.AppHomeFloatImg; import com.yeshi.fanli.entity.taobao.ClientTBPid; import com.yeshi.fanli.service.inter.common.JumpDetailV2Service; import com.yeshi.fanli.service.inter.config.ConfigService; import com.yeshi.fanli.service.inter.homemodule.FloatADService; +import com.yeshi.fanli.service.inter.homemodule.SwiperPictureService; import com.yeshi.fanli.service.inter.msg.MsgDeviceReadStateService; import com.yeshi.fanli.service.inter.taobao.TaoBaoUnionConfigService; +import com.yeshi.fanli.service.inter.tlj.UserTaoLiJinOriginService; import com.yeshi.fanli.service.inter.user.TBPidService; +import com.yeshi.fanli.service.inter.user.UserActiveLogService; import com.yeshi.fanli.service.inter.user.UserInfoExtraService; import com.yeshi.fanli.util.Constant; import com.yeshi.fanli.util.StringUtil; import com.yeshi.fanli.util.ThreadUtil; +import com.yeshi.fanli.util.VersionUtil; import net.sf.json.JSONObject; @@ -59,14 +68,27 @@ @Resource private MsgDeviceReadStateService msgDeviceReadStateService; + @Resource + private UserTaoLiJinOriginService uerTaoLiJinOriginService; + + @Resource + private UserActiveLogService userActiveLogService; + + @Resource + private SwiperPictureService swiperPictureService; + + /** - * 棣栭〉閰嶇疆淇℃伅 + * s 棣栭〉閰嶇疆淇℃伅 * * @param acceptData * @param out */ @RequestMapping(value = "getHomeConfig", method = RequestMethod.POST) public void getHomeConfig(AcceptData acceptData, Long uid, PrintWriter out) { + if (uid != null && uid == 0L) + uid = null; + AppHomeFloatImg appHomeFloatImg = configService.getAppHomeFloatImg(); if ("ios".equalsIgnoreCase(acceptData.getPlatform()) && !Constant.IS_TEST) { appHomeFloatImg = null; @@ -82,22 +104,17 @@ data.put("floatNotifyImg", notifyImg); } - // 鎮诞澶у浘 1.5.2 -2019.3.20 - FloatAD floatAD = floatADService.getEffectiveFloatAD(FloatAD.POSITION_INDEX); - if (floatAD != null) { + + // 鏃犳柊浜哄脊妗� 鍒欐煡璇㈤粯璁� + FloatAD floatAD = floatADService.getEffectiveFloatAD(FloatAD.POSITION_INDEX, 0); + if (floatAD != null && floatAD.getTypeEnum() != FloatADTypeEnum.newUserRedPack) { JSONObject detail = new JSONObject(); detail.put("img", floatAD.getPicture()); detail.put("jumpDetail", floatAD.getJumpDetail()); detail.put("params", floatAD.getParams()); detail.put("showTime", floatAD.getShowMode()); detail.put("accountLogin", floatAD.isJumpNeedLogin()); - - if (uid != null && userInfoExtraService.isNewUser(uid)) { - // 鏂扮敤鎴� - data.put("floatImgDetail", detail); - } else { - data.put("floatImgDetail", detail); - } + data.put("floatImgDetail", detail); } // 棰嗗埜甯姪閾炬帴,1.5.2鍚庣敓鏁� @@ -110,7 +127,31 @@ data.put("htmlLink", configService.get("index_html_link_android")); } + // 鍒ゆ柇鏂拌�佺敤鎴� + UserActiveLog da = null; + if (uid != null) + da = userActiveLogService.getFirstActiveInfo(uid); + // 鏂颁汉 + if (da == null || (System.currentTimeMillis() - da.getCreateTime().getTime()) <= 1000 * 60 * 60 * 24 * 15L) { + data.put("userTimeType", 0); + } else {// 鑰佷汉 + data.put("userTimeType", 1); + } + data.put("hotFuctionLink", + configService.getByVersion("hot_function_url", platform, Integer.parseInt(acceptData.getVersion())));// out.print(JsonUtil.loadTrueResult(data)); + } + + /** + * 娑堟伅涓績寮规 + * + * @param acceptData + * @param uid + * @param out + */ + @RequestMapping(value = "getMSGConfig", method = RequestMethod.POST) + public void getMSGConfig(AcceptData acceptData, Long uid, PrintWriter out) { + out.print(JsonUtil.loadFalseResult("鎺ㄥ箍绾㈠寘鐩稿叧鍔熻兘宸蹭笅绾匡紒")); } @RequestMapping(value = "getTaoBaoCartConfig", method = RequestMethod.POST) @@ -207,8 +248,17 @@ data.put("serviceProtocolLink", serviceProtocol); data.put("privacyProtocolLink", privacyProtocol); // 璐墿杞﹁烦杞柟寮�(鍖呭惈jumpDetail涓巔arams) - JSONObject source = JSONObject.fromObject(configService.get("taobao_cart_jump_detail")); + JSONObject source = JSONObject.fromObject(configService.getByVersion("taobao_cart_jump_detail", + acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion()))); data.put("taoBaoCart", source); + + if (VersionUtil.greaterThan_2_0_2(acceptData.getPlatform(), acceptData.getVersion())) { + // 鎴戠殑鐣岄潰banner + List<SwiperPicture> banner = swiperPictureService.getByBannerCardAndVersion("my_interface_banner",acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion())); + if (banner == null) + banner = new ArrayList<SwiperPicture>(); + data.put("banner", JsonUtil.getApiCommonGson().toJson(banner)); + } out.print(JsonUtil.loadTrueResult(data)); } catch (Exception e) { out.print(JsonUtil.loadFalseResult("鑾峰彇澶辫触")); @@ -273,7 +323,19 @@ "android".equalsIgnoreCase(acceptData.getPlatform()) ? 1 : 2); } }); + } + /** + * 鑾峰彇閭�璇风爜甯姪閾炬帴 + * + * @param acceptData + * @param out + */ + @RequestMapping(value = "getInviteCodeInputHelp", method = RequestMethod.POST) + public void getInviteCodeInputHelp(AcceptData acceptData, PrintWriter out) { + JSONObject data = new JSONObject(); + data.put("helpUrl", configService.get("invite_code_input_help")); + out.print(JsonUtil.loadTrueResult(data)); } } -- Gitblit v1.8.0