/**
* @see AccountSoapService#createUser(UserDTO)
*/
@Override
public IdResult createUser(UserDTO user) {
IdResult result = new IdResult();
try {
Validate.notNull(user, "用户参数为空");
User userEntity = BeanMapper.map(user, User.class);
BeanValidators.validateWithException(validator, userEntity);
accountService.saveUser(userEntity);
return new IdResult(userEntity.getId());
} catch (ConstraintViolationException e) {
String message = StringUtils.join(BeanValidators.extractPropertyAndMessageAsList(e, " "), "\n");
return handleParameterError(result, e, message);
} catch (RuntimeException e) {
if (Exceptions.isCausedBy(e, DuplicateKeyException.class)) {