From df4f952240440f07840154b046601a2ade091582 Mon Sep 17 00:00:00 2001 From: dengwc Date: Tue, 16 Apr 2024 17:20:55 +0800 Subject: [PATCH] =?UTF-8?q?=E9=AB=98=E5=BE=B7=E5=8A=A0=E7=AD=BE=E6=B5=8B?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/test/java/com/chint/CTripTest.java | 10 ++-- src/test/java/com/chint/ExcelTest.java | 15 +++--- src/test/java/com/chint/LYTest.java | 20 ++++---- .../java/com/chint/RouteApplicationTests.java | 50 +++++++++---------- 4 files changed, 46 insertions(+), 49 deletions(-) diff --git a/src/test/java/com/chint/CTripTest.java b/src/test/java/com/chint/CTripTest.java index ff340a09..395c2091 100644 --- a/src/test/java/com/chint/CTripTest.java +++ b/src/test/java/com/chint/CTripTest.java @@ -134,7 +134,7 @@ public class CTripTest { private User user = new User(1L, "230615020", 1, "卢麟哲", "1033719135@qq.com", "15857193365", "A30000001"); - @Test +// @Test void syncOrder() { RouteOrder routeOrder = routeRepository.queryById(3892L); cTripOrderSyncAdapter.syncSupplierOrder(routeOrder); @@ -186,13 +186,13 @@ public class CTripTest { } - @Test +// @Test void hSingleLogin() { BaseContext.setCurrentUser(user); System.out.println(loginRequest.hSingleLogin(null).getRedirectUrl()); } - @Test +// @Test void h5LoginTest() { BaseContext.setCurrentUser(user); System.out.println(loginRequest.h5Login(null)); @@ -243,7 +243,7 @@ public class CTripTest { System.out.println(gson.toJson(estimate)); } - @Test +// @Test void search() { BaseContext.setCurrentUser(user); SearchOrderResponse response = orderSearchRequest.searchOrderResponseByOrderId("31108053999"); @@ -591,7 +591,7 @@ public class CTripTest { } - @Test +// @Test void generateRecord(){ CTripHotelRecord hotelRecordByRecordId = cTripOrderDetailRepository.findHotelRecordByRecordId("99127528"); OrderRecordExtensionFactory orderRecordExtensionFactory = orderRecordFactorySelector.extensionFactoryOfSupplierName(SUPPLIER_C_TRIP); diff --git a/src/test/java/com/chint/ExcelTest.java b/src/test/java/com/chint/ExcelTest.java index b4cedb15..89cba3f4 100644 --- a/src/test/java/com/chint/ExcelTest.java +++ b/src/test/java/com/chint/ExcelTest.java @@ -10,11 +10,10 @@ import com.authine.cloudpivot.opensdk.config.CloudpivotEnvConfig; import com.authine.cloudpivot.opensdk.model.request.workflow.StartWorkflowRequest; import com.authine.cloudpivot.opensdk.model.response.workflow.StartWorkflowResponse; import com.chint.application.commands.RefundOrderGenerateCommand; -import com.chint.application.in.AutoWorkController; import com.chint.application.in.RouteOrderPageDto; import com.chint.application.services.login.strategy.ANFeiShuLoginStrategy; import com.chint.domain.aggregates.order.*; -import com.chint.domain.aggregates.order.order_record.OrderHotelRecord; + import com.chint.domain.aggregates.order.order_record.ly_order_record.LyOrderCarRecord; import com.chint.domain.aggregates.order.order_record.ly_order_record.LyOrderFlightRecord; import com.chint.domain.aggregates.order.order_record.ly_order_record.LyOrderHotelRecord; @@ -42,8 +41,9 @@ import com.chint.interfaces.rest.ctrip.dto.search.car.CarQuickOrderInfoEntity; import com.chint.interfaces.rest.ctrip.dto.search.car.OrderFee; import com.chint.interfaces.rest.ctrip.dto.search.flight.ChangeInfo; import com.chint.interfaces.rest.ctrip.dto.search.flight.FlightOrderInfoEntity; + import com.chint.interfaces.rest.ly.LYSearchRequest; -import com.chint.interfaces.rest.ly.dto.LYBaseRequest; + import com.chint.interfaces.rest.ly.dto.search.response.filght.FlightOrderResponse; import com.chint.interfaces.rest.ly.dto.search.response.train.TrainDetailResponse; import com.chint.interfaces.rest.ly.reconciliation.dto.BaseDetailParam; @@ -60,8 +60,6 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang3.StringUtils; -import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.context.ApplicationContext; @@ -501,7 +499,7 @@ public class ExcelTest { @Autowired private JdbcLyOrderCarRecord jdbcLyOrderCarRecord; - @Test + // @Test void statementTest() { StatementPageList param = new StatementPageList(); param.setPageIndex(1) @@ -639,7 +637,7 @@ public class ExcelTest { System.out.println("bean = " + bean); } -// @Test + // @Test public void testDto() { AtomicReference orderDetailRef = new AtomicReference<>(); OrderRecordBasic orderRecordBasic = getOrderRecordBasic("123", orderDetailRef::set); @@ -672,7 +670,7 @@ public class ExcelTest { return null; } -// @Test + // @Test public void testStrDto() { String ab = "dadasd"; String[] split = ab.split("-"); @@ -789,5 +787,4 @@ public class ExcelTest { throw new Exception(); } } - } diff --git a/src/test/java/com/chint/LYTest.java b/src/test/java/com/chint/LYTest.java index df3e58bc..ac6f9743 100644 --- a/src/test/java/com/chint/LYTest.java +++ b/src/test/java/com/chint/LYTest.java @@ -813,7 +813,7 @@ public class LYTest { System.out.println("join = " + join); } -// @Test + // @Test void searchFlight() { FlightOrderResponse flightOrderDetail = lySearchRequest.getFlightOrderDetail("DF24032167504679321"); Gson gson = new Gson(); @@ -829,9 +829,9 @@ public class LYTest { System.out.println(json); } - @Test + // @Test void searchHotel() { - HotelDetailResponse hotelOrderDetail = lySearchRequest.getHotelOrderDetail("HO20240317122300088705"); + HotelDetailResponse hotelOrderDetail = lySearchRequest.getHotelOrderDetail("HO20240325155100629867"); Gson gson = new Gson(); String json = gson.toJson(hotelOrderDetail); System.out.println(json); @@ -945,7 +945,7 @@ public class LYTest { } -// @Test + // @Test void queryFlightDetail() { LyOrderDetailFlightRecord lyOrderDetailFlightRecord = new LyOrderDetailFlightRecord();//创建对象 //订单明细数据 @@ -974,7 +974,7 @@ public class LYTest { } -// @Test + // @Test void queryHotelDetail() { LyOrderDetailHotelRecord lyOrderDetailHotelRecord = new LyOrderDetailHotelRecord(); HotelDetailResponse hotelOrderDetail = lySearchRequest.getHotelOrderDetail("HO20240308154500794121"); @@ -995,7 +995,7 @@ public class LYTest { System.out.println(gson.toJson(lyOrderDetailHotelRecord)); } -// @Test + // @Test void queryTrainDetail() { LyOrderDetailTrainRecord lyOrderDetailTrainRecord = new LyOrderDetailTrainRecord(); TrainDetailResponse trainOrderDetail = lySearchRequest.getTrainOrderDetail("DT24032768242432787");//DT24032768242432787 @@ -1037,7 +1037,7 @@ public class LYTest { } -// @Test + // @Test void queryCarDetail() { LyOrderDetailCarRecord lyOrderDetailCarRecord = new LyOrderDetailCarRecord(); CarDetailResponse carDetailResponse = lySearchRequest.getCarDetailResponse("DC24031466726324898"); @@ -1078,18 +1078,18 @@ public class LYTest { @Autowired private JdbcLyOrderDetailFlightRecord jdbcLyOrderDetailFlightRecord; -// @Test + + // @Test public void dasfag() { LyOrderDetailFlightRecord orderDetail = jdbcLyOrderDetailFlightRecord.findByOrderNo("123"); if (orderDetail != null) { System.out.println("123333orderDetail = " + orderDetail); System.out.println("不为空"); - }else { + } else { LyOrderDetailFlightRecord lyOrderDetailFlightRecord = new LyOrderDetailFlightRecord(); lyOrderDetailFlightRecord.setOrderNo("123"); jdbcLyOrderDetailFlightRecord.save(lyOrderDetailFlightRecord); System.out.println("为空"); } } - } diff --git a/src/test/java/com/chint/RouteApplicationTests.java b/src/test/java/com/chint/RouteApplicationTests.java index 9ca098ad..6a38834b 100644 --- a/src/test/java/com/chint/RouteApplicationTests.java +++ b/src/test/java/com/chint/RouteApplicationTests.java @@ -167,7 +167,7 @@ class RouteApplicationTests { System.out.println(postRequest.getReDirectUrl("http://10.10.100.129:8089" + "/MobileOA/api/FsscSSO?loginUser=230615020&data=%2F%23%2Fexpenseclaim%3FbillDefineId%3Dfcc76666fb1211e98e2019f4db5548fd%26scene%3DWRITE%26isNew%3Dtrue%26goback%3Dfalse")); } - // @Test +// @Test void syncUserTo() { User user = new User(); user.setCompanyCode("A10000001"); @@ -263,7 +263,7 @@ class RouteApplicationTests { System.out.println(orderInfo.getOrderSerialNo()); } - @Test +// @Test void loginSign() { String sfno = "240412063"; String syscode = "FSSC"; @@ -278,7 +278,7 @@ class RouteApplicationTests { // log.trace("trace"); } - @Test +// @Test void loginSignProd() { String sfno = "240412063"; String syscode = "FSSC"; @@ -323,10 +323,9 @@ class RouteApplicationTests { routeRepository.deleteById(875L); } - @Test +// @Test void deleteOrderDetail() { - orderDetailRepository.deleteById(2977L); -// orderDetailRepository.deleteById(2975L); + orderDetailRepository.deleteById(2609L); } // @Test @@ -1007,12 +1006,12 @@ class RouteApplicationTests { } - // @Test + // @Test void pushUserInfo() { pushUser.getUserSFDataFromOpenApiBatch(); } - // @Test +// @Test void deleteByOrderId() { orderDetailRepository.deleteById(1647L); orderDetailRepository.deleteById(1648L); @@ -1058,7 +1057,7 @@ class RouteApplicationTests { locationRepository.saveAll(allLevelThreeAndFour); } - // @Test +// @Test void generateIfAirport() { List airportLocation = new ArrayList<>(); AirportSearchResponse response = cTripAirportRequest.getAirport(); @@ -1104,7 +1103,7 @@ class RouteApplicationTests { locationRepository.saveAll(airportLocation); } - // @Test +// @Test void updateCounty() { List byLocationType = locationRepository.findByLocationType(5); for (Location location : byLocationType) { @@ -1115,7 +1114,7 @@ class RouteApplicationTests { locationRepository.saveAll(byLocationType); } - // @Test +// @Test void updateAirportPath() { List byLocationType = locationRepository.findByLocationType(7); for (Location location : byLocationType) { @@ -1125,7 +1124,7 @@ class RouteApplicationTests { locationRepository.saveAll(byLocationType); } - // @Test +// @Test void generateLocationType() { List all = locationRepository.findAll(); all.forEach(it -> { @@ -1196,7 +1195,8 @@ class RouteApplicationTests { } - @Test + +// @Test void addRanks() { RanksData ranksData = new RanksData(); @@ -1228,45 +1228,45 @@ class RouteApplicationTests { } - // @Test +// @Test void testQueryCity() { Location location = locationRepository.findById(373L); Location cityLocation = lyOrderSyncAdapter.getCityLocation(location); System.out.println(cityLocation); } - // @Test - void testTimeFor() { +// @Test + void testTimeFor(){ LocalDateTime localDateTime = DateTimeUtil.strToTimeMM("2024-03-04 00:23:26.727"); System.out.println(localDateTime); } - // @Test - void testFindOrderRecord() { +// @Test + void testFindOrderRecord(){ CTripHotelRecord hotelRecordByRecordId = cTripOrderDetail.findHotelRecordByRecordId("98494942"); System.out.println(hotelRecordByRecordId); } - // @Test - void testInBlackList() { +// @Test + void testInBlackList(){ orderDomainService.checkCompanyNameIfBlack("乐清正泰电器销售有限公司"); } - @Test - void testSplit() { +// @Test + void testSplit(){ String str = "20240301"; System.out.println(str.substring(0, 5)); System.out.println(lastMonthStr()); } - @Test - void testsplit2() { +// @Test + void testsplit2(){ String inputOrderNo = "FSSC-CLSQ240409000001dev#NBWSAW"; String orderNo = null; if (inputOrderNo.contains("-")) { String[] split = inputOrderNo.split("-"); orderNo = split[1]; - if (orderNo.contains("#")) { + if(orderNo.contains("#")){ String[] split1 = orderNo.split("#"); orderNo = split1[0]; }