解决按车型查询的结果

This commit is contained in:
2025-09-18 22:37:32 +08:00
parent 152f82933f
commit 3d91ab0aad
2 changed files with 2 additions and 2 deletions

View File

@ -584,7 +584,7 @@ public class OrderServiceImpl implements OrderService {
} }
LambdaQueryWrapper<OrderSubPO> querySubWrapper2 = new LambdaQueryWrapper<>(); LambdaQueryWrapper<OrderSubPO> querySubWrapper2 = new LambdaQueryWrapper<>();
querySubWrapper2.eq(OrderSubPO::getOrderId, orderMainPO.getOrderId()) querySubWrapper2.eq(OrderSubPO::getOrderId, orderMainPO.getOrderId())
.in(OrderSubPO::getPayStatus, Arrays.asList(PayStatusEnum.SUCCESS.getCode(), PayStatusEnum.REFUNDING.getCode(), PayStatusEnum.REFUND_SUCCESS.getCode())).orderByDesc(OrderSubPO::getUpdateTime); .in(OrderSubPO::getPayStatus, Arrays.asList(PayStatusEnum.USERPAYING.getCode(),PayStatusEnum.SUCCESS.getCode(), PayStatusEnum.REFUNDING.getCode(), PayStatusEnum.REFUND_SUCCESS.getCode())).orderByDesc(OrderSubPO::getUpdateTime);
List<OrderSubPO> orderSubPOList2 = orderSubRepo.list(querySubWrapper2); List<OrderSubPO> orderSubPOList2 = orderSubRepo.list(querySubWrapper2);
if(!CollectionUtils.isEmpty(orderSubPOList2)){ if(!CollectionUtils.isEmpty(orderSubPOList2)){
orderDetailDTO.setLastPayOrderNo(orderSubPOList2.get(0).getPaymentId()); orderDetailDTO.setLastPayOrderNo(orderSubPOList2.get(0).getPaymentId());

View File

@ -52,7 +52,7 @@
</foreach> </foreach>
</if> </if>
<if test="queryBrandName != null and queryBrandName != ''"> <if test="queryBrandName != null and queryBrandName != ''">
and m.brand_name like concat('%', #{queryBrandName}, '%') and (m.brand_name like concat('%', #{queryBrandName}, '%') or m.model_name like concat('%', #{queryBrandName}, '%'))
</if> </if>
</where> </where>
order by o.update_time desc order by o.update_time desc