luodangjia
2025-01-14 dd518e9c2cee1c5df2c1b0ea5610245ddba59681
Merge remote-tracking branch 'origin/master'
7个文件已修改
70 ■■■■ 已修改文件
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/vo/OrderRefundPassList.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/resources/mapper/order/RefundPassMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/RegionController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TechnicianSubscribeServiceImpl.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java
@@ -328,7 +328,7 @@
                orderPageListVo.setUserName(appUser.getName());
                orderPageListVo.setPhone(appUser.getPhone());
            }
            RefundPass one = refundPassService.getOne(new LambdaQueryWrapper<RefundPass>().eq(RefundPass::getOrderId, orderPageListVo.getId()).eq(RefundPass::getDelFlag, 0).last(" order by create_time desc limit 0, 1"));
            RefundPass one = refundPassService.getOne(new LambdaQueryWrapper<RefundPass>().eq(RefundPass::getOrderId, orderPageListVo.getId()).eq(RefundPass::getDelFlag, 0).last(" order by create_time desc limit 0,1"));
            orderPageListVo.setRefundPassId(null != one ? one.getId().toString() : null);
        }
        return pageInfo.setRecords(list);
@@ -385,6 +385,20 @@
        //添加快递号和修改订单状态
        order.setExpressJson(code);
        order.setOrderStatus(2);
        //添加查询快递信息队列
        //一小时后定时查询快递信息
        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));
        JSONObject jsonObject1 = JSON.parseObject(code);
        String com = jsonObject1.getString("com");
        String num = jsonObject1.getString("num");
        UserAddress userAddress = JSON.parseObject(order.getAddressJson(), UserAddress.class);
        MapTrackKD100Vo mapTrackKD100Vo = ExpressDeliveryUtil.kd100MapTrack(com, num, order.getDeliverProvince() + order.getDeliverCity(),
                userAddress.getProvince() + userAddress.getCity());
        order.setExpressResult(JSON.toJSONString(mapTrackKD100Vo));
        this.updateById(order);
        return R.ok();
    }
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java
@@ -418,12 +418,14 @@
            BigDecimal bigDecimal = BigDecimal.ZERO;
            for (MyShoppingCartVo myShoppingCartVo : goodsList) {
                bigDecimal = bigDecimal.add(myShoppingCartVo.getCash().multiply(new BigDecimal(myShoppingCartVo.getNumber())));
                myShoppingCartVo.setEarnSpendingPoints(myShoppingCartVo.getEarnSpendingPoints() * myShoppingCartVo.getNumber());
            }
            confirmOrderVo.setOrderMoney(bigDecimal);
        }else{
            int sum = 0;
            for (MyShoppingCartVo myShoppingCartVo : goodsList) {
                sum += (myShoppingCartVo.getPoint() * myShoppingCartVo.getNumber());
                myShoppingCartVo.setEarnSpendingPoints(myShoppingCartVo.getEarnSpendingPoints() * myShoppingCartVo.getNumber());
            }
            confirmOrderVo.setOrderPoint(sum);
        }
@@ -1148,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();
@@ -1265,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()){
@@ -1392,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));
            }
        }
        //添加账户余额支付明细
@@ -1491,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));
        }
        //删除购物车数据
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/vo/OrderRefundPassList.java
@@ -1,8 +1,11 @@
package com.ruoyi.order.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.time.LocalDateTime;
/**
 * @author zhibing.pu
@@ -20,7 +23,8 @@
    @ApiModelProperty("联系电话")
    private String phone;
    @ApiModelProperty("申请时间")
    private String createTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;
    @ApiModelProperty("售后类型(1退货退款2仅退款)")
    private Integer refundMethod;
    @ApiModelProperty("申请原因")
ruoyi-service/ruoyi-order/src/main/resources/mapper/order/RefundPassMapper.xml
@@ -8,7 +8,7 @@
            a.id,
            b.order_number as orderNumber,
            b.app_user_id as appUserId,
            DATE_FORMAT(a.create_time, '%Y-%m-%d %H:%m:%s') as createTime,
            a.create_time as createTime,
            a.refund_method as refundMethod,
            a.refund_reason as refundReason,
            a.pass_status as passStatus,
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/RegionController.java
@@ -41,9 +41,9 @@
        List<Region> list = regionService.list();
        List<Region> collect = list.stream().filter(s -> s.getParentId() == 0).collect(Collectors.toList());
        for (Region region : collect) {
            List<Region> collect1 = list.stream().filter(s -> s.getParentId() == region.getId()).collect(Collectors.toList());
            List<Region> collect1 = list.stream().filter(s -> s.getParentId().equals(region.getId())).collect(Collectors.toList());
            for (Region region1 : collect1) {
                List<Region> collect2 = list.stream().filter(s -> s.getParentId() == region1.getId()).collect(Collectors.toList());
                List<Region> collect2 = list.stream().filter(s -> s.getParentId().equals(region1.getId())).collect(Collectors.toList());
                region1.setChilds(collect2);
            }
            region.setChilds(collect1);
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java
@@ -114,6 +114,9 @@
        shop.setCustomOrderNumber(0);
        shop.setAppUserId(appUser.getId());
        String city = TencentMapUtil.inverseGeographicalAnalysis(shop.getLongitude(), shop.getLatitude(), false);
        if(!StringUtils.hasLength(city)){
            city = "510100";
        }
        shop.setProvinceCode(city.substring(0, 2) + "0000");
        shop.setCityCode(city.substring(0, 4) + "00");
        shop.setDistrictCode(city);
@@ -216,9 +219,10 @@
        // 查询有没有门店绑定这个被删除的门店
        List<Shop> shops = shopService.lambdaQuery().eq(Shop::getPid, shop.getId()).list();
        for (Shop shop1 : shops) {
            shop1.setPid(0);
            LambdaUpdateWrapper<Shop> set = new LambdaUpdateWrapper<Shop>().set(Shop::getPid, null)
                    .eq(Shop::getId,shop1.getId());
            shopService.update(set);
        }
        shopService.updateBatchById(shops);
        appUserClient.clearBindShop(shop.getId());
        UserShop userShop = new UserShop();
        userShop.setShopId(shop.getId());
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TechnicianSubscribeServiceImpl.java
@@ -72,8 +72,10 @@
        if(first.isPresent()){
            AppUserShop appUserShop = first.get();
            Technician technician = technicianService.getOne(new LambdaQueryWrapper<Technician>().eq(Technician::getAppUserId, appUserShop.getAppUserId())
                    .eq(Technician::getShopId, appUserShop.getShopId()).eq(Technician::getDelFlag, 0).eq(Technician::getStatus, 1));
            technicianId = technician.getId();
                    .eq(Technician::getShopId, appUserShop.getShopId()).eq(Technician::getDelFlag, 0).eq(Technician::getStatus, 2));
            if(null != technician){
                technicianId = technician.getId();
            }
        }
        List<TechnicianSubscribeVO> list = technicianSubscribeMapper.getTechnicianSubscribeByUserAndShop(pageInfo, shopId, status, technicianId);
        for (TechnicianSubscribeVO technicianSubscribeVO : list) {