luodangjia
2024-09-26 3c99ce947f25a2dcbae14e78276df77978d412ca
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TExchangeOrderServiceImpl.java
@@ -90,12 +90,16 @@
         String imgUrl = "";
         if(tExchangeOrder.getOrderType() == 1){
            TGoods goods = goodsClient.getGoodsById(tExchangeOrder.getGoodsId()).getData();
            name = goods.getName();
            imgUrl = goods.getCoverPicture();
            if(null != goods){
               name = goods.getName();
               imgUrl = goods.getCoverPicture();
            }
         }else{
            TCoupon coupon = couponClient.getCouponById1(tExchangeOrder.getCouponId()).getData();
            name = coupon.getName();
            imgUrl = coupon.getCoverPicture();
            if(null != coupon){
               name = coupon.getName();
               imgUrl = coupon.getCoverPicture();
            }
         }
         exchangeOrderList.setName(name);
         exchangeOrderList.setImgUrl(imgUrl);
@@ -131,15 +135,19 @@
      String imgUrl = "";
      if(exchangeOrder.getOrderType() == 1){
         TGoods goods = goodsClient.getGoodsById(exchangeOrder.getGoodsId()).getData();
         name = goods.getName();
         imgUrl = goods.getCoverPicture();
         if(null != goods){
            name = goods.getName();
            imgUrl = goods.getCoverPicture();
         }
      }else{
         TCoupon coupon = couponClient.getCouponById1(exchangeOrder.getCouponId()).getData();
         info.setCouponType(coupon.getType());
         info.setDays(coupon.getDays());
         info.setEndTime(coupon.getEndTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
         name = coupon.getName();
         imgUrl = coupon.getCoverPicture();
         if(null != coupon){
            info.setCouponType(coupon.getType());
            info.setDays(coupon.getDays());
            info.setEndTime(coupon.getEndTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
            name = coupon.getName();
            imgUrl = coupon.getCoverPicture();
         }
      }
      info.setName(name);
      info.setImgUrl(imgUrl);