Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
3dca884467
|
@ -5,14 +5,21 @@ import lombok.Data;
|
|||
|
||||
@Data
|
||||
public class UserDTO {
|
||||
private String accountId;
|
||||
private String mobile;
|
||||
private String userName;
|
||||
private String uid;
|
||||
private String email;
|
||||
|
||||
private UserData attributes;
|
||||
private String id;
|
||||
// 构造函数和其他方法(getter 和 setter)可以根据需要添加
|
||||
|
||||
// Getter 和 Setter 方法
|
||||
|
||||
@Data
|
||||
public static class UserData{
|
||||
private String user_name;
|
||||
private String mobile;
|
||||
private String account_no;
|
||||
private long token_gtime;
|
||||
private String token_expired;
|
||||
private String email;
|
||||
private String user_uid;
|
||||
}
|
||||
}
|
|
@ -2,6 +2,7 @@ package com.chint.application.out;
|
|||
|
||||
|
||||
import com.chint.application.commands.OrderCreateCommand;
|
||||
import com.chint.application.services.login.strategy.PailaLoginStrategy;
|
||||
import com.chint.domain.aggregates.user.User;
|
||||
import com.chint.domain.exceptions.OrderException;
|
||||
import com.chint.domain.service.SystemDomainService;
|
||||
|
@ -16,6 +17,7 @@ import com.chint.infrastructure.util.Digest;
|
|||
import com.chint.infrastructure.util.Result;
|
||||
import com.chint.interfaces.rest.ctrip.CTripUserSaveRequest;
|
||||
import com.chint.interfaces.rest.ly.LYUserRequest;
|
||||
import com.chint.interfaces.rest.ly.dto.login.LoginParam;
|
||||
import com.chint.interfaces.rest.user.UserHttpRequest;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -43,6 +45,9 @@ public class LoginController {
|
|||
@Autowired
|
||||
private SystemDomainService systemDomainService;
|
||||
|
||||
@Autowired
|
||||
private PailaLoginStrategy pailaLoginStrategy;
|
||||
|
||||
@ApiOperation("财务共享登录")
|
||||
@Transactional
|
||||
@GetMapping("/login")
|
||||
|
@ -98,9 +103,11 @@ public class LoginController {
|
|||
@ApiOperation("商旅平台单点")
|
||||
@Transactional
|
||||
@PostMapping("/login/sso")
|
||||
public Result<UserLoginResult> loginSSO(){
|
||||
UserLoginParam userLoginParam = new UserLoginParam();
|
||||
userLoginParam.setSfno("170717012");
|
||||
public Result<UserLoginResult> loginSSO(@RequestBody UserLoginParam userLoginParam){
|
||||
|
||||
String employeeNo = pailaLoginStrategy.login(userLoginParam.getCode());
|
||||
|
||||
userLoginParam.setSfno(employeeNo);
|
||||
UserLoginResult userLoginResult = authenticateService
|
||||
.authenticateEmployeeNo(userLoginParam);
|
||||
|
||||
|
|
|
@ -141,7 +141,7 @@ public class CTripEstimatePrice implements EstimatePrice {
|
|||
HotelPriceData hotelPriceData = new HotelPriceData();
|
||||
if (!travelStandards.isEmpty()) {
|
||||
String price = travelStandards.get(0).getPrice();
|
||||
String arriveData = priceQueryData.getArriveData();
|
||||
String arriveData = priceQueryData.getArriveDate();
|
||||
String departDate = priceQueryData.getDepartDate();
|
||||
if (arriveData != null) {
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||
|
|
|
@ -15,7 +15,7 @@ public class LocalLoginStrategy implements LoginStrategy {
|
|||
}
|
||||
|
||||
@Override
|
||||
public User getUserInfo(String accessToken) {
|
||||
public String getUserInfo(String accessToken) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,14 +20,14 @@ import java.util.regex.Pattern;
|
|||
public interface LoginStrategy {
|
||||
Logger log = LoggerFactory.getLogger("UserService");
|
||||
|
||||
default User login(String code) {
|
||||
default String login(String code) {
|
||||
Optional<String> accessToken = getAccessToken(code);
|
||||
return getUserInfo(accessToken.orElseThrow(()-> new AuthException("Failed to obtain access token")));
|
||||
}
|
||||
|
||||
Optional<String> getAccessToken(String code);
|
||||
|
||||
User getUserInfo(String accessToken);
|
||||
String getUserInfo(String accessToken);
|
||||
|
||||
static Optional<String> getAccessTokenMethod(HttpRequestBase request, String tokenName) {
|
||||
String responseBody = null;
|
||||
|
|
|
@ -3,8 +3,7 @@ package com.chint.application.services.login.strategy;
|
|||
import com.alibaba.fastjson.JSON;
|
||||
import com.chint.application.dtos.UserDTO;
|
||||
import com.chint.application.services.login.LoginStrategy;
|
||||
import com.chint.domain.aggregates.user.User;
|
||||
import com.chint.domain.exceptions.AuthException;
|
||||
import com.chint.domain.exceptions.NotFoundException;
|
||||
import com.chint.domain.factoriy.user.UserFactory;
|
||||
import com.chint.domain.repository.UserRepository;
|
||||
import com.chint.interfaces.rest.user.UserHttpRequest;
|
||||
|
@ -13,6 +12,7 @@ import org.apache.http.HttpResponse;
|
|||
import org.apache.http.NameValuePair;
|
||||
import org.apache.http.client.HttpClient;
|
||||
import org.apache.http.client.methods.HttpGet;
|
||||
import org.apache.http.client.methods.HttpPost;
|
||||
import org.apache.http.client.utils.URIBuilder;
|
||||
import org.apache.http.impl.client.HttpClients;
|
||||
import org.apache.http.message.BasicNameValuePair;
|
||||
|
@ -60,25 +60,27 @@ public class PailaLoginStrategy implements LoginStrategy {
|
|||
|
||||
log.info("开始执行登录");
|
||||
List<NameValuePair> parameters = Arrays.asList(
|
||||
new BasicNameValuePair("grant_type", "authorization_code"),
|
||||
new BasicNameValuePair("client_id", clientId),
|
||||
new BasicNameValuePair("client_secret", clientSecret),
|
||||
new BasicNameValuePair("redirect_uri", redirectUri),
|
||||
new BasicNameValuePair("code", code)
|
||||
new BasicNameValuePair("code", code),
|
||||
new BasicNameValuePair("redirect_uri", redirectUri)
|
||||
|
||||
);
|
||||
|
||||
HttpGet getMethod = getRequest("/profile/oauth2/accessToken", parameters);
|
||||
HttpPost getMethod = postRequest("/esc-sso/oauth2.0/accessToken", parameters);
|
||||
return LoginStrategy.getAccessTokenMethod(getMethod, "access_token");
|
||||
}
|
||||
|
||||
@Override
|
||||
public User getUserInfo(String accessToken) {
|
||||
public String getUserInfo(String accessToken) {
|
||||
|
||||
|
||||
List<NameValuePair> userInfoParams = Collections.singletonList(
|
||||
new BasicNameValuePair("access_token", accessToken)
|
||||
);
|
||||
|
||||
HttpGet getMethodUserInfo = getRequest("/profile/oauth2/profile", userInfoParams);
|
||||
HttpGet getMethodUserInfo = getRequest("/esc-sso/oauth2.0/profile", userInfoParams);
|
||||
|
||||
String userInfoResBody = null;
|
||||
HttpClient client = HttpClients.createDefault();
|
||||
|
@ -89,18 +91,10 @@ public class PailaLoginStrategy implements LoginStrategy {
|
|||
log.error(e.getMessage());
|
||||
}
|
||||
UserDTO userDTO = JSON.parseObject(userInfoResBody, UserDTO.class);
|
||||
User user;
|
||||
if (userDTO != null) {
|
||||
user = userRepository.findByUserEmployeeNo(userDTO.getUid());
|
||||
if (user == null) {
|
||||
user = userFactory.create(userDTO.getUid());
|
||||
userHttpRequest.loadUserInfo(user);
|
||||
userRepository.save(user);
|
||||
if (userDTO == null) {
|
||||
throw new NotFoundException(NOT_FOUND);
|
||||
}
|
||||
} else {
|
||||
throw new AuthException(NOT_FOUND);
|
||||
}
|
||||
return user;
|
||||
return userDTO.getAttributes().getAccount_no();
|
||||
}
|
||||
|
||||
private HttpGet getRequest(String path, List<NameValuePair> parameters) {
|
||||
|
@ -115,4 +109,17 @@ public class PailaLoginStrategy implements LoginStrategy {
|
|||
request.setHeader("Content-Type", "application/json");
|
||||
return request;
|
||||
}
|
||||
|
||||
private HttpPost postRequest(String path, List<NameValuePair> parameters) {
|
||||
String userInfoUrl = null;
|
||||
try {
|
||||
userInfoUrl = new URIBuilder(baseUrl).setPath(path)
|
||||
.setParameters(parameters).build().toString();
|
||||
} catch (URISyntaxException e) {
|
||||
log.error(e.getMessage());
|
||||
}
|
||||
HttpPost request = new HttpPost(userInfoUrl);
|
||||
request.setHeader("Content-Type", "application/json");
|
||||
return request;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,8 @@ import com.chint.domain.aggregates.user.User;
|
|||
import com.chint.domain.repository.UserRepository;
|
||||
import com.chint.domain.value_object.*;
|
||||
import com.chint.interfaces.rest.ly.dto.hotelorderdatapushbach.Resident;
|
||||
import com.chint.interfaces.rest.ly.dto.search.response.car.CarDetailResponse;
|
||||
import com.chint.interfaces.rest.ly.dto.search.response.filght.FlightListResponse;
|
||||
import com.chint.interfaces.rest.ly.dto.search.response.hotel.HotelDetailResponse;
|
||||
import com.chint.interfaces.rest.ly.dto.search.response.train.TrainDetailResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -23,7 +25,9 @@ public class LYOrderExtensionFactoryImpl implements OrderExtensionFactory {
|
|||
|
||||
@Override
|
||||
public CarOrderDetail createCarOrderDetail(Object carOrderDetailData) {
|
||||
return null;
|
||||
CarDetailResponse carDetailResponse = (CarDetailResponse) carOrderDetailData;
|
||||
CarOrderDetail carOrderDetail = convertCart(carDetailResponse);
|
||||
return carOrderDetail;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -115,6 +119,132 @@ public class LYOrderExtensionFactoryImpl implements OrderExtensionFactory {
|
|||
return null;
|
||||
}
|
||||
|
||||
private CarOrderDetail convertCart(CarDetailResponse carDetailResponse) {
|
||||
CarOrderDetail carOrderDetail = new CarOrderDetail();
|
||||
CarDetailResponse.Data data = carDetailResponse.getData();
|
||||
|
||||
// 设置对象的全部属性
|
||||
carOrderDetail.setOrderNo(data.getOrderSerialNo());
|
||||
// carOrderDetail.setOverStandard(); //无
|
||||
// carOrderDetail.setParentOrderNo(parentOrderNo); //无
|
||||
// carOrderDetail.setOriginalOrderNo(originalOrderNo); //无
|
||||
carOrderDetail.setOrderStatus(data.getOrderStatus());
|
||||
// carOrderDetail.setAccountCompanyId(accountCompanyId); //无
|
||||
// carOrderDetail.setAccountCompanyName(accountCompanyName); //无
|
||||
carOrderDetail.setReceiptsNum(data.getTravelData().getTravelApplyNo());
|
||||
// carOrderDetail.setScheduleNum(scheduleNum); //无
|
||||
carOrderDetail.setBookingUserCode(data.getOutEmployeeId());
|
||||
// carOrderDetail.setBookingName(bookingName); //无
|
||||
// carOrderDetail.setBookingUserPhone(bookingUserPhone);//无
|
||||
carOrderDetail.setCreateTime(data.getOrder().getCreateTime());
|
||||
carOrderDetail.setStartTime(data.getOrderExtend().getChargeTime());
|
||||
carOrderDetail.setArriveTime(data.getOrderExtend().getFinishTime());
|
||||
carOrderDetail.setFromStationName(data.getOrderExtend().getStartAddress());
|
||||
carOrderDetail.setToStationName(data.getOrderExtend().getEndAddress());
|
||||
carOrderDetail.setCarModel(data.getOrderExtend().getCarType());
|
||||
carOrderDetail.setFromCity(data.getOrderExtend().getStartCityName());
|
||||
carOrderDetail.setToCity(data.getOrderExtend().getEndCityName());
|
||||
carOrderDetail.setRunTime(data.getOrderExtend().getDuration());
|
||||
carOrderDetail.setMileage(data.getOrderExtend().getMileage());
|
||||
carOrderDetail.setOrderAmount(String.valueOf(data.getTotalAmount()));
|
||||
// carOrderDetail.setCancellationFee(cancellationFee); //无
|
||||
// carOrderDetail.setStandardItems(standardItems); //无
|
||||
carOrderDetail.setUserName(data.getOrder().getContactName());
|
||||
carOrderDetail.setUserCode(data.getOrder().getOutEmployeeId());
|
||||
carOrderDetail.setPhone(data.getOrder().getContactPhone());
|
||||
// carOrderDetail.setSupplier(supplier); //无
|
||||
carOrderDetail.setPersonalPaymentAmount(String.valueOf(data.getPersonalPrice()));
|
||||
carOrderDetail.setCompanyPaymentAmount(String.valueOf(data.getCompanyPrice()));
|
||||
// carOrderDetail.setOverStandardReason(overStandardReason); contactName
|
||||
// carOrderDetail.setBOOK_ORG_STRUCT_1(BOOK_ORG_STRUCT_1); //无
|
||||
// carOrderDetail.setBOOK_ORG_STRUCT_2(BOOK_ORG_STRUCT_2); //无
|
||||
// carOrderDetail.setBOOK_ORG_STRUCT_3(BOOK_ORG_STRUCT_3); //无
|
||||
// carOrderDetail.setPaymentType(String.valueOf(data.getPaymentType())); //无
|
||||
// carOrderDetail.setProjectOrderNo(projectOrderNo); //无
|
||||
// carOrderDetail.setCostCenter(costCenter); //无
|
||||
// carOrderDetail.setTollFee(tollFee); //无
|
||||
|
||||
return carOrderDetail;
|
||||
}
|
||||
|
||||
private FlightOrderDetail convertFlight(FlightListResponse flightListResponse) {
|
||||
FlightOrderDetail flightOrderDetail = new FlightOrderDetail();
|
||||
FlightListResponse.FlightOrder data = flightListResponse.getData();
|
||||
|
||||
|
||||
// flightOrderDetail.setId(id);
|
||||
flightOrderDetail.setOrderNo(data.getOriginalOrderNo());
|
||||
flightOrderDetail.setOverStandard(String.valueOf(data.getRuleViolate()));
|
||||
flightOrderDetail.setParentOrderNo(data.getParentRefOrderNo());
|
||||
flightOrderDetail.setOriginalOrderNo(data.getOriginalOrderNo());
|
||||
flightOrderDetail.setOrderStatus(String.valueOf(data.getOrderStatus()));
|
||||
|
||||
// flightOrderDetail.setAccountCompanyId(accountCompanyId);//核算企业id
|
||||
// flightOrderDetail.setAccountCompanyName(accountCompanyName);//核算企业名称
|
||||
|
||||
flightOrderDetail.setReceiptsNum(data.getTravelData().getTravelApplyNo());
|
||||
flightOrderDetail.setScheduleNum(data.getTravelOrderNo());
|
||||
flightOrderDetail.setChangedScheduleNum(data.getOriginalOrderNo());
|
||||
flightOrderDetail.setBookingUserCode(data.getOutEmployeeId());
|
||||
flightOrderDetail.setBookingName(data.getEmployeeName());
|
||||
|
||||
// flightOrderDetail.setBookingUserPhone(data.get); //预订人电话
|
||||
|
||||
flightOrderDetail.setCreateTime(data.getBookDate());
|
||||
|
||||
// flightOrderDetail.setStartTime(data.getDepar);
|
||||
|
||||
/* flightOrderDetail.setArriveTime(arriveTime);
|
||||
flightOrderDetail.setStartCityName(startCityName);
|
||||
flightOrderDetail.setStartCityCode(startCityCode);
|
||||
flightOrderDetail.setStartAirportName(startAirportName);
|
||||
flightOrderDetail.setStartAirportCode(startAirportCode);
|
||||
flightOrderDetail.setStartTerminal(startTerminal);
|
||||
flightOrderDetail.setEndCityName(endCityName);
|
||||
flightOrderDetail.setEndCityCode(endCityCode);
|
||||
flightOrderDetail.setEndAirportName(endAirportName);
|
||||
flightOrderDetail.setEndAirportCode(endAirportCode);
|
||||
flightOrderDetail.setEndTerminal(endTerminal);
|
||||
flightOrderDetail.setDistance(distance);
|
||||
flightOrderDetail.setFlightCompName(flightCompName);
|
||||
flightOrderDetail.setFlightNum(flightNum);
|
||||
flightOrderDetail.setSeatPoint(seatPoint);
|
||||
flightOrderDetail.setSeatPointName(seatPointName);*/
|
||||
flightOrderDetail.setOrderAmount(String.valueOf(data.getTotalPrice()));
|
||||
flightOrderDetail.setPreServiceFee(String.valueOf(data.getServicePrice()));
|
||||
// flightOrderDetail.setPostServiceFee(data.getA);
|
||||
// flightOrderDetail.setRefundAmount(data.getFlightOrderRefundInfo());
|
||||
// flightOrderDetail.setTickets(tickets);
|
||||
/* flightOrderDetail.setFuelTax(data.getFuel);
|
||||
flightOrderDetail.setAirportTax(airportTax);
|
||||
flightOrderDetail.setFacePrice(facePrice);
|
||||
flightOrderDetail.setChangeFee(changeFee);
|
||||
flightOrderDetail.setRefundFee(refundFee);
|
||||
flightOrderDetail.setUpFee(upFee);
|
||||
flightOrderDetail.setStandard(standard);
|
||||
flightOrderDetail.setTicketNo(ticketNo);
|
||||
flightOrderDetail.setChangedTicketNo(changedTicketNo);
|
||||
flightOrderDetail.setUserName(data.getParr);
|
||||
flightOrderDetail.setUserCode(data.getOutEmployeeId());
|
||||
flightOrderDetail.setIsOverStandard(isOverStandard);
|
||||
flightOrderDetail.setPhone(phone);
|
||||
flightOrderDetail.setPaymentType(paymentType);
|
||||
flightOrderDetail.setNotBookedLowestPriceReason(notBookedLowestPriceReason);
|
||||
flightOrderDetail.setSupplier(supplier);
|
||||
flightOrderDetail.setPersonalPaymentAmount(personalPaymentAmount);
|
||||
flightOrderDetail.setCompanyPaymentAmount(companyPaymentAmount);
|
||||
flightOrderDetail.setOverStandardReason(overStandardReason);
|
||||
flightOrderDetail.setBOOK_ORG_STRUCT_1(BOOK_ORG_STRUCT_1);
|
||||
flightOrderDetail.setBOOK_ORG_STRUCT_2(BOOK_ORG_STRUCT_2);
|
||||
flightOrderDetail.setBOOK_ORG_STRUCT_3(BOOK_ORG_STRUCT_3);
|
||||
flightOrderDetail.setInsuranceFee(insuranceFee);
|
||||
flightOrderDetail.setProjectOrderNo(projectOrderNo);
|
||||
flightOrderDetail.setCostCenter(costCenter);
|
||||
*/
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
private HotelOrderDetail convertHotel(HotelDetailResponse hotelDetailResponse) {
|
||||
HotelOrderDetail hotelOrderDetail = new HotelOrderDetail();
|
||||
HotelDetailResponse.Data data = hotelDetailResponse.getData();
|
||||
|
|
|
@ -74,7 +74,7 @@ public class CTripEstimate implements AmountEstimate {
|
|||
priceQueryData.setArriveCity(leg.getDestinationLocation().getLocationName());
|
||||
priceQueryData.setDepartCity(leg.getOriginLocation().getLocationName());
|
||||
priceQueryData.setDepartDate(dateTimeFormatter.format(leg.getStartTime()));
|
||||
priceQueryData.setArriveData(dateTimeFormatter.format(leg.getEndTime()));
|
||||
priceQueryData.setArriveDate(dateTimeFormatter.format(leg.getEndTime()));
|
||||
return priceQueryData;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,10 +36,10 @@ public class LYOrderDataAdapter implements OrderDataAdapter {
|
|||
return Optional.of(
|
||||
OrderLegData.builder()
|
||||
.productType(LEG_TYPE_TRAIN)
|
||||
.outOrderNo(data.getOrderNo())
|
||||
.outOrderNo(data.getOutOrderNo())
|
||||
.price(String.valueOf(data.getTotalAmount()))
|
||||
.actualOrderNo(data.getOutOrderNo())
|
||||
.trainOrderDetailData(data)
|
||||
.trainOrderDetailData(trainDetailResponse)
|
||||
.supplierName(SUPPLIER_L_Y)
|
||||
.build()
|
||||
);
|
||||
|
@ -53,7 +53,7 @@ public class LYOrderDataAdapter implements OrderDataAdapter {
|
|||
.outOrderNo(data.getOrderInfo().getOrderSerialNo())
|
||||
.price(String.valueOf(data.getOrderInfo().getTotalPrice()))
|
||||
.actualOrderNo(data.getOrderInfo().getOrderSerialNo())
|
||||
.hotelOrderDetailData(data)
|
||||
.hotelOrderDetailData(hotelDetailResponse)
|
||||
.supplierName(SUPPLIER_L_Y)
|
||||
.build()
|
||||
);
|
||||
|
@ -64,10 +64,10 @@ public class LYOrderDataAdapter implements OrderDataAdapter {
|
|||
return Optional.of(
|
||||
OrderLegData.builder()
|
||||
.productType(LEG_TYPE_TAXI)
|
||||
.outOrderNo(data.getOrderNo())
|
||||
.outOrderNo(data.getOrderSerialNo())
|
||||
.price(String.valueOf(data.getTotalAmount()))
|
||||
.actualOrderNo(data.getOutOrderNo())
|
||||
.carOrderDetailData(data)
|
||||
.carOrderDetailData(carDetailResponse)
|
||||
.supplierName(SUPPLIER_L_Y)
|
||||
.build()
|
||||
);
|
||||
|
@ -82,7 +82,7 @@ public class LYOrderDataAdapter implements OrderDataAdapter {
|
|||
// .orderNo(data.get())
|
||||
// .price(String.valueOf( data.getTotalAmount()))
|
||||
// .actualOrderNo(data.getOutOrderNo())
|
||||
.flightOrderDetailData(data)
|
||||
.flightOrderDetailData(flightOrderDetail)
|
||||
.supplierName(SUPPLIER_L_Y)
|
||||
.build()
|
||||
);
|
||||
|
|
|
@ -7,5 +7,5 @@ public class PriceQueryData {
|
|||
private String departCity;
|
||||
private String arriveCity;
|
||||
private String departDate;
|
||||
private String arriveData;
|
||||
private String arriveDate;
|
||||
}
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
package com.chint.interfaces.rest.ly.dto.search.response.car;
|
||||
|
||||
import com.chint.interfaces.rest.ly.dto.LYBaseResponse;
|
||||
import com.chint.interfaces.rest.ly.dto.carorderdatapushback.PriceDetail;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
|
@ -14,7 +16,7 @@ public class CarDetailResponse extends LYBaseResponse {
|
|||
public static class Data {
|
||||
private String outEmployeeId;
|
||||
private String employeeCode;
|
||||
private String orderNo;
|
||||
private String orderSerialNo;
|
||||
private String parentOrderSerialNo;
|
||||
private int isChangedOrder;
|
||||
private String outOrderNo;
|
||||
|
@ -46,6 +48,8 @@ public class CarDetailResponse extends LYBaseResponse {
|
|||
private GarbInfo garbInfo;
|
||||
private double totalAmount;
|
||||
private TravelData travelData;
|
||||
private Order order;
|
||||
private OrderExtend orderExtend;
|
||||
private int bookingMethod;
|
||||
private int paymentType;
|
||||
private double personalPrice;
|
||||
|
@ -57,6 +61,39 @@ public class CarDetailResponse extends LYBaseResponse {
|
|||
private String relationOrderNo;
|
||||
}
|
||||
|
||||
|
||||
@lombok.Data
|
||||
public static class OrderExtend {
|
||||
private Integer serviceType;
|
||||
private String serviceTypeDesc;
|
||||
private String departureTime;
|
||||
private String startCityName;
|
||||
private String endCityName;
|
||||
private String carType;
|
||||
private String carTypeName;
|
||||
private String startAddress;
|
||||
private double startLatitude;
|
||||
private double startLongitude;
|
||||
private String endAddress;
|
||||
private double endLatitude;
|
||||
private double endLongitude;
|
||||
private Integer passengerCount;
|
||||
private String chargeTime;
|
||||
private String finishTime;
|
||||
private String duration;
|
||||
private String mileage;
|
||||
private String flightNo;
|
||||
private String departAirportCode;
|
||||
private String arriveAirportCode;
|
||||
private String departAirportName;
|
||||
private String arriveAirportName;
|
||||
private String flightDate;
|
||||
private String flightArriveTime;
|
||||
private String departTerminal;
|
||||
private String arriveTerminal;
|
||||
private String serviceName;
|
||||
}
|
||||
|
||||
@lombok.Data
|
||||
public static class Item {
|
||||
private int itemId;
|
||||
|
@ -139,6 +176,28 @@ public class CarDetailResponse extends LYBaseResponse {
|
|||
private double companyPrice;
|
||||
}
|
||||
|
||||
@lombok.Data
|
||||
public static class Order {
|
||||
private String orderSerialNo;
|
||||
private String productName;
|
||||
private String policyRuleName;
|
||||
private Integer orderStatus;
|
||||
private String orderStatusDesc;
|
||||
private BigDecimal totalPrice;
|
||||
private String createTime;
|
||||
private BigDecimal servicePrice;
|
||||
private String contactName;
|
||||
private String contactPhone;
|
||||
private boolean isEstimate;
|
||||
private List<PriceDetail> priceDetailList;
|
||||
private String outEmployeeId;
|
||||
private String outEnterpriseId;
|
||||
private BigDecimal diffPrice;
|
||||
private Integer carPurposeId;
|
||||
private String subjectMatter;
|
||||
private String subjectRemark;
|
||||
}
|
||||
|
||||
@lombok.Data
|
||||
public static class ContactInfo {
|
||||
private String personName;
|
||||
|
|
|
@ -1,29 +1,69 @@
|
|||
package com.chint.interfaces.rest.ly.dto.search.response.filght;
|
||||
|
||||
import com.chint.interfaces.rest.ly.dto.LYBaseResponse;
|
||||
import com.chint.interfaces.rest.ly.dto.flydatapushback.*;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class FlightListResponse extends LYBaseResponse {
|
||||
private List<FlightOrder> data;
|
||||
@Data
|
||||
private static class FlightOrder {
|
||||
private String orderSerialNo; // 机票订单号
|
||||
private String originalOrderNo; // 原订单号(祖先单)
|
||||
private String parentOrderSerialNo; // 父订单号
|
||||
private Integer orderType; // 订单类型 0.国际 1.国内
|
||||
private String travelApplyNo; // 外部出差申请单号
|
||||
private Integer travelType; // 差旅类型 1.因公 2.因私
|
||||
private Integer payType; // 支付方式 1.公司授信 2.个人支付 3.组合支付
|
||||
private String outEmployeeId; // 外部员工ID
|
||||
private Double totalPrice; // 订单总价
|
||||
private Integer orderStatus; // 订单状态
|
||||
private String orderStatusText; // 订单状态文案
|
||||
private Boolean isChangeOrder; // 是否改签单
|
||||
private Boolean isRefundOrder; // 是否退票单
|
||||
private String bookDate; // 预订时间
|
||||
}
|
||||
private FlightOrder data;
|
||||
|
||||
@lombok.Data
|
||||
public static class FlightOrder {
|
||||
private String orderSerialNo;
|
||||
private String refOrderNo;
|
||||
private String parentRefOrderNo;
|
||||
private String originalOrderNo;
|
||||
private String parentOrderSerialNo;
|
||||
private String outEmployeeId;
|
||||
private String outEnterpriseId;
|
||||
private String relationId;
|
||||
private Integer orderStatus;
|
||||
private String orderStatusText;
|
||||
private String ticketOutLimitTime;
|
||||
private Integer payStatus;
|
||||
private List<Contact> contact;
|
||||
private double totalPrice;
|
||||
private double servicePrice;
|
||||
private String pnr;
|
||||
private String fullPnrNo;
|
||||
private String memberId;
|
||||
private String reason;
|
||||
private Integer travelType;
|
||||
private String travelOrderNo;
|
||||
private Integer orderType;
|
||||
private Integer voyageType;
|
||||
private String ticketTime;
|
||||
private Integer payType;
|
||||
private String bookDate;
|
||||
private String payTime;
|
||||
private Boolean isChangeOrder;
|
||||
private Boolean isRefundOrder;
|
||||
private Object flightOrderRefundInfo;
|
||||
private Object protrotolId;
|
||||
private Object changeInfo;
|
||||
private String apiNotifyUrl;
|
||||
private Integer platId;
|
||||
private Integer refId;
|
||||
private Boolean ruleViolate;
|
||||
private RuleViolateDetail ruleViolateDetail;
|
||||
private TravelData travelData;
|
||||
private List<Passenger> passengerList;
|
||||
private List<FlightSegment> flightSegmentList;
|
||||
private String foulReason;
|
||||
private String foulReasonCode;
|
||||
private String foulReasonNote;
|
||||
private BigDecimal flightMinimumPrice;
|
||||
private String remarks1;
|
||||
private String employeeName;
|
||||
private String updateDate;
|
||||
private Integer isNeedTransfer;
|
||||
private boolean gpAgreement;
|
||||
private boolean priceChanged;
|
||||
private Integer priceChangeType;
|
||||
private boolean issueType;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ public class CarBackController {
|
|||
if (orderSerialNo != null) {
|
||||
CarDetailResponse carDetailResponse = lySearchRequest.getCarDetailResponse(orderSerialNo);
|
||||
String outEmployeeId = carDetailResponse.getData().getOutEmployeeId(); //外部员工id
|
||||
String serialNo = carDetailResponse.getData().getOrderNo();//订单号
|
||||
String serialNo = carDetailResponse.getData().getOrderSerialNo();//订单号
|
||||
SupplierCallbackData supplierCallbackData =
|
||||
SupplierCallbackData.of(SupplierNameConstant.SUPPLIER_L_Y, outEmployeeId);
|
||||
supplierCallbackData.data(carDetailResponse);
|
||||
|
|
|
@ -10,7 +10,7 @@ chint:
|
|||
database: itinerary_booking
|
||||
username: tripbook
|
||||
password: W@Xgf25d&lRk*L0X#
|
||||
url: https://gxdev03.chint.com/businesstravel/
|
||||
url: https://gxdev03.chint.com/businesstravelhome/
|
||||
logging:
|
||||
level:
|
||||
org.springframework.jdbc.core.JdbcTemplate: DEBUG
|
||||
|
@ -56,8 +56,8 @@ FSSC:
|
|||
paila:
|
||||
client-id: 0053df85723db94491e8
|
||||
client-secret: 7368bcec4c0f004c40585f6ed1087d887897
|
||||
redirect-url: https://gxdev03.chint.com/businesstravel/
|
||||
base-url: http://signin-test.chint.com
|
||||
redirect-url: https://gxdev03.chint.com/businesstravelhome/#/
|
||||
base-url: https://signin-test.chint.com
|
||||
token-name: token
|
||||
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ chint:
|
|||
database: itinerary_booking
|
||||
username: root
|
||||
password: 123456
|
||||
url: https://gxdev03.chint.com/businesstravel/
|
||||
url: https://gxdev03.chint.com/businesstravelhome/
|
||||
|
||||
cTrip:
|
||||
baseUrl: https://ct.ctrip.com
|
||||
|
@ -26,6 +26,6 @@ FSSC:
|
|||
paila:
|
||||
client-id: 0053df85723db94491e8
|
||||
client-secret: 7368bcec4c0f004c40585f6ed1087d887897
|
||||
redirect-url: https://gxdev03.chint.com/businesstravel/
|
||||
base-url: http://signin-test.chint.com
|
||||
redirect-url: https://gxdev03.chint.com/businesstravelhome/#/
|
||||
base-url: https://signin-test.chint.com
|
||||
token-name: token
|
||||
|
|
|
@ -21,7 +21,7 @@ chint:
|
|||
database: itinerary_booking
|
||||
username: tripbook
|
||||
password: W@Xgf25d&lRk*L0X#
|
||||
url: https://gxdev03.chint.com/businesstravel/
|
||||
url: https://gxdev03.chint.com/businesstravelhome/
|
||||
|
||||
logging:
|
||||
level:
|
||||
|
@ -45,8 +45,8 @@ FSSC:
|
|||
paila:
|
||||
client-id: 0053df85723db94491e8
|
||||
client-secret: 7368bcec4c0f004c40585f6ed1087d887897
|
||||
redirect-url: https://gxdev03.chint.com/businesstravel/
|
||||
base-url: http://signin-test.chint.com
|
||||
redirect-url: https://gxdev03.chint.com/businesstravelhome/#/
|
||||
base-url: https://signin-test.chint.com
|
||||
token-name: token
|
||||
|
||||
bpm:
|
||||
|
|
|
@ -121,7 +121,7 @@ class RouteApplicationTests {
|
|||
|
||||
// @Test
|
||||
void ssoLogin(){
|
||||
User login = pailaLoginStrategy.login("OC-5909-zRqrWjZGNThNXJiAV1kA7dPXTojGzVxK3nE");
|
||||
String login = pailaLoginStrategy.login("OC-5909-zRqrWjZGNThNXJiAV1kA7dPXTojGzVxK3nE");
|
||||
System.out.println(login);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue