FlashDeliveryUserCardStops.java 964 B

1234567891011121314151617181920212223
  1. package com.ruoyi.app.flashdelivery.service;
  2. import com.ruoyi.app.flashdelivery.dto.FlashDeliveryStopView;
  3. import com.ruoyi.system.domain.flash.FlashDeliveryOrderStop;
  4. import org.springframework.beans.BeanUtils;
  5. import java.util.List;
  6. /** 用户端订单卡片逐站列表:全部站点返回文字地址与备注,寄件收件同口径;联系人、电话、坐标、凭证与收货码不落卡片。 */
  7. public final class FlashDeliveryUserCardStops {
  8. private FlashDeliveryUserCardStops() {}
  9. public static List<FlashDeliveryStopView> of(List<FlashDeliveryOrderStop> rows) {
  10. return rows.stream().map(stop -> {
  11. FlashDeliveryStopView view = new FlashDeliveryStopView();
  12. BeanUtils.copyProperties(stop, view);
  13. view.setDeliveryPinCode(null);
  14. view.setName(null); view.setPhone(null);
  15. view.setLongitude(null); view.setLatitude(null);
  16. return view;
  17. }).toList();
  18. }
  19. }