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