日常提交
This commit is contained in:
parent
b54129e9e0
commit
8e0830d588
|
@ -38,6 +38,7 @@ public class OrderDetail {
|
||||||
private LocalDateTime endTime;
|
private LocalDateTime endTime;
|
||||||
private LocalDateTime createTime;
|
private LocalDateTime createTime;
|
||||||
private LocalDateTime updateTime;
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
// 根据需要添加构造函数、getter、setter等
|
// 根据需要添加构造函数、getter、setter等
|
||||||
@MappedCollection(idColumn = "order_id", keyColumn = "order_key")
|
@MappedCollection(idColumn = "order_id", keyColumn = "order_key")
|
||||||
private List<OrderEvent> orderEventList;
|
private List<OrderEvent> orderEventList;
|
||||||
|
|
|
@ -153,7 +153,6 @@ public class LegEventHandler implements LegEventService {
|
||||||
if (byOrderNo.isEmpty()) {
|
if (byOrderNo.isEmpty()) {
|
||||||
//否则创建新的订单添加到routeOrder
|
//否则创建新的订单添加到routeOrder
|
||||||
orderDetail = orderDetailFactory.create(data)
|
orderDetail = orderDetailFactory.create(data)
|
||||||
.price(data.getPrice()).productType(data.getProductType())
|
|
||||||
.employeeNo(routeOrder.getUserId());
|
.employeeNo(routeOrder.getUserId());
|
||||||
routeOrder.addOrderDetail(orderDetail);
|
routeOrder.addOrderDetail(orderDetail);
|
||||||
routeOrder = routeRepository.save(routeOrder);
|
routeOrder = routeRepository.save(routeOrder);
|
||||||
|
|
|
@ -44,6 +44,7 @@ public class LYOrderDataAdapter implements OrderDataAdapter {
|
||||||
.selfOrderNo(data.getOutOrderNo())
|
.selfOrderNo(data.getOutOrderNo())
|
||||||
.price(String.valueOf(data.getTotalAmount()))
|
.price(String.valueOf(data.getTotalAmount()))
|
||||||
.outOrderNo(data.getOutOrderNo())
|
.outOrderNo(data.getOutOrderNo())
|
||||||
|
.selfOrderNo(data.getTravelData().getTravelApplyNo())
|
||||||
.trainOrderDetailData(trainDetailResult)
|
.trainOrderDetailData(trainDetailResult)
|
||||||
.supplierName(SUPPLIER_L_Y)
|
.supplierName(SUPPLIER_L_Y)
|
||||||
.build()
|
.build()
|
||||||
|
@ -58,9 +59,11 @@ public class LYOrderDataAdapter implements OrderDataAdapter {
|
||||||
.productType(LEG_TYPE_HOTEL)
|
.productType(LEG_TYPE_HOTEL)
|
||||||
.outOrderNo(data.getOrderInfo().getOrderSerialNo())
|
.outOrderNo(data.getOrderInfo().getOrderSerialNo())
|
||||||
.price(String.valueOf(data.getOrderInfo().getTotalPrice()))
|
.price(String.valueOf(data.getOrderInfo().getTotalPrice()))
|
||||||
//.selfOrderNo()
|
.selfOrderNo(dataObject.getTravelData().getTravelApplyNo())
|
||||||
.actualOrderNo(data.getOrderInfo().getOrderSerialNo())
|
.actualOrderNo(data.getOrderInfo().getOrderSerialNo())
|
||||||
.hotelOrderDetailData(hotelDetailResult)
|
.hotelOrderDetailData(hotelDetailResult)
|
||||||
|
// .orderStatus()
|
||||||
|
// .originOrderStatus()
|
||||||
.supplierName(SUPPLIER_L_Y)
|
.supplierName(SUPPLIER_L_Y)
|
||||||
.build()
|
.build()
|
||||||
);
|
);
|
||||||
|
@ -74,6 +77,7 @@ public class LYOrderDataAdapter implements OrderDataAdapter {
|
||||||
.outOrderNo(data.getOrderSerialNo())
|
.outOrderNo(data.getOrderSerialNo())
|
||||||
.price(String.valueOf(data.getTotalAmount()))
|
.price(String.valueOf(data.getTotalAmount()))
|
||||||
.actualOrderNo(data.getOutOrderNo())
|
.actualOrderNo(data.getOutOrderNo())
|
||||||
|
.selfOrderNo(data.getTravelData().getTravelApplyNo())
|
||||||
.carOrderDetailData(carDetailResult)
|
.carOrderDetailData(carDetailResult)
|
||||||
.supplierName(SUPPLIER_L_Y)
|
.supplierName(SUPPLIER_L_Y)
|
||||||
.build()
|
.build()
|
||||||
|
@ -89,6 +93,7 @@ public class LYOrderDataAdapter implements OrderDataAdapter {
|
||||||
// .orderNo(data.get())
|
// .orderNo(data.get())
|
||||||
// .price(String.valueOf( data.getTotalAmount()))
|
// .price(String.valueOf( data.getTotalAmount()))
|
||||||
// .actualOrderNo(data.getOutOrderNo())
|
// .actualOrderNo(data.getOutOrderNo())
|
||||||
|
.selfOrderNo(data.getTravelData().getTravelApplyNo())
|
||||||
.flightOrderDetailData(flyDetailResult)
|
.flightOrderDetailData(flyDetailResult)
|
||||||
.supplierName(SUPPLIER_L_Y)
|
.supplierName(SUPPLIER_L_Y)
|
||||||
.build()
|
.build()
|
||||||
|
|
|
@ -21,7 +21,9 @@ public class OrderLegData {
|
||||||
private String startTime; //开始时间
|
private String startTime; //开始时间
|
||||||
private String endTime; //结束时间
|
private String endTime; //结束时间
|
||||||
private Long originId;
|
private Long originId;
|
||||||
|
private String originName;
|
||||||
private Long destinationId;
|
private Long destinationId;
|
||||||
|
private String destinationName;
|
||||||
private String currencyCode;
|
private String currencyCode;
|
||||||
|
|
||||||
private Object carOrderDetailData;
|
private Object carOrderDetailData;
|
||||||
|
@ -31,7 +33,6 @@ public class OrderLegData {
|
||||||
private Object otherOrderDetailData;
|
private Object otherOrderDetailData;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private OrderLegData(Builder builder) {
|
private OrderLegData(Builder builder) {
|
||||||
this.actualOrderNo = builder.actualOrderNo;
|
this.actualOrderNo = builder.actualOrderNo;
|
||||||
this.outOrderNo = builder.outOrderNo;
|
this.outOrderNo = builder.outOrderNo;
|
||||||
|
@ -74,7 +75,8 @@ public class OrderLegData {
|
||||||
private String endTime; //结束时间
|
private String endTime; //结束时间
|
||||||
private Long originId;
|
private Long originId;
|
||||||
private Long destinationId;
|
private Long destinationId;
|
||||||
|
private String originName;
|
||||||
|
private String destinationName;
|
||||||
private String currencyCode;
|
private String currencyCode;
|
||||||
private Object carOrderDetailData;
|
private Object carOrderDetailData;
|
||||||
private Object trainOrderDetailData;
|
private Object trainOrderDetailData;
|
||||||
|
@ -89,18 +91,22 @@ public class OrderLegData {
|
||||||
this.carOrderDetailData = carOrderDetailData;
|
this.carOrderDetailData = carOrderDetailData;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Builder trainOrderDetailData(Object trainOrderDetailData) {
|
public Builder trainOrderDetailData(Object trainOrderDetailData) {
|
||||||
this.trainOrderDetailData = trainOrderDetailData;
|
this.trainOrderDetailData = trainOrderDetailData;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Builder hotelOrderDetailData(Object hotelOrderDetailData) {
|
public Builder hotelOrderDetailData(Object hotelOrderDetailData) {
|
||||||
this.hotelOrderDetailData = hotelOrderDetailData;
|
this.hotelOrderDetailData = hotelOrderDetailData;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Builder flightOrderDetailData(Object flightOrderDetailData) {
|
public Builder flightOrderDetailData(Object flightOrderDetailData) {
|
||||||
this.flightOrderDetailData = flightOrderDetailData;
|
this.flightOrderDetailData = flightOrderDetailData;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Builder otherOrderDetailData(Object otherOrderDetailData) {
|
public Builder otherOrderDetailData(Object otherOrderDetailData) {
|
||||||
this.otherOrderDetailData = otherOrderDetailData;
|
this.otherOrderDetailData = otherOrderDetailData;
|
||||||
return this;
|
return this;
|
||||||
|
@ -115,18 +121,22 @@ public class OrderLegData {
|
||||||
this.orderTime = orderTime;
|
this.orderTime = orderTime;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Builder startTime(String startTime) {
|
public Builder startTime(String startTime) {
|
||||||
this.startTime = startTime;
|
this.startTime = startTime;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Builder endTime(String endTime) {
|
public Builder endTime(String endTime) {
|
||||||
this.endTime = endTime;
|
this.endTime = endTime;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Builder originId(Long originId) {
|
public Builder originId(Long originId) {
|
||||||
this.originId = originId;
|
this.originId = originId;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Builder destinationId(Long destinationId) {
|
public Builder destinationId(Long destinationId) {
|
||||||
this.destinationId = destinationId;
|
this.destinationId = destinationId;
|
||||||
return this;
|
return this;
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
package com.chint;
|
package com.chint;
|
||||||
|
|
||||||
import cn.hutool.extra.pinyin.PinyinUtil;
|
import cn.hutool.extra.pinyin.PinyinUtil;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.chint.application.services.login.strategy.PailaLoginStrategy;
|
import com.chint.application.services.login.strategy.PailaLoginStrategy;
|
||||||
import com.chint.domain.aggregates.order.Location;
|
import com.chint.domain.aggregates.order.Location;
|
||||||
import com.chint.domain.aggregates.user.User;
|
import com.chint.domain.aggregates.user.User;
|
||||||
|
@ -8,13 +10,22 @@ import com.chint.domain.repository.LocationRepository;
|
||||||
import com.chint.domain.repository.OrderDetailRepository;
|
import com.chint.domain.repository.OrderDetailRepository;
|
||||||
import com.chint.domain.repository.RouteRepository;
|
import com.chint.domain.repository.RouteRepository;
|
||||||
import com.chint.infrastructure.util.Digest;
|
import com.chint.infrastructure.util.Digest;
|
||||||
|
import com.chint.interfaces.rest.ly.LYSearchRequest;
|
||||||
|
import com.chint.interfaces.rest.ly.dto.hotelorderdatapushbach.*;
|
||||||
|
import com.chint.interfaces.rest.ly.dto.search.response.hotel.HotelDetailResponse;
|
||||||
import com.chint.interfaces.rest.user.UserHttpRequest;
|
import com.chint.interfaces.rest.user.UserHttpRequest;
|
||||||
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import com.google.gson.reflect.TypeToken;
|
||||||
|
import lombok.Data;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.codec.digest.DigestUtils;
|
import org.apache.commons.codec.digest.DigestUtils;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.boot.test.context.SpringBootTest;
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
|
|
||||||
|
import java.lang.reflect.Type;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
@ -33,6 +44,9 @@ class RouteApplicationTests {
|
||||||
@Autowired
|
@Autowired
|
||||||
private RouteRepository routeRepository;
|
private RouteRepository routeRepository;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private LYSearchRequest lySearchRequest;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private OrderDetailRepository orderDetailRepository;
|
private OrderDetailRepository orderDetailRepository;
|
||||||
|
|
||||||
|
@ -55,10 +69,79 @@ class RouteApplicationTests {
|
||||||
System.out.println(parse);
|
System.out.println(parse);
|
||||||
}
|
}
|
||||||
@Test
|
@Test
|
||||||
|
void test2(){
|
||||||
|
String a= "HO20240229085100068373";
|
||||||
|
HotelDetailResponse hotelOrderDetail = lySearchRequest.getHotelOrderDetail(a);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void test1(){
|
||||||
|
String a = "{\n" +
|
||||||
|
" \"orderInfo\": {\n" +
|
||||||
|
" \"orderType\": 0,\n" +
|
||||||
|
" \"orderSerialNo\": \"HO20240228142000572942\",\n" +
|
||||||
|
" \"outEnterpriseId\": \"\",\n" +
|
||||||
|
" \"protocolType\": 2,\n" +
|
||||||
|
" \"saveTotalPrice\": 0,\n" +
|
||||||
|
" \"totalStandardPrice\": 240,\n" +
|
||||||
|
" \"outEmployeeId\": \"230615020\",\n" +
|
||||||
|
" \"employeeId\": \"0544b18aff8c5855\",\n" +
|
||||||
|
" \"employeeCode\": \"\",\n" +
|
||||||
|
" \"changeOrderSerialNo\": null,\n" +
|
||||||
|
" \"isChangeOrder\": false,\n" +
|
||||||
|
" \"orderStatus\": 1,\n" +
|
||||||
|
" \"orderStatusDesc\": \"确认中\",\n" +
|
||||||
|
" \"createTime\": \"2024-02-28T14:21:00\",\n" +
|
||||||
|
" \"payType\": 1,\n" +
|
||||||
|
" \"paymentType\": 1,\n" +
|
||||||
|
" \"totalPrice\": 20,\n" +
|
||||||
|
" \"diffPrice\": 0,\n" +
|
||||||
|
" \"personalDiffPrice\": 0,\n" +
|
||||||
|
" \"companyDiffPrice\": 0,\n" +
|
||||||
|
" \"roomTotalPrice\": 5,\n" +
|
||||||
|
" \"servicePrice\": 15,\n" +
|
||||||
|
" \"afterSettlementServicePrice\": 0,\n" +
|
||||||
|
" \"contactName\": \"卢麟哲\",\n" +
|
||||||
|
" \"contactPhone\": \"18188539959\",\n" +
|
||||||
|
" \"contactEmail\": \"\",\n" +
|
||||||
|
" \"refundRule\": \"不可取消和修改\",\n" +
|
||||||
|
" \"refundIntro\": \"订单经确认后,若因预订人自身或其他非法定原因要求变更、取消或者、未按时入住的,或将扣除您全部或部分房费。\",\n" +
|
||||||
|
" \"servicePhone\": \"请致电400-822-5060咨询客服\",\n" +
|
||||||
|
" \"canRefund\": false,\n" +
|
||||||
|
" \"companyPrice\": 20,\n" +
|
||||||
|
" \"personalPrice\": 0,\n" +
|
||||||
|
" \"supplierOrderCreateTime\": \"0001-01-01T00:00:00\",\n" +
|
||||||
|
" \"ruleViolate\": false,\n" +
|
||||||
|
" \"ruleViolateDetail\": {\n" +
|
||||||
|
" \"items\": [],\n" +
|
||||||
|
" \"policyName\": \"STANDARD_LEVEL_FOUR\"\n" +
|
||||||
|
" },\n" +
|
||||||
|
" \"foulReason\": \"\",\n" +
|
||||||
|
" \"foulReasonCode\": \"\",\n" +
|
||||||
|
" \"foulReasonNote\": \"\",\n" +
|
||||||
|
" \"apiNotifyUrl\": null,\n" +
|
||||||
|
" \"cancelReasons\": \"\",\n" +
|
||||||
|
" \"customerOrderNo\": \"\",\n" +
|
||||||
|
" \"customerRefundOrderNo\": \"\",\n" +
|
||||||
|
" \"customerInvoiceCode\": 0,\n" +
|
||||||
|
" \"customerInvoiceDesc\": \"普票\",\n" +
|
||||||
|
" \"halfDayRoom\": 0,\n" +
|
||||||
|
" \"businessAmount\": 20\n" +
|
||||||
|
" }\n" +
|
||||||
|
"}";
|
||||||
|
|
||||||
|
JSONObject jsonObj = JSON.parseObject(a);
|
||||||
|
OrderInfo orderInfo = jsonObj.getJSONObject("orderInfo").toJavaObject(OrderInfo.class);
|
||||||
|
|
||||||
|
System.out.println(orderInfo);
|
||||||
|
|
||||||
|
System.out.println(orderInfo.getOrderSerialNo());
|
||||||
|
}
|
||||||
|
@Test
|
||||||
void loginSign() {
|
void loginSign() {
|
||||||
String sfno = "230615020";
|
String sfno = "230615020";
|
||||||
String syscode = "FSSC";
|
String syscode = "FSSC";
|
||||||
String billcode = "CLSQ240226000100";
|
String billcode = "CLSQ20240228";
|
||||||
String companycode = "正泰集团股份有限公司";
|
String companycode = "正泰集团股份有限公司";
|
||||||
String sec = "Superdandan";
|
String sec = "Superdandan";
|
||||||
String timespan = "1708908662738";
|
String timespan = "1708908662738";
|
||||||
|
|
Loading…
Reference in New Issue