| | |
| | | Constants.UserActionType.CHANGE_ORDER_KD, |
| | | userActionMapper, |
| | | update.getEditDate(), |
| | | new String[]{goodsorder.getKdInfo()}, |
| | | StringUtils.isNotBlank(goodsorder.getKdInfo())?new String[]{query.getKdInfo()}:null, |
| | | JSONObject.toJSONString(update) , |
| | | query.getKdName()+"(单号:"+query.getKdCode()+")", |
| | | goodsorder.getKdName()+"(单号:"+goodsorder.getKdCode()+")"); |
| | |
| | | //发送发货站内信 |
| | | Notice notice = Notice.getNotice( |
| | | Constants.NoticeType.NOTICE_ORDER_SEND, |
| | | goodsorder.getMemberId(), |
| | | query.getMemberId(), |
| | | goodsorder.getId() |
| | | ); |
| | | notice.setContent(notice.getContent().replace("{param}",goodsorder.getCode().toString())); |
| | |
| | | if(Objects.isNull(member.getBindShopId())){ |
| | | memberMapper.update(new UpdateWrapper<Member>().lambda() |
| | | .set(Member::getBindShopId,shop.getId()) |
| | | .set(Member::getBindShopDate,new Date()) |
| | | .eq(Member::getId,member.getId()) |
| | | ); |
| | | } |
| | | goodsorder.setPickUpShopId(shop.getId()); |
| | | goodsorder.setDistributionShopId(shop.getId()); |
| | | goodsorder.setLinkname(member.getName()); |
| | | goodsorder.setLinkname(StringUtils.isNotBlank(member.getName())?member.getName():member.getNickname()); |
| | | goodsorder.setLinkphone(member.getPhone()); |
| | | if(Objects.isNull(member.getBindShopId())){ |
| | | member.setBindShopId(shop.getId()); |
| | |
| | | .eq(MemberCoupon::getId,orderPayConfirmResponse.getMemberCoupon().getId()) |
| | | ); |
| | | } |
| | | goodsorder.setReturnCustomerIntegral(getBackIntegral(goodsorder.getPrice(),Constants.ONE)); |
| | | goodsorder.setReturnMemberIntegral(getBackIntegral(goodsorder.getPrice(),Constants.ZERO)); |
| | | goodsorder.setReturnCustomerIntegral(getBackIntegral(goodsorder.getPrice().subtract(goodsorder.getMailPrice()),Constants.ONE)); |
| | | goodsorder.setReturnMemberIntegral(getBackIntegral(goodsorder.getPrice().subtract(goodsorder.getMailPrice()),Constants.ZERO)); |
| | | goodsorderMapper.insert(goodsorder); |
| | | List<OrderGoodsCalculateResponse> goodsCalculateList = orderPayConfirmResponse.getGoodsCalculateList(); |
| | | if(CollectionUtils.isEmpty(goodsCalculateList)){ |
| | |
| | | } |
| | | List<GoodsorderDetail> goodsOrderDetailList = new ArrayList<>(); |
| | | BigDecimal shopSettlement = BigDecimal.ZERO; |
| | | for (OrderGoodsCalculateResponse payDetailRequest:goodsCalculateList) { |
| | | for (int i = 0; i < goodsCalculateList.size(); i++) { |
| | | OrderGoodsCalculateResponse payDetailRequest = goodsCalculateList.get(i); |
| | | //查询商品 |
| | | GoodsSku goodsSku = goodsSkuMapper.selectById(payDetailRequest.getSkuId()); |
| | | if(Objects.isNull(goodsSku)||!Constants.equalsInteger(goodsSku.getIsdeleted(),Constants.ZERO)){ |
| | |
| | | if(!Constants.equalsInteger(goods.getStatus(),Constants.ZERO)||!Constants.equalsInteger(goods.getIsdeleted(),Constants.ZERO)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"存在商品已删除或已下架,无法下单"); |
| | | } |
| | | if(goodsSku.getStock().compareTo(new BigDecimal(Constants.formatIntegerNum(payDetailRequest.getGoodsNum())))<Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"存在商品库存不足,无法下单!"); |
| | | if(Objects.nonNull(goodsSku.getStock())){ |
| | | if(goodsSku.getStock().compareTo(new BigDecimal(Constants.formatIntegerNum(payDetailRequest.getGoodsNum())))<Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"存在商品库存不足,无法下单!"); |
| | | } |
| | | //商品库存扣除 |
| | | goodsSku.setStock(goodsSku.getStock().subtract(new BigDecimal(Constants.formatIntegerNum(payDetailRequest.getGoodsNum())))); |
| | | goodsSkuMapper.updateById(goodsSku); |
| | | } |
| | | //商品库存扣除 |
| | | goodsSku.setStock(goodsSku.getStock().subtract(new BigDecimal(Constants.formatIntegerNum(payDetailRequest.getGoodsNum())))); |
| | | goodsSkuMapper.updateById(goodsSku); |
| | | GoodsorderDetail goodsOrderDetail = new GoodsorderDetail(); |
| | | goodsOrderDetail.setCreator(member.getId()); |
| | | goodsOrderDetail.setCreateDate(new Date()); |
| | |
| | | //经销商优惠承担占比 |
| | | BigDecimal shopRate = new BigDecimal("100").subtract(platformConfigDTO.getTotalRate()); |
| | | //计算经销商优惠承担金额 (优惠券抵扣金额 + 积分抵扣金额) * 占比比例 |
| | | BigDecimal shopDeductAmount = payDetailRequest.getCouponDeductCash().add(payDetailRequest.getIntegralDeductCash()) |
| | | BigDecimal shopDeductAmount = payDetailRequest.getCouponDeductCash().add(Constants.equalsInteger(orderPayRequest.getUseIntegral(),Constants.ONE)?payDetailRequest.getIntegralDeductCash():BigDecimal.ZERO) |
| | | .multiply(shopRate).divide(new BigDecimal("100"),2, RoundingMode.HALF_UP); |
| | | //根据经销商销售模式 计算应结算金额 |
| | | if(shop.getSaleType().equals(Constants.ONE)){ |
| | | if(Constants.equalsInteger(shop.getSaleType(),Constants.ONE)&&Constants.equalsInteger(goodsorder.getReceiveType(),Constants.ONE)){ |
| | | goodsOrderDetail.setShopSettlement(goodsOrderDetail.getPrice().subtract(shopDeductAmount)); |
| | | }else { |
| | | //平台铺货 |
| | |
| | | |
| | | //存在现金支付 |
| | | if(Constants.equalsInteger(goodsorder.getPayMethod(),Constants.ZERO)){ |
| | | goodsorderMapper.update(null,new UpdateWrapper<Goodsorder>().lambda() |
| | | .set(Goodsorder::getShopSettlement,shopSettlement) |
| | | .eq(Goodsorder::getId,goodsorder.getId()) |
| | | ); |
| | | PayResponse payResponse = this.wxPay(goodsorder,member); |
| | | payResponse.setLockKey(lockKey); |
| | | return payResponse; |
| | |
| | | .set(Goodsorder::getShopSettlement,shopSettlement) |
| | | .set(Goodsorder::getPayStatus,Constants.OrderStatus.PAY_DONE.getKey()) |
| | | .set(Goodsorder::getPayDate,DateUtil.getCurrDateTime()) |
| | | .set(Goodsorder::getId,goodsorder.getId()) |
| | | .eq(Goodsorder::getId,goodsorder.getId()) |
| | | ); |
| | | PayResponse payResponse = new PayResponse(); |
| | | payResponse.setOrderId(goodsorder.getId()); |
| | |
| | | Goods goods = goodsMapper.selectById(goodsSku.getGoodsId()); |
| | | goodsName = goods.getName(); |
| | | } |
| | | if(!Objects.isNull(goodsSku)){ |
| | | if(!Objects.isNull(goodsSku)&&Objects.nonNull(goodsSku.getStock())){ |
| | | goodsSku.setStock(goodsSku.getStock().add(new BigDecimal(Constants.formatIntegerNum(goodsorderDetail.getGoodsNum())))); |
| | | goodsSkuMapper.updateById(goodsSku); |
| | | } |
| | |
| | | amount = amount.add(response.getSkuAmount()); |
| | | } |
| | | } |
| | | MemberCoupon memberCoupon = new MemberCoupon(); |
| | | MemberCoupon memberCoupon = null; |
| | | orderPayConfirmResponse.setCouponAmount(couponAmount); |
| | | //获取可以使用的优惠券 |
| | | List<MemberCoupon> memberCouponList = memberCouponService.getApplyCoupon(request.getPayDetailRequestList(),request.getMemberId()); |
| | | |
| | | if(CollectionUtils.isNotEmpty(memberCouponList)){ |
| | | orderPayConfirmResponse.setMemberCouponList(memberCouponList); |
| | | if(Objects.nonNull(request.getCouponId())&&Constants.equalsInteger(request.getCouponId(),-Constants.ONE)&&Objects.nonNull(memberCouponList)){ |
| | |
| | | } |
| | | memberCoupon = memberCoupons.get(Constants.ZERO); |
| | | couponAmount = memberCoupon.getValidAmount(); |
| | | memberCouponService.calculateCouponRata(memberCoupon,goodsCalculateList,amount); |
| | | // memberCouponService.calculateCouponRata(memberCoupon,goodsCalculateList,amount); |
| | | orderPayConfirmResponse.setMemberCoupon(memberCoupon); |
| | | } |
| | | }else { |
| | | if(Objects.nonNull(request.getCouponId())){ |
| | | if(Objects.nonNull(request.getCouponId())&&!Constants.equalsInteger(request.getCouponId(),-Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"无可用优惠券,请刷新查看"); |
| | | } |
| | | } |
| | | if(Objects.nonNull(memberCoupon)){ |
| | | //计算优惠券占比 |
| | | memberCouponService.calculateCouponRata(memberCoupon,goodsCalculateList,amount); |
| | | } |
| | | |
| | | //查询用户总积分 |
| | | Member member = memberMapper.selectById(request.getMemberId()); |
| | | //最低可用启用积分 |
| | |
| | | orderPayConfirmResponse.setDeductIntegral(deductIntegral); |
| | | orderPayConfirmResponse.setIntegralAmount(integralAmount); |
| | | if(Constants.equalsInteger(orderPayConfirmResponse.getIntegralStatus(),Constants.ZERO)){ |
| | | //计算积分占比 |
| | | integralAmount = this.calculateIntegralRata(orderPayConfirmResponse,goodsCalculateList,member.getIntegral()); |
| | | }else{ |
| | | orderPayConfirmResponse.setSurplusIntegral(member.getIntegral()); |
| | |
| | | orderPayConfirmResponse.setIntegralAmount(integralAmount); |
| | | } |
| | | //使用优惠券 减去优惠券抵扣金额 |
| | | if(Objects.nonNull(request.getCouponId())){ |
| | | if(Objects.nonNull(orderPayConfirmResponse.getMemberCoupon())){ |
| | | orderPayConfirmResponse.setCouponAmount(couponAmount); |
| | | } |
| | | //实际支付金额 减去优惠券、积分抵扣金额 |
| | |
| | | if(Constants.equalsInteger(type,Constants.ZERO)){ |
| | | if( Constants.equalsInteger(platformConfigDTO.getReturnMemberIntegralStatus(),Constants.ZERO) |
| | | && Objects.nonNull(platformConfigDTO.getReturnMemberIntegral())){ |
| | | integralBack = payAmount.multiply(platformConfigDTO.getReturnMemberIntegral()).divide(BigDecimal.ONE,0,BigDecimal.ROUND_DOWN); |
| | | integralBack = payAmount.divide(platformConfigDTO.getReturnMemberIntegral(),2,BigDecimal.ROUND_DOWN); |
| | | } |
| | | }else{ |
| | | if( Constants.equalsInteger(platformConfigDTO.getReturnShopIntegralStatus(),Constants.ZERO) |
| | | && Objects.nonNull(platformConfigDTO.getReturnShopIntegral())){ |
| | | integralBack = payAmount.multiply(platformConfigDTO.getReturnShopIntegral()).divide(BigDecimal.ONE,0,BigDecimal.ROUND_DOWN); |
| | | integralBack = payAmount.divide(platformConfigDTO.getReturnShopIntegral(),2,BigDecimal.ROUND_DOWN); |
| | | } |
| | | } |
| | | return integralBack; |
| | |
| | | .multiply(i.getDeductRata()).divide(new BigDecimal("100"),2,RoundingMode.DOWN)).reduce(BigDecimal.ZERO,BigDecimal::add); |
| | | //积分-现金兑换比例(XXX积分抵扣1元) |
| | | BigDecimal cashToIntegralRata = new BigDecimal(systemDictDataBiz.queryByCode(Constants.INTEGRAL_SET,Constants.INTERALSET_DEDUCTINTEGRALLIMIT).getCode()); |
| | | //积分最大可抵扣金额 |
| | | BigDecimal deductionCash = totalIntegral.divide(cashToIntegralRata,2,RoundingMode.DOWN); |
| | | BigDecimal surDeductionCash = deductionCash; |
| | | BigDecimal goodUseIntegral = BigDecimal.ZERO; |
| | | BigDecimal surUseIntegral = totalIntegral; |
| | | |
| | | //当前选择商品抵扣需要使用的积分 |
| | | BigDecimal maxDeductionIntegral = maxDeductionCash.multiply(cashToIntegralRata); |
| | | //获取当前需要支付的现金总额 |
| | |
| | | BigDecimal realDeductionCash = BigDecimal.ZERO; |
| | | for (int j = 0; j < goodsCalculateList.size(); j++) { |
| | | //获取最大可抵扣金额 |
| | | BigDecimal deductionCash = goodsCalculateList.get(j).getSkuAmount().subtract(goodsCalculateList.get(j).getCouponDeductCash()) |
| | | BigDecimal goodDeductionCash = goodsCalculateList.get(j).getSkuAmount().subtract(goodsCalculateList.get(j).getCouponDeductCash()) |
| | | .multiply(goodsCalculateList.get(j).getDeductRata()).divide(new BigDecimal("100"),2,RoundingMode.DOWN); |
| | | goodsCalculateList.get(j).setIntegralMaxDeductCash(deductionCash); |
| | | goodsCalculateList.get(j).setIntegralMaxDeductCash(goodDeductionCash); |
| | | BigDecimal rata = goodDeductionCash.divide(maxDeductionCash,2,BigDecimal.ROUND_HALF_UP); |
| | | //如果剩余积分大于可以使用积分 则直接满额计算 反之 剩余积分不能满足全部抵扣 单独计算每个商品占比 |
| | | if(totalIntegral.compareTo(maxDeductionIntegral)<Constants.ZERO){ |
| | | deductionCash = deductionCash.divide(payCash).multiply(totalIntegral); |
| | | if(Constants.equalsInteger(j+1,goodsCalculateList.size())){ |
| | | goodDeductionCash = surDeductionCash; |
| | | goodUseIntegral = surUseIntegral; |
| | | }else{ |
| | | goodDeductionCash = (goodDeductionCash.multiply(deductionCash)).divide(maxDeductionCash,2,BigDecimal.ROUND_HALF_UP); |
| | | surDeductionCash = surDeductionCash.subtract(goodDeductionCash); |
| | | goodUseIntegral = (goodDeductionCash.multiply(totalIntegral)).divide(maxDeductionCash,2,BigDecimal.ROUND_HALF_UP); |
| | | surUseIntegral = totalIntegral.subtract(goodUseIntegral); |
| | | } |
| | | } |
| | | goodsCalculateList.get(j).setIntegralDeductCash(deductionCash); |
| | | realDeductionCash = realDeductionCash.add(deductionCash); |
| | | goodsCalculateList.get(j).setIntegralDeductCash(goodDeductionCash); |
| | | goodsCalculateList.get(j).setIntegralDeduct(goodUseIntegral); |
| | | realDeductionCash = realDeductionCash.add(goodDeductionCash); |
| | | |
| | | } |
| | | //剩余积分值 |
| | | orderPayConfirmResponse.setSurplusIntegral(totalIntegral); |
| | |
| | | if(Objects.isNull(coupon)||Constants.equalsInteger(coupon.getIsdeleted(),Constants.ONE)&&num>Constants.ZERO){ |
| | | continue; |
| | | } |
| | | if(coupon.getNum()>Constants.ZERO){ |
| | | //查询已领取数量 |
| | | Integer getNum = memberCouponMapper.selectCount(new QueryWrapper<MemberCoupon>().lambda() |
| | | .eq(MemberCoupon::getIsdeleted,Constants.ZERO) |
| | | .eq(MemberCoupon::getCouponId,couponId) |
| | | .ne(MemberCoupon::getGetMethod,Constants.TWO) |
| | | ).intValue(); |
| | | if(getNum >= coupon.getNum()){ |
| | | continue; |
| | | } |
| | | if(num>(coupon.getNum() - getNum)){ |
| | | num = coupon.getNum().intValue() - getNum; |
| | | } |
| | | } |
| | | MemberCoupon memberCoupon = MemberCoupon.couponToBean(coupon,inviteMember,new Date(),Constants.ONE,null); |
| | | |
| | | for (int i = 0; i < num; i++) { |
| | | //满减卷不会生成maxPrice 需要根据优惠券减少金额设置 |
| | | if(Constants.equalsInteger(coupon.getCouponType(),Constants.ZERO)){ |
| | |
| | | if(Objects.isNull(shop)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"未查询到订单关联经销商信息,请联系管理员"); |
| | | } |
| | | // if(!Constants.equalsInteger(shop.getMemberId(),memberId)){ |
| | | // throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"["+shop.getName()+"]非您绑定的经销商,无法进行该操作!"); |
| | | // } |
| | | if(!Constants.equalsInteger(shop.getId(),memberId)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对不起,当前订单核销门店为["+shop.getName()+"],您无法进行该操作!"); |
| | | } |
| | | goodsorder.setStatus(Constants.OrderStatus.DONE.getKey()); |
| | | goodsorder.setDoneDate(new Date()); |
| | | goodsorderMapper.updateById(goodsorder); |
| | |
| | | if(Objects.isNull(goodsorder.getDistributionShopId()) || Constants.equalsInteger(goodsorder.getPayMethod(),Constants.ONE)){ |
| | | return; |
| | | } |
| | | BigDecimal backIntegral = getBackIntegral(goodsorder.getPrice(),Constants.ONE); |
| | | if (backIntegral.compareTo(BigDecimal.ZERO) > 0) { |
| | | if (goodsorder.getReturnCustomerIntegral().compareTo(BigDecimal.ZERO) > 0) { |
| | | //更新余额信息 添加积分变动记录 |
| | | DealIntegralRequest dealIntegralRequest = new DealIntegralRequest(); |
| | | dealIntegralRequest.setIntegralNum(backIntegral); |
| | | dealIntegralRequest.setIntegralNum(goodsorder.getReturnCustomerIntegral()); |
| | | dealIntegralRequest.setDealType(Constants.ZERO); |
| | | dealIntegralRequest.setMemberId(goodsorder.getDistributionShopId()); |
| | | dealIntegralRequest.setObjId(goodsorder.getId()); |
| | |
| | | if(Constants.equalsInteger(goodsorder.getPayMethod(),Constants.ONE)){ |
| | | return; |
| | | } |
| | | BigDecimal backIntegral = getBackIntegral(goodsorder.getPrice(),Constants.ZERO); |
| | | if (backIntegral.compareTo(BigDecimal.ZERO) > 0) { |
| | | if (goodsorder.getReturnMemberIntegral().compareTo(BigDecimal.ZERO) > 0) { |
| | | //更新余额信息 添加积分变动记录 |
| | | DealIntegralRequest dealIntegralRequest = new DealIntegralRequest(); |
| | | dealIntegralRequest.setIntegralNum(backIntegral); |
| | | dealIntegralRequest.setIntegralNum(goodsorder.getReturnMemberIntegral()); |
| | | dealIntegralRequest.setDealType(Constants.ZERO); |
| | | dealIntegralRequest.setMemberId(goodsorder.getMemberId()); |
| | | dealIntegralRequest.setObjId(goodsorder.getId()); |
| | |
| | | .eq(Notice::getIsdeleted,Constants.ZERO) |
| | | .eq(Notice::getMemberId,member.getId()) |
| | | .eq(Notice::getStatus,Constants.ZERO) |
| | | )>=Constants.ZERO?Constants.ZERO:Constants.ONE |
| | | )>Constants.ZERO?Constants.ZERO:Constants.ONE |
| | | ); |
| | | |
| | | return homeInfoResponse; |
| | |
| | | List<Goodsorder> goodsorderList = goodsorderMapper.selectList(new QueryWrapper<Goodsorder>().lambda() |
| | | .eq(Goodsorder::getIsdeleted,Constants.ZERO) |
| | | .eq(Goodsorder::getReceiveType,Constants.ONE) |
| | | .isNotNull(Goodsorder::getExchangeCode) |
| | | .in(Goodsorder::getStatus,Constants.OrderStatus.WAIT_RECEIVE.getKey(), |
| | | Constants.OrderStatus.WAIT_PAY.getKey(), |
| | | Constants.OrderStatus.PAY_DONE.getKey()) |
| | |
| | | List<Goodsorder> goodsorderList = goodsorderMapper.selectList(new QueryWrapper<Goodsorder>().lambda() |
| | | .eq(Goodsorder::getIsdeleted, Constants.ZERO) |
| | | .eq(Goodsorder::getStatus, Constants.OrderStatus.WAIT_PAY.getKey()) |
| | | .ge(Goodsorder::getCreateDate, "DATE_SUB(NOW(), INTERVAL 15 MINUTE)") |
| | | .apply(" CREATE_DATE < DATE_SUB(NOW(), INTERVAL 15 MINUTE) ") |
| | | ); |
| | | if(CollectionUtils.isNotEmpty(goodsorderList)){ |
| | | for (Goodsorder goodsorder:goodsorderList) { |
| | | this.cancel(goodsorder,null,"订单未支付超时自动取消"); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 自动完成 7 天未确认收货的物流发货订单 |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void autoCompleteOrder(){ |
| | | //查询发货后 7 天未确认收货的订单数据(仅处理快递配送订单) |
| | | List<Goodsorder> goodsOrderList = goodsorderMapper.selectList( |
| | | new QueryWrapper<Goodsorder>() |
| | | .eq("STATUS", Constants.OrderStatus.WAIT_RECEIVE.getKey()) |
| | | .eq("RECEIVE_TYPE", Constants.ZERO) // 仅处理快递配送订单 |
| | | .isNotNull("KD_CODE") // 有物流单号 |
| | | .ne("KD_CODE", "") // 物流单号不为空 |
| | | .apply(" KD_DATE IS NOT NULL ") // 有发货时间 |
| | | .apply(" NOW() >= DATE_SUB(KD_DATE, INTERVAL -7 DAY) ") // 发货后 7 天 |
| | | ); |
| | | |
| | | if (!goodsOrderList.isEmpty()) { |
| | | for (Goodsorder order : goodsOrderList) { |
| | | try { |
| | | Goodsorder updateOrder = new Goodsorder(); |
| | | updateOrder.setId(order.getId()); |
| | | updateOrder.setStatus(Constants.OrderStatus.DONE.getKey()); |
| | | updateOrder.setDoneDate(new Date()); |
| | | updateOrder.setDoneInfo("发货 7 天后系统自动确认收货"); |
| | | goodsorderMapper.updateById(updateOrder); |
| | | |
| | | //存在现金支付 赠送 积分 |
| | | if(Constants.equalsInteger(updateOrder.getPayMethod(),Constants.ZERO)){ |
| | | //赠送消费者积分 |
| | | this.orderAddMemberIntegral(order); |
| | | //下单完成 根据信息确认是否需要赠送邀请者优惠券 |
| | | this.orderDoneRewardInviteCoupon(order); |
| | | //经销商 添加赠送积分 |
| | | this.orderAddShopIntegral(order); |
| | | //经销商 结算金额 |
| | | this.orderAddShopCash(order); |
| | | } |
| | | |
| | | |
| | | System.out.println("订单自动完成:订单 ID=" + order.getId() + ", 订单编号=" + order.getCode()); |
| | | } catch (Exception e) { |
| | | System.out.println("订单自动完成失败:订单 ID=" + order.getId() + ", 错误:" + e.getMessage()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |