From 0d7883e6db59dc45b1d600401bcd81638f511346 Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期三, 15 一月 2025 14:04:35 +0800 Subject: [PATCH] 修改bug --- ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java | 34 +++++++--------------------------- 1 files changed, 7 insertions(+), 27 deletions(-) diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java index ccf6c77..6c3f7fd 100644 --- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java +++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java @@ -190,7 +190,7 @@ info.setVip(appUser.getVipId()); GoodsSeckill goodsSeckill = seckillActivityInfoClient.getSeckillActivityInfo(info).getData(); //没有秒杀活动或者添加的普通商品则不使用秒杀活动价格 - if(null == goodsSeckill || type == 1){ + if((null == goodsSeckill || (null != goodsSeckill.getCashPayment() && null != goodsSeckill.getPointPayment())) || type == 1){ //没有秒杀价,则判断门店特价 GetGoodsBargainPrice goodsBargainPrice = new GetGoodsBargainPrice(); goodsBargainPrice.setGoodsId(goodsId); @@ -209,10 +209,10 @@ area.setVip(appUser.getVipId()); area.setGoodsId(goodsId); GoodsArea goodsArea = goodsAreaClient.getGoodsArea(area).getData(); - if(null == goodsArea){ + if(null == goodsArea || (null != goodsArea.getCashPayment() && null != goodsArea.getPointPayment())){ //没有地区价格,则使用会员价格 GoodsVip goodsVip = goodsVipClient.getGoodsVip(goodsId, appUser.getVipId()).getData(); - if(null == goodsVip){ + if(null == goodsVip || (null != goodsVip.getCashPayment() && null != goodsVip.getPointPayment())){ //没有配置价格,直接使用原始基础价格 return null; }else{ @@ -1007,7 +1007,7 @@ } if(3 == shoppingCartPayment.getPaymentType()){ Integer availablePoint = appUser.getAvailablePoint(); - if(availablePoint < orderPoint){ + if(availablePoint.compareTo(orderPoint) < 0){ return R.fail("账户可用积分不足"); } } @@ -1150,11 +1150,7 @@ userCouponClient.editUserCoupon(userCoupon); } } - //添加查询快递信息队列 - if(StringUtils.isNotEmpty(order.getExpressJson())){ - //一小时后定时查询快递信息 - redisTemplate.opsForZSet().add("order_express", order.getId(), LocalDateTime.now().plusHours(1).toEpochSecond(ZoneOffset.UTC)); - } + //删除购物车数据 userid = tokenService.getLoginUserApplet().getUserid(); @@ -1267,11 +1263,7 @@ userCouponClient.editUserCoupon(userCoupon); } } - //添加查询快递信息队列 - if(StringUtils.isNotEmpty(order.getExpressJson())){ - //一小时后定时查询快递信息 - redisTemplate.opsForZSet().add("order_express", order.getId(), LocalDateTime.now().plusHours(1).toEpochSecond(ZoneOffset.UTC)); - } + } //积分支付 if(3 == shoppingCartPayment.getPaymentType()){ @@ -1394,14 +1386,7 @@ //删除购物车数据 this.removeBatchByIds(ids); } - //添加查询快递信息队列 - if(StringUtils.isNotEmpty(order.getExpressJson())){ - //一小时后定时查询快递信息 - SystemConfig systemConfig = systemConfigClient.getSystemConfig(3).getData(); - JSONObject jsonObject = JSON.parseObject(systemConfig.getContent()); - Integer waitTime = jsonObject.getInteger("waitTime"); - redisTemplate.opsForZSet().add("order_express", order.getId(), LocalDateTime.now().plusHours(waitTime).toEpochSecond(ZoneOffset.UTC)); - } + } //添加账户余额支付明细 @@ -1493,11 +1478,6 @@ userCoupon.setUseTime(LocalDateTime.now()); userCouponClient.editUserCoupon(userCoupon); } - } - //添加查询快递信息队列 - if(StringUtils.isNotEmpty(order.getExpressJson())){ - //一小时后定时查询快递信息 - redisTemplate.opsForZSet().add("order_express", order.getId(), LocalDateTime.now().plusHours(1).toEpochSecond(ZoneOffset.UTC)); } //删除购物车数据 -- Gitblit v1.7.1