完成离职人员关卡
This commit is contained in:
parent
8d83e92a85
commit
bb44893339
|
@ -67,7 +67,7 @@ public class AmapUserRequest implements UserSync {
|
|||
}
|
||||
|
||||
|
||||
@ListenTo(command = "UserLoginCommand",order = 3)
|
||||
@ListenTo(command = "UserLoginCommand", order = 3)
|
||||
@Override
|
||||
public User syncUserInfoToSupplier(UserLoginCommand command) {
|
||||
User user = command.getUser();
|
||||
|
@ -81,15 +81,14 @@ public class AmapUserRequest implements UserSync {
|
|||
return user;
|
||||
}
|
||||
|
||||
@ListenTo(command = "UserDisabledCommand",order = 0)
|
||||
@ListenTo(command = "UserDisabledCommand", order = 0)
|
||||
@Override
|
||||
public Boolean disableUserToSupplier(UserDisabledCommand command) {
|
||||
public void disableUserToSupplier(UserDisabledCommand command) {
|
||||
User user = command.getUser();
|
||||
String updateUserUrl = BaseUrl + USER_UPDATE_PATH;
|
||||
UserParam userParamByUser = createUserParamByUser(user);
|
||||
userParamByUser.setStatus(0);
|
||||
BaseResponse post = amapRequest.post(updateUserUrl, userParamByUser, BaseResponse.class);
|
||||
return post.getCode().equals(1);
|
||||
CompletableFuture.runAsync(() -> amapRequest.post(updateUserUrl, userParamByUser, BaseResponse.class));
|
||||
}
|
||||
|
||||
@Data
|
||||
|
|
|
@ -131,7 +131,7 @@ public class CTripUserSaveRequest implements UserSync {
|
|||
|
||||
@ListenTo(command = "UserDisabledCommand", order = 1)
|
||||
@Override
|
||||
public Boolean disableUserToSupplier(UserDisabledCommand command) {
|
||||
public void disableUserToSupplier(UserDisabledCommand command) {
|
||||
User user = command.getUser();
|
||||
AuthenticationListRequest authenticationListRequest = buildUserParam(user);
|
||||
List<AuthenticationInfo> authenticationInfoList = authenticationListRequest.getAuthenticationInfoList();
|
||||
|
@ -139,7 +139,6 @@ public class CTripUserSaveRequest implements UserSync {
|
|||
AuthenticationInfo authenticationInfo = authenticationInfoList.get(0);
|
||||
authenticationInfo.getAuthentication().setValid('I');
|
||||
}
|
||||
AuthenticationResponseList response = postRequest.post(userUrl, authenticationListRequest, AuthenticationResponseList.class);
|
||||
return response.getResult().equals("Success");
|
||||
CompletableFuture.runAsync(() -> postRequest.post(userUrl, authenticationListRequest, AuthenticationResponseList.class));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -117,13 +117,12 @@ public class LYUserRequest implements UserSync {
|
|||
|
||||
@ListenTo(command = "UserDisabledCommand",order = 3)
|
||||
@Override
|
||||
public Boolean disableUserToSupplier(UserDisabledCommand command) {
|
||||
public void disableUserToSupplier(UserDisabledCommand command) {
|
||||
User user = command.getUser();
|
||||
EmployeeEntity employeeEntity = user2LYEmployee(user);
|
||||
employeeEntity.setWorkingState(0);
|
||||
EmployeeRequest employeeData = new EmployeeRequest();
|
||||
employeeData.setParam(employeeEntity);
|
||||
UserResponse post = postRequest.post(userUrl, employeeData, UserResponse.class);
|
||||
return post.isSuccess();
|
||||
CompletableFuture.runAsync(() -> postRequest.post(userUrl, employeeData, UserResponse.class));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,5 +7,5 @@ import com.chint.domain.aggregates.user.User;
|
|||
public interface UserSync {
|
||||
User syncUserInfoToSupplier(UserLoginCommand command);
|
||||
|
||||
Boolean disableUserToSupplier(UserDisabledCommand command);
|
||||
void disableUserToSupplier(UserDisabledCommand command);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue