fix:修复可能导出部分临时行程规划单遗漏的问题
This commit is contained in:
parent
7a8d98cd40
commit
3c3739f56c
|
@ -10,9 +10,16 @@ import lombok.EqualsAndHashCode;
|
|||
@Data
|
||||
public class OrderCreateCommand extends Command {
|
||||
private User user;
|
||||
private UserLoginParam userLoginParam;
|
||||
|
||||
public OrderCreateCommand of(User user) {
|
||||
this.user = user;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public OrderCreateCommand loginParam(UserLoginParam userLoginParam) {
|
||||
this.userLoginParam = userLoginParam;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -97,12 +97,14 @@ public class LoginController {
|
|||
//异步执行更新用户信息到同程
|
||||
User currentUser = BaseContext.getCurrentUser();
|
||||
|
||||
if (billcode != null) {
|
||||
if (billcode != null && !billcode.isEmpty()) {
|
||||
if (companycode == null) {
|
||||
throw new OrderException("companycode 不能为空");
|
||||
}
|
||||
//发送创建行程订单命令
|
||||
Command.of(OrderCreateCommand.class).of(currentUser).sendToQueue();
|
||||
Command.of(OrderCreateCommand.class).of(currentUser)
|
||||
.loginParam(userLoginParam)
|
||||
.sendToQueue();
|
||||
}
|
||||
loginEventBoarder(currentUser);
|
||||
return Result.Success(CommonMessageConstant.SUCCESS, userLoginResult);
|
||||
|
|
|
@ -114,7 +114,7 @@ public class OrderDomainService {
|
|||
@ListenTo(command = "OrderCreateCommand", order = 0)
|
||||
public RouteOrder createOrder(OrderCreateCommand command) {
|
||||
User user = command.getUser();
|
||||
UserLoginParam loginParam = user.getUserLoginParam();
|
||||
UserLoginParam loginParam = command.getUserLoginParam();
|
||||
// 从 Redis 查找
|
||||
RouteOrder tempOrder = routeRepository
|
||||
.findTempRouteOrderBySysCodeAndBillCode(loginParam.getSyscode(), loginParam.getBillcode());
|
||||
|
|
Loading…
Reference in New Issue