Bläddra i källkod

app修改-二级市场收购商二次接单流程修改

linbl 1 år sedan
förälder
incheckning
16cecbc6e8

+ 8 - 6
sp-service/level-two-server/src/main/java/com/pj/tb_orders/MethodOrdersService.java

@@ -54,12 +54,14 @@ public class MethodOrdersService {
             LambdaQueryWrapper<TbDemandQuotation> wrapper = new LambdaQueryWrapper();
             wrapper.eq(TbDemandQuotation::getDemandId, goodsDemandId);
             wrapper.eq(TbDemandQuotation::getQuotationResult, 1);
-            TbDemandQuotation demandQuotation = demandQuotationService.getOne(wrapper);
-            // 商品报价
-            ordersDto.setQuotation(demandQuotation.getQuotation());
-            // 商品报价人
-            ordersDto.setQuotationPerson(demandQuotation.getCreateName());
-
+            wrapper.orderByDesc(TbDemandQuotation::getCreateTime);
+            List<TbDemandQuotation> demandQuotationList = demandQuotationService.list(wrapper);
+            if(demandQuotationList.size()>0) {
+                // 商品报价
+                ordersDto.setQuotation(demandQuotationList.get(0).getQuotation());
+                // 商品报价人
+                ordersDto.setQuotationPerson(demandQuotationList.get(0).getCreateName());
+            }
 
             ordersDtoList.add(ordersDto);
         });