From eec7e789a87863c25d92c10ad5dfc22ad80c448d Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期二, 14 七月 2020 12:36:48 +0800 Subject: [PATCH] 系统区分BUG修复 --- fanli/src/main/java/com/yeshi/fanli/controller/wxmp/v1/RecommendController.java | 73 ++++++++++++++++++------------------ 1 files changed, 36 insertions(+), 37 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/wxmp/v1/RecommendController.java b/fanli/src/main/java/com/yeshi/fanli/controller/wxmp/v1/RecommendController.java index 26eeca8..32a4583 100644 --- a/fanli/src/main/java/com/yeshi/fanli/controller/wxmp/v1/RecommendController.java +++ b/fanli/src/main/java/com/yeshi/fanli/controller/wxmp/v1/RecommendController.java @@ -7,6 +7,7 @@ import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; +import com.yeshi.fanli.util.*; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.yeshi.utils.JsonUtil; @@ -19,8 +20,6 @@ import com.yeshi.fanli.dto.pdd.PDDGoodsDetail; import com.yeshi.fanli.dto.pdd.PDDGoodsResult; import com.yeshi.fanli.entity.accept.AcceptData; -import com.yeshi.fanli.entity.bus.homemodule.Special; -import com.yeshi.fanli.entity.bus.homemodule.SwiperPicture; import com.yeshi.fanli.entity.common.JumpDetailV2; import com.yeshi.fanli.entity.jd.JDGoods; import com.yeshi.fanli.entity.system.ConfigKeyEnum; @@ -37,18 +36,17 @@ import com.yeshi.fanli.service.inter.lable.QualityFlashSaleService; import com.yeshi.fanli.service.inter.lable.QualityGoodsService; import com.yeshi.fanli.service.inter.monitor.MonitorService; +import com.yeshi.fanli.service.inter.order.OrderHongBaoMoneyComputeService; import com.yeshi.fanli.service.inter.order.config.HongBaoManageService; import com.yeshi.fanli.service.inter.pdd.PDDGoodsService; import com.yeshi.fanli.service.inter.taobao.TaoBaoGoodsUpdateService; import com.yeshi.fanli.service.inter.taobao.dataoke.DaTaoKeGoodsDetailV2Service; import com.yeshi.fanli.service.inter.taobao.dataoke.DaTaoKeGoodsService; import com.yeshi.fanli.tag.PageEntity; -import com.yeshi.fanli.util.Constant; -import com.yeshi.fanli.util.JumpDetailUtil; -import com.yeshi.fanli.util.RedisManager; -import com.yeshi.fanli.util.StringUtil; import com.yeshi.fanli.util.factory.goods.GoodsDetailVOFactory; import com.yeshi.fanli.vo.goods.GoodsDetailVO; +import com.yeshi.fanli.vo.homemodule.BannerVO; +import com.yeshi.fanli.vo.homemodule.SpecialVO; import net.sf.json.JSONArray; import net.sf.json.JSONObject; @@ -59,6 +57,9 @@ @Resource private HongBaoManageService hongBaoManageService; + + @Resource + private OrderHongBaoMoneyComputeService orderHongBaoMoneyComputeService; @Resource private QualityGoodsService qualityGoodsService; @@ -125,50 +126,49 @@ int version = Integer.parseInt(acceptData.getVersion()); // 杞挱鍥� - List<SwiperPicture> picList = swiperPictureService.getByBannerCardAndVersion("index_top", platform, - version); + List<BannerVO> picList = swiperPictureService.getByBannerCardAndVersion("index_top", platform, + version,acceptData.getSystem()); if (picList == null) { picList = new ArrayList<>(); } - for (SwiperPicture swiper : picList) { - JSONObject params = null; - if (StringUtil.isNullOrEmpty(swiper.getParams())) { - params = JSONObject.fromObject(swiper.getParams()); - } + for (BannerVO swiper : picList) { +// JSONObject params = null; +// if (StringUtil.isNullOrEmpty(swiper.getParams())) { +// params = JSONObject.fromObject(swiper.getParams()); +// } swiper.setJumpDetail(JumpDetailUtil.getWXMPJumDetail(swiper.getJumpDetail())); } // 鍦嗗舰涓撻 - List<Special> specials = specialService.listByVersion(0, 10, "index_arc_1.6.5", platform, version); + List<SpecialVO> specials = specialService.listByVersion(0, 10, "index_arc_1.6.5", platform, version,acceptData.getSystem()); if (specials == null) specials = new ArrayList<>(); - for (Special special : specials) { + for (SpecialVO special : specials) { JumpDetailV2 jumpDetail = special.getJumpDetail(); if (special.isJumpLogin() && jumpDetail != null) { jumpDetail.setNeedLogin(true); } - JSONObject params = null; - if (StringUtil.isNullOrEmpty(special.getParams())) { - params = JSONObject.fromObject(special.getParams()); - } - +// JSONObject params = null; +// if (StringUtil.isNullOrEmpty(special.getParams())) { +// params = JSONObject.fromObject(special.getParams()); +// } special.setJumpDetail(JumpDetailUtil.getWXMPJumDetail(jumpDetail)); } // 娲诲姩 - List<SwiperPicture> activitys = swiperPictureService.getByBannerCardAndVersion("index_invite", platform, - version); + List<BannerVO> activitys = swiperPictureService.getByBannerCardAndVersion("index_invite", platform, + version,acceptData.getSystem()); if (activitys == null) activitys = new ArrayList<>(); - for (SwiperPicture swiper : activitys) { - JSONObject params = null; - if (StringUtil.isNullOrEmpty(swiper.getParams())) { - params = JSONObject.fromObject(swiper.getParams()); - } + for (BannerVO swiper : activitys) { +// JSONObject params = null; +// if (StringUtil.isNullOrEmpty(swiper.getParams())) { +// params = JSONObject.fromObject(swiper.getParams()); +// } swiper.setJumpDetail(JumpDetailUtil.getWXMPJumDetail(swiper.getJumpDetail())); } @@ -232,7 +232,7 @@ * @param out */ private void getIndexJDGoods(WXMPAcceptData acceptData, int page, PrintWriter out) { - JDSearchResult result = jdGoodsService.getIndexJDGoods(page); + JDSearchResult result = jdGoodsService.getIndexJDGoods(page, SystemInfoUtil.getSystemByWXCXCAppId(acceptData.getAppId())); long count = 0; JSONObject data = new JSONObject(); JSONArray array = new JSONArray(); @@ -244,8 +244,8 @@ List<JDGoods> goodsList = result.getGoodsList(); if (goodsList != null && goodsList.size() > 0) { - ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(), - acceptData.getVersion()); + ConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(acceptData.getPlatform(), + acceptData.getVersion(),acceptData.getSystem()); Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder()) .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create(); @@ -278,8 +278,8 @@ Gson gson = JsonUtil.getApiCommonGson(); List<PDDGoodsDetail> goodsList = result.getGoodsList(); if (goodsList != null && goodsList.size() > 0) { - ConfigParamsDTO paramsDTO = hongBaoManageService.getShowComputeRate(acceptData.getPlatform(), - acceptData.getVersion()); + ConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(acceptData.getPlatform(), + acceptData.getVersion(),acceptData.getSystem()); for (PDDGoodsDetail goods : goodsList) { GoodsDetailVO goodsDetailVO = GoodsDetailVOFactory.convertPDDGoods(goods, paramsDTO); @@ -301,14 +301,13 @@ * * @param acceptData * @param uid - * @param callback * @param out */ @RequestMapping(value = "getGuide") public void getGuide(AcceptData acceptData, Long uid, PrintWriter out) { String tips = null; if (uid == null || uid <= 0) { - tips = configService.get(ConfigKeyEnum.tipGuideNewUser.getKey()); + tips = configService.getValue(ConfigKeyEnum.tipGuideNewUser.getKey(),acceptData.getSystem()); } else { long rebateOrder = hongBaoV2CountService.countRebateOrder(uid); long shareOrInviteOrder = hongBaoV2CountService.countShareOrInviteOrder(uid); @@ -316,13 +315,13 @@ // 鐔熷鐗� } else if (rebateOrder <= 0 && shareOrInviteOrder <= 0) { // 鏂颁汉鐗� - tips = configService.get(ConfigKeyEnum.tipGuideNewUser.getKey()); + tips = configService.getValue(ConfigKeyEnum.tipGuideNewUser.getKey(),acceptData.getSystem()); } else if (rebateOrder > 0 && shareOrInviteOrder <= 0) { // 鐪侀挶鐗� - tips = configService.get(ConfigKeyEnum.tipGuideSaveMoney.getKey()); + tips = configService.getValue(ConfigKeyEnum.tipGuideSaveMoney.getKey(),acceptData.getSystem()); } else { // 璧氶挶鐗� - tips = configService.get(ConfigKeyEnum.tipGuideShareInvite.getKey()); + tips = configService.getValue(ConfigKeyEnum.tipGuideShareInvite.getKey(),acceptData.getSystem()); } } -- Gitblit v1.8.0