修复创建订单导致当前申请人和订单差标可能不一致的问题

This commit is contained in:
lulz1 2024-03-15 20:06:54 +08:00
parent d2e8ba5558
commit 0496960b8f
5 changed files with 14 additions and 6 deletions

View File

@ -23,7 +23,7 @@ public class RouteOrderPageRes {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private LocalDateTime bookingTime;
private Long userId;
private String userId;
private String userName;
//审批订单号
@Embedded.Nullable

View File

@ -29,7 +29,7 @@ public class RouteOrderRes {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private LocalDateTime bookingTime;
private Long userId;
private String userId;
@ApiModelProperty("用户名称")
private String userName;
//审批订单号

View File

@ -92,16 +92,18 @@ public class LoginController {
UserLoginResult userLoginResult = authenticateService
.authenticateEmployeeNo(userLoginParam);
//异步执行更新用户信息到同程
User currentUser = userLoginResult.getUser();
if (billcode != null) {
if (companycode == null) {
throw new OrderException("companycode 不能为空");
}
//发送创建行程订单命令
Command.of(OrderCreateCommand.class).of(BaseContext.getCurrentUser()).sendToQueue();
Command.of(OrderCreateCommand.class).of(currentUser).sendToQueue();
}
//异步执行更新用户信息到同程
User currentUser = userLoginResult.getUser();
syncUserInfoToSupplier(currentUser);
//清除职级信息

View File

@ -519,4 +519,9 @@ public class OrderDomainService {
}
}
}
private void lyTrainRefundGenerate(String orderNo){
// lySearchRequest.getTrainOrderDetail()
}
}

View File

@ -56,8 +56,8 @@ public class AuthenticateServiceImpl implements AuthenticateService {
if (user != null) {
// 部分数据需要通过查询外部的http来获取
user.setUserLoginParam(userLoginParam);
BaseContext.setCurrentUser(user);
return getUserLoginResult(user);
} else {
User newUser = userFactory.create(userLoginParam.getSfno());
//如果数据库不存在该用户需要通过sf信息进行查询并保存到数据库
@ -65,6 +65,7 @@ public class AuthenticateServiceImpl implements AuthenticateService {
httpRequest.loadUserInfo(newUser);
userRepository.save(newUser);
newUser.setUserLoginParam(userLoginParam);
BaseContext.setCurrentUser(newUser);
return getUserLoginResult(newUser);
}
}