|
@ -76,9 +76,18 @@ public class OperUserController { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@PostMapping |
|
|
@PostMapping |
|
|
public Result save(@RequestBody OperUserDTO dto) { |
|
|
public Result save(@RequestBody OperUserDTO dto) throws Exception { |
|
|
//效验数据
|
|
|
//效验数据
|
|
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|
|
|
|
|
//解密密码
|
|
|
|
|
|
if (dto.getPassword().length() > 50) { |
|
|
|
|
|
String password = RSASignature.decryptByPrivateKey(dto.getPassword(), privateKey); |
|
|
|
|
|
String email = RSASignature.decryptByPrivateKey(dto.getEmail(), privateKey); |
|
|
|
|
|
String phone = RSASignature.decryptByPrivateKey(dto.getPhone(), privateKey); |
|
|
|
|
|
dto.setPassword(password); |
|
|
|
|
|
dto.setEmail(email); |
|
|
|
|
|
dto.setPhone(phone); |
|
|
|
|
|
} |
|
|
operUserService.save(dto); |
|
|
operUserService.save(dto); |
|
|
return new Result(); |
|
|
return new Result(); |
|
|
} |
|
|
} |
|
|