puzhibing
2024-12-10 0701ecf76dc11d54786690998f0b24fcfbc4bb00
合并代码
4个文件已修改
32 ■■■■■ 已修改文件
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/factory/AppUserClientFallbackFactory.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/task/AfterSalesTask.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/factory/AppUserClientFallbackFactory.java
@@ -66,7 +66,10 @@
                throw new RuntimeException("获取直推会员数失败");
            }
            @Override
            public R<Void> addAppUserShop(AppUserShop appUserShop) {
                return R.fail("添加失败");
            }
        };
    }
}
ruoyi-modules/ruoyi-job/src/main/java/com/ruoyi/job/task/AfterSalesTask.java
@@ -2,7 +2,6 @@
import com.ruoyi.common.core.domain.R;
import com.ruoyi.order.feignClient.RemoteOrderGoodsClient;
import com.ruoyi.order.service.CommissionService;
import lombok.extern.log4j.Log4j2;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java
@@ -470,8 +470,8 @@
                //使用商品的基础价格
                price.setCash(1 == goods.getCashPayment() ? goods.getSellingPrice() : null);
                price.setPoint(1 == goods.getPointPayment() ? goods.getIntegral() : null);
                price.setCashPayment(goods.getCashPayment() == 1 ? true : false);
                price.setPointPayment(goods.getPointPayment() == 1 ? true : false);
                price.setCashPayment(goods.getCashPayment() == 1);
                price.setPointPayment(goods.getPointPayment() == 1);
            }
            vo.setCash(price.getCash());
            vo.setPoint(price.getPoint());
@@ -484,7 +484,7 @@
            goodsShop.setGoodsId(shoppingCart.getGoodsId());
            goodsShop.setShopId(shopId);
            GoodsShop goodsShop1 = goodsShopClient.getGoodsShop(goodsShop).getData();
            vo.setVerifiable(goods.getAppointStore() == 1 && null == goodsShop1 ? false : true);
            vo.setVerifiable(goods.getAppointStore() != 1 || null != goodsShop1);
            //判断当前数量是否已经超出限购数量(需要计算已经购买的数量)
            if(null == goods.getPurchaseLimit() || -1 == goods.getPurchaseLimit()){
                vo.setPurchaseLimit(false);
@@ -497,7 +497,7 @@
                            .eq(OrderGood::getGoodsId, shoppingCart.getGoodsId()).eq(OrderGood::getDelFlag, 0));
                    sum = orderGoodList.stream().mapToInt(OrderGood::getNum).sum();
                }
                vo.setPurchaseLimit((num + sum) > goods.getPurchaseLimit() ? true : false);
                vo.setPurchaseLimit((num + sum) > goods.getPurchaseLimit());
            }
            vo.setDistributionMode(goods.getDistributionMode());
            vo.setEarnSpendingPoints(price.getEarnSpendingPoints());
@@ -696,11 +696,11 @@
        OrderActivityInfo orderActivityInfo = orderActivityInfoClient.getNowOrderActivityInfo(appUser.getVipId()).getData();
        BaseSetting baseSetting = baseSettingClient.getBaseSetting(4).getData();
        //系统活动设置(优惠券和活动能否同时使用)
        boolean useSimultaneously = baseSetting.getContent().equals("1") ? true : false;
        boolean useSimultaneously = baseSetting.getContent().equals("1");
        //满XX才打折,只有现金才能优惠
        //如果使用优惠券,则需要判断是否可以和同时使用,且活动满足使用条件。
        //没有使用优惠券,只需要判断是都满足使用条件
        if(((useSimultaneously && null != shoppingCartPayment.getUserCouponId()) || null == shoppingCartPayment.getUserCouponId()) &&
        if((useSimultaneously || null == shoppingCartPayment.getUserCouponId()) &&
                null != orderActivityInfo && shoppingCartPayment.getPaymentType() != 3 && orderActivityInfo.getConditionAmount().compareTo(paymentMoney) <= 0){
            BigDecimal paymentMoney1 = orderActivityInfo.getDiscount().divide(new BigDecimal(10)).multiply(paymentMoney);
            BigDecimal bigDecimal = paymentMoney.subtract(paymentMoney1).setScale(2, RoundingMode.HALF_EVEN);
@@ -913,6 +913,9 @@
            balanceChangeRecordClient.saveBalanceChangeRecord(balanceChangeRecord);
            //修改订支付状态
            order.setPayStatus(2);
            if(goods.getType() == 2 && null == shoppingCartPayment.getUserAddressId()){
                order.setOrderStatus(2);
            }
            orderService.updateById(order);
            //删除购物车数据
            this.removeBatchByIds(ids);
@@ -1000,6 +1003,9 @@
                    balanceChangeRecordClient.saveBalanceChangeRecord(balanceChangeRecord);
                    //修改订支付状态
                    order.setPayStatus(2);
                    if(goods.getType() == 2 && null == shoppingCartPayment.getUserAddressId()){
                        order.setOrderStatus(2);
                    }
                    orderService.updateById(order);
                    //删除购物车数据
                    this.removeBatchByIds(ids);
@@ -1007,6 +1013,9 @@
            }else{
                //修改订支付状态
                order.setPayStatus(2);
                if(goods.getType() == 2 && null == shoppingCartPayment.getUserAddressId()){
                    order.setOrderStatus(2);
                }
                orderService.updateById(order);
                //删除购物车数据
                this.removeBatchByIds(ids);
@@ -1036,7 +1045,7 @@
        VipSetting vipSetting3 = vipSettingClient.getVipSetting(3).getData();
        Integer vipLevelUpShopRole = vipSetting3.getVipLevelUpShopRole();
        Integer vipLevelUpShop = vipSetting3.getVipLevelUpShop();
        if(1 == vipLevelUpShopRole && appUser.getVipId() < 3 && shopPoint >= vipLevelUpShop){
        if(null != vipLevelUpShopRole && 1 == vipLevelUpShopRole && appUser.getVipId() < 3 && shopPoint >= vipLevelUpShop){
            appUser.setVipId(3);
            appUserClient.editAppUserById(appUser);
            //添加等级变化记录
@@ -1054,7 +1063,7 @@
        VipSetting vipSetting2 = vipSettingClient.getVipSetting(2).getData();
        vipLevelUpShopRole = vipSetting2.getVipLevelUpShopRole();
        vipLevelUpShop = vipSetting2.getVipLevelUpShop();
        if(1 == vipLevelUpShopRole && appUser.getVipId() < 2 && shopPoint >= vipLevelUpShop){
        if(null != vipLevelUpShopRole && 1 == vipLevelUpShopRole && appUser.getVipId() < 2 && shopPoint >= vipLevelUpShop){
            appUser.setVipId(2);
            appUserClient.editAppUserById(appUser);
            //添加等级变化记录
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java
@@ -108,6 +108,7 @@
    @ApiOperation(value = "门店列表", tags = {"后台管理-门店管理-门店列表"})
    public R<List<Shop>> list(@ApiParam("页码") @RequestParam Integer PageNum,@ApiParam("每一页数据大小") Integer pageSize,Shop shop){
        List<Shop> list = shopService.list();
        return null;
    }