luodangjia
2025-01-14 f4a69a925645fe0c84121fde76ec03aff1b07939
Merge remote-tracking branch 'origin/master'
16个文件已修改
95 ■■■■■ 已修改文件
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/model/RefundPass.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/OrderDetailVO.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/Goods.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/UserCouponServiceImpl.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/RefundPassController.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/RefundPassServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsEvaluateController.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/OrderActivityInfoController.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianSubscribeController.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/TechnicianSubscribeService.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsBargainPriceServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShopServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TechnicianSubscribeServiceImpl.java 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/resources/mapper/other/ShopMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/model/RefundPass.java
@@ -90,6 +90,8 @@
    @ApiModelProperty("快递单号")
    @TableField("code")
    private String code;
    @ApiModelProperty("收货地址JSON")
    @TableField(exist = false)
    private String addressJson;
}
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/OrderDetailVO.java
@@ -63,7 +63,7 @@
    private BigDecimal paymentAmount;
    @ApiModelProperty(value = "配送方式(1=自提,2=快递)")
    private String distributionMode;
    private Integer distributionMode;
    @ApiModelProperty(value = "门店名称")
    private String shopName;
@@ -83,6 +83,9 @@
    @ApiModelProperty(value = "技师名称")
    private String technicianName;
    @ApiModelProperty(value = "技师id")
    private Integer technicianId;
    @ApiModelProperty(value = "预约单id")
    private String technicianSubscribeId;
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/Goods.java
@@ -48,7 +48,7 @@
    @TableField("purchase_limit")
    private Integer purchaseLimit;
    @ApiModelProperty(value = "配送方式(1=自提,2=快递,1,2 = 自提+快递)")
    @ApiModelProperty(value = "配送方式(1=自提,2=快递)")
    @TableField("distribution_mode")
    private String distributionMode;
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/UserCouponServiceImpl.java
@@ -52,7 +52,7 @@
        }
        List<CouponInfo> couponInfoList = couponInfoClient.getCouponInfoList(couponIds).getData();
        //构建返回数据
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy.MM.dd HH:mm");
        List<PaymentUserCouponVo> infoVoList = new ArrayList<>();
        for (UserCoupon userCoupon : list) {
            CouponInfo couponInfo = couponInfoList.stream().filter(s -> s.getId().equals(userCoupon.getCouponId())).findFirst().get();
@@ -68,9 +68,9 @@
            couponInfoVo.setDiscountAmount(couponInfo.getDiscountAmount());
            couponInfoVo.setMoneyAmount(couponInfo.getMoneyAmount());
            couponInfoVo.setDiscount(couponInfo.getDiscount());
            if(null != couponInfo.getPeriodStartTime()){
                couponInfoVo.setPeriodStartTime(couponInfo.getPeriodStartTime().atTime(0, 0, 0).format(formatter));
                couponInfoVo.setPeriodEndTime(couponInfo.getPeriodEndTime().atTime(23, 59, 59).format(formatter));
            if(null != userCoupon.getStartTime()){
                couponInfoVo.setPeriodStartTime(userCoupon.getStartTime().format(formatter));
                couponInfoVo.setPeriodEndTime(userCoupon.getEndTime().format(formatter));
            }
            String forGoodIds = couponInfo.getForGoodIds();
            String[] split = forGoodIds.split(",");
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/RefundPassController.java
@@ -67,6 +67,7 @@
        RefundPass one = refundPassService.getOne(new LambdaQueryWrapper<RefundPass>().eq(RefundPass::getOrderId, orderId)
                .eq(RefundPass::getDelFlag, 0).last(" order by create_time desc limit 0,1"));
        one.setIdStr(one.getId().toString());
        one.setAddressJson(order.getAddressJson());
        return R.ok(one);
    }
    
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java
@@ -174,13 +174,7 @@
            orderActivityInfo = JSONObject.parseObject(activityJson, OrderActivityInfo.class);
        }
        OrderDetailVO orderDetailVO = new OrderDetailVO();
        if (CollectionUtil.isNotEmpty(orderGoods)){
            String goodJson = orderGoods.get(0).getGoodJson();
            Goods goods = JSONObject.parseObject(goodJson, Goods.class);
            orderDetailVO.setDistributionMode(goods.getDistributionMode());
        }
        orderDetailVO.setDistributionMode(order.getDistributionMode());
        Technician technician = new Technician();
        if (order.getTechnicianId() != null){
            R<Technician> shopdetail = technicianClient.shopdetail(order.getTechnicianId());
@@ -214,6 +208,7 @@
        orderDetailVO.setLatitude(shop.getLatitude());
        orderDetailVO.setShopId(shop.getId());
        orderDetailVO.setTechnicianName(technician.getName());
        orderDetailVO.setTechnicianId(technician.getId());
        return orderDetailVO;
    }
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/RefundPassServiceImpl.java
@@ -80,7 +80,6 @@
        if(null != afterSaleTime && LocalDateTime.now().isAfter(afterSaleTime)){
            return R.fail("已超过售后期间");
        }
        //构建售后申请数据
        RefundPass refundPass = new RefundPass();
        refundPass.setOrderId(applyRefundPass.getId());
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java
@@ -962,7 +962,7 @@
        order.setGoodName(goodName.substring(0, goodName.length() - 1));
        Goods goods = goodsClient.getGoodsById(goodsList.get(0).getGoodsId()).getData();
        order.setOrderType(goods.getType());
        order.setOrderStatus(goods.getType() == 1 ? 3 : 1);
        order.setOrderStatus(goods.getType() == 1 ? 3 : (shoppingCartPayment.getDistributionMode() == 2 ? 1 : 2));
        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS");
        order.setOrderNumber("QJS" + getNumber(3) + sdf.format(new Date()));
        order.setTotalAmount(orderMoney.setScale(2, RoundingMode.HALF_EVEN));
