瀏覽代碼

baocuo tiaoz

gongfuzhu 1 年之前
父節點
當前提交
deae32ae6b

+ 28 - 6
SpringBatchServiceServer/src/main/java/com/zswl/cloud/springBtach/server/core/service/impl/DfyHotelServiceImpl.java

@@ -52,23 +52,45 @@ public class DfyHotelServiceImpl implements DfyHotelService {
 
 
     public ResultContent<QueryNewResponse> queryNew(QueryNewRequest queryNewRequest) {
-        return ResultContent.buildContent(domesticHotelApi.queryNew(queryNewRequest));
+        QueryNewResponse queryNewResponse = domesticHotelApi.queryNew(queryNewRequest);
+        if (queryNewResponse.getSuccess()) {
+            return ResultContent.buildContent(queryNewResponse);
+        }
+        return ResultContent.build(ResultState.Fail, queryNewResponse.getMsg());
     }
 
     public ResultContent<HotelListResponse> hotelList(HotelListRequest hotelListRequest) {
-        return ResultContent.buildContent(domesticHotelApi.hotelList(hotelListRequest));
+        HotelListResponse hotelListResponse = domesticHotelApi.hotelList(hotelListRequest);
+        if (hotelListResponse.getSuccess()) {
+
+            return ResultContent.buildContent(hotelListResponse);
+        }
+        return ResultContent.build(ResultState.Fail, hotelListResponse.getMsg());
     }
 
     public ResultContent<HotelDetailResponse> hotelDetail(HotelDetailRequest hotelDetailRequest) {
-        return ResultContent.buildContent(domesticHotelApi.hotelDetail(hotelDetailRequest));
+        HotelDetailResponse hotelDetailResponse = domesticHotelApi.hotelDetail(hotelDetailRequest);
+        if (hotelDetailResponse.getSuccess()) {
+            return ResultContent.buildContent(hotelDetailResponse);
+        }
+        return ResultContent.build(ResultState.Fail, hotelDetailResponse.getMsg());
     }
 
     public ResultContent<RatePlanInfoResponse> ratePlanInfo(RatePlanInfoRequest ratePlanInfoRequest) {
-        return ResultContent.buildContent(domesticHotelApi.ratePlanInfo(ratePlanInfoRequest));
+        RatePlanInfoResponse ratePlanInfoResponse = domesticHotelApi.ratePlanInfo(ratePlanInfoRequest);
+        if (ratePlanInfoResponse.getSuccess()) {
+            return ResultContent.buildContent(ratePlanInfoResponse);
+        }
+        return ResultContent.build(ResultState.Fail, ratePlanInfoResponse.getMsg());
     }
 
     public ResultContent<RatePlanResponse> ratePlan(RatePlanRequest ratePlanRequest) {
-        return ResultContent.buildContent(domesticHotelApi.ratePlan(ratePlanRequest));
+        RatePlanResponse ratePlanResponse = domesticHotelApi.ratePlan(ratePlanRequest);
+        if (ratePlanResponse.getSuccess()) {
+
+            return ResultContent.buildContent(ratePlanResponse);
+        }
+        return ResultContent.build(ResultState.Fail, ratePlanResponse.getMsg());
     }
 
     public ResultContent<CreatOrderResultModel> addOrder(AddOrderRequest addOrderRequest) {
@@ -131,7 +153,7 @@ public class DfyHotelServiceImpl implements DfyHotelService {
         createOrder2Model.setAccesserUserId(authAccount);
         createOrder2Model.setChannel(addOrderRequest.getChannel());
         JSONObject goodsInfo = JSONUtil.parseObj(addOrderRequest);
-        goodsInfo.set("hotelInfo",orderDetailResponse.getData().getHotelInfo());
+        goodsInfo.set("hotelInfo", orderDetailResponse.getData().getHotelInfo());
         goodsInfo.set("hotlOrderId", addOrderResponse.getData().getOrderId());
         goodsInfo.set("goodsName", addOrderRequest.getRoomNameCn());
         goodsInfo.set("goodsPath", addOrderRequest.getRoomPic());

+ 6 - 6
SpringBatchServiceServer/src/main/java/com/zswl/cloud/springBtach/server/core/service/impl/DfyTicketServiceImpl.java

@@ -59,7 +59,7 @@ public class DfyTicketServiceImpl implements DfyTicketService {
         if (scenicListResponse.getSuccess()) {
             return ResultContent.buildContent(scenicListResponse);
         }
-        return ResultContent.build(ResultState.Fail, scenicListResponse);
+        return ResultContent.build(ResultState.Fail, scenicListResponse.getMsg());
     }
 
 
@@ -68,7 +68,7 @@ public class DfyTicketServiceImpl implements DfyTicketService {
         if (scenicDetailResponse.getSuccess()) {
             return ResultContent.buildContent(scenicDetailResponse);
         }
-        return ResultContent.build(ResultState.Fail, scenicDetailResponse);
+        return ResultContent.build(ResultState.Fail, scenicDetailResponse.getMsg());
     }
 
 
@@ -78,7 +78,7 @@ public class DfyTicketServiceImpl implements DfyTicketService {
         if (privilegeTicketListResponse.getSuccess()) {
             return ResultContent.buildContent(privilegeTicketListResponse);
         }
-        return ResultContent.build(ResultState.Fail, privilegeTicketListResponse);
+        return ResultContent.build(ResultState.Fail, privilegeTicketListResponse.getMsg());
     }
 
 
@@ -87,7 +87,7 @@ public class DfyTicketServiceImpl implements DfyTicketService {
         if (detail.getSuccess()) {
             return ResultContent.buildContent(detail);
         }
-        return ResultContent.build(ResultState.Fail, detail);
+        return ResultContent.build(ResultState.Fail, detail.getMsg());
     }
 
 
@@ -194,7 +194,7 @@ public class DfyTicketServiceImpl implements DfyTicketService {
         if (orderDetailResponse.getSuccess()) {
             return ResultContent.buildContent(orderDetailResponse);
         }
-        return ResultContent.build(ResultState.Fail, orderDetailResponse);
+        return ResultContent.build(ResultState.Fail, orderDetailResponse.getMsg());
     }
 
 
@@ -205,7 +205,7 @@ public class DfyTicketServiceImpl implements DfyTicketService {
 
             return ResultContent.buildContent(orderStatusResponse);
         }
-        return ResultContent.build(ResultState.Fail, orderStatusResponse);
+        return ResultContent.build(ResultState.Fail, orderStatusResponse.getMsg());
     }