fix:用户登录的同步信息到商旅平台改为异步执行
This commit is contained in:
parent
a8516640ec
commit
fdb5e390a9
|
@ -22,8 +22,8 @@ import com.chint.infrastructure.util.BaseContext;
|
||||||
import com.chint.infrastructure.util.Digest;
|
import com.chint.infrastructure.util.Digest;
|
||||||
import com.chint.infrastructure.util.Result;
|
import com.chint.infrastructure.util.Result;
|
||||||
import com.chint.interfaces.rest.ctrip.CTripUserSaveRequest;
|
import com.chint.interfaces.rest.ctrip.CTripUserSaveRequest;
|
||||||
import com.chint.interfaces.rest.ly.LYUserRequest;
|
|
||||||
import com.chint.interfaces.rest.data_center.user.UserHttpRequest;
|
import com.chint.interfaces.rest.data_center.user.UserHttpRequest;
|
||||||
|
import com.chint.interfaces.rest.ly.LYUserRequest;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -31,6 +31,7 @@ import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.concurrent.CompletableFuture;
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@RestController
|
@RestController
|
||||||
|
@ -159,8 +160,10 @@ public class LoginController {
|
||||||
|
|
||||||
|
|
||||||
private void loginEventBoarder(User user) {
|
private void loginEventBoarder(User user) {
|
||||||
Command.of(UserLoginCommand.class).user(user).sendToQueue();
|
CompletableFuture.runAsync(() -> {
|
||||||
user.setSyncTime(LocalDateTime.now());
|
Command.of(UserLoginCommand.class).user(user).sendToQueue();
|
||||||
userRepository.save(user);
|
user.setSyncTime(LocalDateTime.now());
|
||||||
|
userRepository.save(user);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,8 +33,6 @@ public class RouteRequest implements Serializable, EventManageable {
|
||||||
|
|
||||||
private Long routeId;
|
private Long routeId;
|
||||||
|
|
||||||
private Long routeOrderKey;
|
|
||||||
|
|
||||||
private String routeRequestNo;
|
private String routeRequestNo;
|
||||||
|
|
||||||
private String supplier;
|
private String supplier;
|
||||||
|
|
Loading…
Reference in New Issue