@@ -984,7 +984,7 @@
        if(null != orderActivityInfo1){
            order.setActivityJson(JSON.toJSONString(orderActivityInfo1));
        }
        if(null != shoppingCartPayment.getUserAddressId()){
        if(2 == shoppingCartPayment.getDistributionMode()){
            UserAddress address = userAddressClient.getUserAddressById(shoppingCartPayment.getUserAddressId()).getData();
            order.setExpressAmount(expressFee);
            order.setAddressJson(JSON.toJSONString(address));
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsEvaluateController.java
@@ -131,7 +131,7 @@
        List<Long> usersNameList = new ArrayList<>();
        List<Long> usersPhoneList = new ArrayList<>();
        if (StringUtils.isNotEmpty(goodsEvaluate.getUserName())) {
        if (StringUtils.isNotEmpty(goodsEvaluate.getGoodsName())) {
            goodsIds = goodsService.lambdaQuery()
                    .like(Goods::getName, goodsEvaluate.getGoodsName())
                    .list().stream().map(Goods::getId).collect(Collectors.toList());
@@ -152,7 +152,12 @@
                return R.ok(new Page<>());
            }
        }
        usersNameList.retainAll(usersPhoneList);
        if (StringUtils.isNotEmpty(goodsEvaluate.getPhone())&&StringUtils.isNotEmpty(goodsEvaluate.getUserName())){
            // 取交集
            usersNameList.retainAll(usersPhoneList);
        }else{
            usersNameList.addAll(usersPhoneList);
        }
        Page<GoodsEvaluate> page = goodsEvaluateService.page(Page.of(pageNum, pageSize), new LambdaQueryWrapper<GoodsEvaluate>()
                .in(!goodsIds.isEmpty(), GoodsEvaluate::getGoodsId, goodsIds)
                .in(!usersNameList.isEmpty(), GoodsEvaluate::getAppUserId, usersNameList)
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/OrderActivityInfoController.java
@@ -62,9 +62,10 @@
        if (org.springframework.util.StringUtils.hasLength(orderActivityInfo.getVipIds())){
            List<String> vipIds = new ArrayList<>(Arrays.asList(orderActivityInfo.getVipIds().split(",")));
            List<OrderActivityInfo> list = orderActivityInfoService.lambdaQuery()
                    .le(OrderActivityInfo::getStartTime, orderActivityInfo.getStartTime())
                    .between(OrderActivityInfo::getStartTime, orderActivityInfo.getStartTime(), orderActivityInfo.getEndTime())
                    .or()
                    .ge(OrderActivityInfo::getEndTime, orderActivityInfo.getEndTime()).list();
                    .between(OrderActivityInfo::getEndTime, orderActivityInfo.getStartTime(), orderActivityInfo.getEndTime())
                    .list();
            if (!list.isEmpty()){
                for (OrderActivityInfo activityInfo : list) {
                    List<String> vips = Arrays.asList(activityInfo.getVipIds().split(","));
@@ -132,9 +133,12 @@
        if (org.springframework.util.StringUtils.hasLength(orderActivityInfo.getVipIds())){
            List<String> vipIds = new ArrayList<>(Arrays.asList(orderActivityInfo.getVipIds().split(",")));
            List<OrderActivityInfo> list = orderActivityInfoService.lambdaQuery()
                    .le(OrderActivityInfo::getStartTime, orderActivityInfo.getStartTime())
                    .between(OrderActivityInfo::getStartTime, orderActivityInfo.getStartTime(), orderActivityInfo.getEndTime())
                    .or()
                    .ge(OrderActivityInfo::getEndTime, orderActivityInfo.getEndTime()).list();
                    .between(OrderActivityInfo::getEndTime, orderActivityInfo.getStartTime(), orderActivityInfo.getEndTime())
                    .list();
            // 遍历集合 通过startTime和endTime 判断是否与当前活动时间重叠
            if (!list.isEmpty()){
                for (OrderActivityInfo activityInfo : list) {
                    List<String> vips = Arrays.asList(activityInfo.getVipIds().split(","));
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianSubscribeController.java
@@ -81,6 +81,18 @@
        return R.ok();
    }
    /**
     * 预约技师
     */
    @PostMapping("/switchingTechnician")
    @ApiOperation(value = "切换技师", notes = "切换技师", tags = {"小程序-个人中心-门店管理-预约列表"})
    public R<Void> switchingTechnician(@RequestBody TechnicianSubscribe technicianSubscribe) {
        technicianSubscribeService.switchingTechnician(technicianSubscribe);
        return R.ok();
    }
    /**
     * 取消服务
     */
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/TechnicianSubscribeService.java
@@ -34,6 +34,13 @@
    /**
     * 切換技師
     * @param technicianSubscribe
     */
    void switchingTechnician(TechnicianSubscribe technicianSubscribe);
    /**
     * 定时修改到期状态
     */
    void taskEditStstus();
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsBargainPriceServiceImpl.java
@@ -80,7 +80,7 @@
        SysUser sysUser = sysUserClient.getSysUser(userid).getData();
        GoodsBargainPrice bargainPrice = this.getOne(new LambdaQueryWrapper<GoodsBargainPrice>().eq(GoodsBargainPrice::getShopId, sysUser.getObjectId())
                .eq(GoodsBargainPrice::getGoodsId, vo.getGoodsId()).eq(GoodsBargainPrice::getDelFlag, 0).last(" order by create_time desc limit 0, 1"));
        if(null != bargainPrice && 1 == bargainPrice.getAuditStatus()){
        if(null != bargainPrice && 0 == bargainPrice.getAuditStatus()){
            return R.fail("特价申请正在审核中");
        }
        bargainPrice = new GoodsBargainPrice();
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShopServiceImpl.java
@@ -93,7 +93,7 @@
            }
            Shop shop = shopMapper.selectById(appUser.getShopId());
            if(null != shop){
            if(null != shop && shop.getDelFlag() == 0 && shop.getStatus() == 1){
                NearbyShopVO vo = new NearbyShopVO();
                vo.setId(appUser.getShopId().longValue());
                vo.setName(shop.getName());
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TechnicianSubscribeServiceImpl.java
@@ -41,8 +41,7 @@
    @Resource
    private RemoteOrderGoodsClient orderGoodsClient;
    @Resource
    private RedisTemplate<String, String> redisTemplate;
    private RedisTemplate redisTemplate;
    @Resource
    private AppUserClient appUserClient;
    
@@ -97,6 +96,16 @@
    }
    @Override
    public void switchingTechnician(TechnicianSubscribe technicianSubscribe) {
        TechnicianSubscribe subscribe = this.getById(technicianSubscribe.getId());
        if(subscribe.getTechnicianId().equals(technicianSubscribe.getTechnicianId())){
            throw new RuntimeException("不能切换相同的技师");
        }
        subscribe.setTechnicianId(technicianSubscribe.getTechnicianId());
        this.updateById(subscribe);
    }
    /**
     * 定时修改到期状态
     */
ruoyi-service/ruoyi-other/src/main/resources/mapper/other/ShopMapper.xml
@@ -28,7 +28,7 @@
            (select ROUND(AVG(score), 1) from t_shop_score where shop_id = ts.id) as score
        FROM
            t_shop ts
        WHERE ts.del_flag = 0 AND ts.`status` = 1 AND ts.id = #{shopId}
        WHERE ts.del_flag = 0 AND ts.id = #{shopId}
    </select>
    <select id="selectShopList" resultType="com.ruoyi.other.api.domain.Shop">
        SELECT