From a0b030d6f6a641594db40fc97e3192120f57bdca Mon Sep 17 00:00:00 2001 From: 无关风月 <443237572@qq.com> Date: 星期三, 11 九月 2024 16:20:39 +0800 Subject: [PATCH] 代码提交 --- ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TOrderInvoiceServiceImpl.java | 8 ++++++++ ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/dto/PayOrderQueryDto.java | 4 ++++ ruoyi-service/ruoyi-order/src/main/resources/mapper/order/TChargingOrderMapper.xml | 6 ++++++ ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/vo/TOrderInvoiceVO.java | 3 +++ 4 files changed, 21 insertions(+), 0 deletions(-) diff --git a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/vo/TOrderInvoiceVO.java b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/vo/TOrderInvoiceVO.java index 690a19c..b6dd626 100644 --- a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/vo/TOrderInvoiceVO.java +++ b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/vo/TOrderInvoiceVO.java @@ -6,6 +6,7 @@ import lombok.Data; import java.math.BigDecimal; +import java.util.List; @Data @ApiModel(value = "发票管理VO") @@ -27,5 +28,7 @@ private BigDecimal addedService; @ApiModelProperty(value = "用户电话") private String userPhone; + @ApiModelProperty(value = "充电订单ids") + private List<String> ids; } diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/dto/PayOrderQueryDto.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/dto/PayOrderQueryDto.java index 392cebb..d20be80 100644 --- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/dto/PayOrderQueryDto.java +++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/dto/PayOrderQueryDto.java @@ -8,11 +8,15 @@ import lombok.Data; import java.time.LocalDateTime; +import java.util.List; + @Data @ApiModel("支付订单查询dto") public class PayOrderQueryDto extends BasePage { @ApiModelProperty("订单编号") private String code; + @ApiModelProperty("开票跳转-订单ids数组") + private List<String> ids; @ApiModelProperty("1充电订单2购物订单3vip订单4停车订单") private Integer type; @ApiModelProperty("手机号") diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TOrderInvoiceServiceImpl.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TOrderInvoiceServiceImpl.java index fea0c6d..6ce5163 100644 --- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TOrderInvoiceServiceImpl.java +++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TOrderInvoiceServiceImpl.java @@ -255,6 +255,14 @@ query.setUserIds(userList.stream().map(TAppUser::getId).collect(Collectors.toList())); PageInfo<TOrderInvoiceVO> pageInfo = new PageInfo<>(query.getPageCurr(),query.getPageSize()); List<TOrderInvoiceVO> list = this.baseMapper.pageList(query,pageInfo); + for (TOrderInvoiceVO tOrderInvoiceVO : list) { + List<Long> collect = orderInvoiceDetailService.lambdaQuery().eq(TOrderInvoiceDetail::getOrderInvoiceId, tOrderInvoiceVO.getId()) + .eq(TOrderInvoiceDetail::getOrderType, 1).list().stream() + .map(TOrderInvoiceDetail::getOrderId).collect(Collectors.toList()); + // 将其全部转化为String + tOrderInvoiceVO.setIds(collect.stream().map(String::valueOf).collect(Collectors.toList())); + } + // 查询这个开票的订单ids List<Long> ids = list.stream().map(TOrderInvoiceVO::getId).collect(Collectors.toList()); diff --git a/ruoyi-service/ruoyi-order/src/main/resources/mapper/order/TChargingOrderMapper.xml b/ruoyi-service/ruoyi-order/src/main/resources/mapper/order/TChargingOrderMapper.xml index ad2a33a..b8ccaca 100644 --- a/ruoyi-service/ruoyi-order/src/main/resources/mapper/order/TChargingOrderMapper.xml +++ b/ruoyi-service/ruoyi-order/src/main/resources/mapper/order/TChargingOrderMapper.xml @@ -193,6 +193,12 @@ <if test="data.createTime2 != null"> AND o.create_time <= #{data.createTime2} </if> + <if test="data.ids != null and data.ids() > 0"> + AND o.id IN + <foreach collection="data.ids" item="id" open="(" separator="," close=")"> + #{id} + </foreach> + </if> </where> ORDER BY o.create_time desc -- Gitblit v1.7.1