fanli/src/main/java/com/yeshi/fanli/controller/admin/ExtractAdminController.java
@@ -445,22 +445,22 @@ record.setExtraInfoStr(desc.toString()); } if (warnLevel == 0) { // 查询同店铺商品,同商品订单超过一定数量的 List<Integer> typeList = new ArrayList<>(); typeList.add(HongBaoV2.TYPE_ZIGOU); long sameGoodsOrderCount = commonOrderCountService.countSameGoodsOrderByUidAndHongBaoType(typeList, record.getExtract().getUserInfo().getId(), Integer.parseInt(configService.get("admin_min_same_goods_order_count"))); long sameShopOrderCount = commonOrderCountService.countSameShopOrderByUidAndHongBaoType(typeList, record.getExtract().getUserInfo().getId(), Integer.parseInt(configService.get("admin_min_same_shop_order_count"))); if (sameGoodsOrderCount > 0 || sameShopOrderCount > 0) { warnLevel = 3; record.setExtraInfoStr( String.format("同店铺:%s 同商品:%s", sameShopOrderCount, sameGoodsOrderCount)); } } // if (warnLevel == 0) { // // 查询同店铺商品,同商品订单超过一定数量的 // List<Integer> typeList = new ArrayList<>(); // typeList.add(HongBaoV2.TYPE_ZIGOU); // long sameGoodsOrderCount = commonOrderCountService.countSameGoodsOrderByUidAndHongBaoType(typeList, // record.getExtract().getUserInfo().getId(), // Integer.parseInt(configService.get("admin_min_same_goods_order_count"))); // long sameShopOrderCount = commonOrderCountService.countSameShopOrderByUidAndHongBaoType(typeList, // record.getExtract().getUserInfo().getId(), // Integer.parseInt(configService.get("admin_min_same_shop_order_count"))); // if (sameGoodsOrderCount > 0 || sameShopOrderCount > 0) { // warnLevel = 3; // record.setExtraInfoStr( // String.format("同店铺:%s 同商品:%s", sameShopOrderCount, sameGoodsOrderCount)); // } // } record.setWarnLevel(warnLevel); fanli/src/main/java/com/yeshi/fanli/controller/client/v2/GoodsControllerV2.java
@@ -182,10 +182,9 @@ @Resource private JumpDetailV2Service jumpDetailV2Service; @Resource private JDGoodsClassService jdGoodsClassService; /** * 淘宝商品详情 @@ -351,6 +350,15 @@ BigDecimal fanLiRate = hongBaoManageService.getFanLiRate(); BigDecimal shareRate = hongBaoManageService.getShareRate(); GoodsDetailVO goodsDetail = GoodsDetailVOFactory.convertTaoBao(goods, null, fanLiRate, shareRate); if (TaoBaoUtil.isYUShou(goods)) { if (!StringUtil.isNullOrEmpty(goods.getPresaleDiscountFeeText())) { if (goodsDetail.getLabels() == null) goodsDetail.setLabels(new ArrayList<>()); goodsDetail.getLabels().add(new ClientTextStyleVO(goods.getPresaleDiscountFeeText(), "#FF2B4E")); } } // 在标题添加优惠信息 // 店铺信息 TaoBaoShop shop = taoBaoShopService.getTaoBaoShop(id, goods.getSellerId()); @@ -546,11 +554,11 @@ OtherInfo otherInfo = new OtherInfo(); RewardCouponVO rewardCoupon = new RewardCouponVO(); rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("web")); JSONObject params1=new JSONObject(); JSONObject params1 = new JSONObject(); params1.put("url", configService.get("special_guide_reward_coupon_link")); rewardCoupon.setParams(params1.toString()); rewardCoupon.setMaxMoney("¥" +TaoBaoUtil.getGoodsHongBaoMoney(goods, fanLiRate).add( MoneyBigDecimalUtil.mul(TaoBaoUtil.getGoodsHongBaoMoney(goods, fanLiRate), Constant.MAX_REWARD_RATE))); rewardCoupon.setMaxMoney("¥" + TaoBaoUtil.getGoodsHongBaoMoney(goods, fanLiRate).add(MoneyBigDecimalUtil .mul(TaoBaoUtil.getGoodsHongBaoMoney(goods, fanLiRate), Constant.MAX_REWARD_RATE))); rewardCoupon.setDesc("用返利奖励券最高返"); otherInfo.setRewardCoupon(rewardCoupon); goodsDetail.setOtherInfo(otherInfo); @@ -636,14 +644,15 @@ // 附加信息 OtherInfo otherInfo = new OtherInfo(); // 京东plus返利 String maxMoneyPlus = null; JDCategoryInfo categoryInfo = jdGoods.getCategoryInfo(); if (categoryInfo != null && categoryInfo.getCid3() != null && jdGoods.getCommissionInfo() != null) { Long cid3 = categoryInfo.getCid3(); JDGoodsClass threeClass = jdGoodsClassService.getThreeClassByCid(Integer.parseInt(cid3.toString())); if (threeClass != null && threeClass.getSelfComm() != null && threeClass.getSelfComm().compareTo(new BigDecimal(0)) > 0) { if (threeClass != null && threeClass.getSelfComm() != null && threeClass.getSelfComm().compareTo(new BigDecimal(0)) > 0) { BigDecimal commissionShare = jdGoods.getCommissionInfo().getCommissionShare(); // plus比例 小于正常比例 if (commissionShare != null && commissionShare.compareTo(threeClass.getSelfComm()) > 0) { @@ -652,20 +661,22 @@ BigDecimal fanliMoneyPlus = JDUtil.getGoodsFanLiMoneyPlus(jdGoods, fanLiRate); otherInfo.setFanliMoneyPlus("京东plus会员返¥" + fanliMoneyPlus); // 使用奖励券最高返 maxMoneyPlus = "(京东plus会员最高返¥"+ fanliMoneyPlus.add(MoneyBigDecimalUtil.mul(fanliMoneyPlus, Constant.MAX_REWARD_RATE))+")"; maxMoneyPlus = "(京东plus会员最高返¥" + fanliMoneyPlus.add(MoneyBigDecimalUtil.mul(fanliMoneyPlus, Constant.MAX_REWARD_RATE)) + ")"; } } } // 奖励券返利 RewardCouponVO rewardCoupon = new RewardCouponVO(); rewardCoupon.setMaxMoneyPlus(maxMoneyPlus); rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("web")); JSONObject params1=new JSONObject(); JSONObject params1 = new JSONObject(); params1.put("url", configService.get("special_guide_reward_coupon_link")); rewardCoupon.setParams(params1.toString()); rewardCoupon.setMaxMoney( "¥" +JDUtil.getGoodsFanLiMoney(jdGoods, fanLiRate).add( MoneyBigDecimalUtil.mul(JDUtil.getGoodsFanLiMoney(jdGoods, fanLiRate), Constant.MAX_REWARD_RATE))); rewardCoupon.setMaxMoney("¥" + JDUtil.getGoodsFanLiMoney(jdGoods, fanLiRate) .add(MoneyBigDecimalUtil.mul(JDUtil.getGoodsFanLiMoney(jdGoods, fanLiRate), Constant.MAX_REWARD_RATE))); rewardCoupon.setDesc("用返利奖励券最高返"); otherInfo.setRewardCoupon(rewardCoupon); goodsDetail.setOtherInfo(otherInfo); @@ -809,11 +820,11 @@ OtherInfo otherInfo = new OtherInfo(); RewardCouponVO rewardCoupon = new RewardCouponVO(); rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("web")); JSONObject params1=new JSONObject(); JSONObject params1 = new JSONObject(); params1.put("url", configService.get("special_guide_reward_coupon_link")); rewardCoupon.setParams(params1.toString()); rewardCoupon.setMaxMoney("¥" +PinDuoDuoUtil.getGoodsFanLiMoney(pddGoods, fanLiRate).add(MoneyBigDecimalUtil.mul(PinDuoDuoUtil.getGoodsFanLiMoney(pddGoods, fanLiRate), Constant.MAX_REWARD_RATE))); rewardCoupon.setMaxMoney("¥" + PinDuoDuoUtil.getGoodsFanLiMoney(pddGoods, fanLiRate).add(MoneyBigDecimalUtil .mul(PinDuoDuoUtil.getGoodsFanLiMoney(pddGoods, fanLiRate), Constant.MAX_REWARD_RATE))); rewardCoupon.setDesc("用返利奖励券最高返"); otherInfo.setRewardCoupon(rewardCoupon); goodsDetail.setOtherInfo(otherInfo); fanli/src/main/java/com/yeshi/fanli/util/factory/goods/GoodsDetailVOFactory.java
@@ -391,26 +391,11 @@ BigDecimal fanLiRate, BigDecimal shareRate) { if (goodsInfo != null && goods != null) { // 资金信息 MoneyInfoVO moneyInfoVO = new MoneyInfoVO(); moneyInfoVO.setMoneyType(1); // 默认显示:返 ¥6.6 moneyInfoVO.setFanliMoney(TaoBaoUtil.getGoodsHongBaoInfo(goods, fanLiRate)); moneyInfoVO.setShareMoney(TaoBaoUtil.getGoodsHongBaoInfo(goods, shareRate)); goodsInfo.setMoneyInfo(moneyInfoVO); // 设置券后价为定金价格 if (goods.getCouponAmount().compareTo(BigDecimal.valueOf(0)) > 0) { goodsInfo.setCouponPrice(new BigDecimal(goods.getPresaleDeposit())); } goodsInfo.setZkPrice(new BigDecimal(goods.getPresaleDeposit())); // 添加标签 if (goodsInfo.getLabels() == null) goodsInfo.setLabels(new ArrayList<>()); goodsInfo.getLabels().add(new ClientTextStyleVO("预售", "#FF2B4E")); // 在标题添加优惠信息 if (!StringUtil.isNullOrEmpty(goods.getPresaleDiscountFeeText())) { goodsInfo.setTitle(String.format("【%s】", goods.getPresaleDiscountFeeText()) + goodsInfo.getTitle()); } } return goodsInfo; } fanli/src/main/java/com/yeshi/fanli/util/taobao/TaoBaoUtil.java
@@ -789,14 +789,11 @@ private static TaoBaoGoodsBriefExtra loadYuShouInfo(TaoBaoGoodsBriefExtra extra, TaoBaoGoodsBrief goods) { if (goods != null && extra != null) { if (isYUShou(goods)) {// 预售商品 extra.setZkPrice(new BigDecimal(goods.getPresaleDeposit())); // extra.setZkPrice(new BigDecimal(goods.getPresaleDeposit())); // 预售 if (extra.getLabels() == null) extra.setLabels(new ArrayList<>()); extra.getLabels().add(new ClientTextStyleVO("预售", "#FF2B4E")); if (!StringUtil.isNullOrEmpty(goods.getPresaleDiscountFeeText())) {// 在标题添加优惠信息 extra.setTitle(String.format("【%s】", goods.getPresaleDiscountFeeText()) + extra.getTitle()); } } } return extra; @@ -1436,22 +1433,6 @@ */ public static BigDecimal getGoodsHongBaoMoney(TaoBaoGoodsBrief goodsBrief, BigDecimal rate) { BigDecimal money = null; // 预售商品 if (isYUShou(goodsBrief)) { if (goodsBrief.getYsylCommissionRate() != null) money = MoneyBigDecimalUtil.mul( MoneyBigDecimalUtil.mul(MoneyBigDecimalUtil.mul(new BigDecimal(goodsBrief.getPresaleDeposit()), goodsBrief.getYsylCommissionRate()), new BigDecimal("0.0001")), MoneyBigDecimalUtil.div(rate, new BigDecimal(100))); else money = MoneyBigDecimalUtil.mul(MoneyBigDecimalUtil.mul( MoneyBigDecimalUtil.mul(goodsBrief.getZkPrice(), goodsBrief.getTkRate()), new BigDecimal("0.01")), MoneyBigDecimalUtil.div(rate, new BigDecimal(100))); return money; } if (StringUtil.isNullOrEmpty(goodsBrief.getCouponInfo()) || goodsBrief.getCouponInfo().trim().equalsIgnoreCase("无")) { money = MoneyBigDecimalUtil.mul( @@ -2120,6 +2101,7 @@ /** * 提取自有格式的淘口令 * * @param str * @return */