Browse Source

delete useless annotation

icenaked 3 years ago
parent
commit
c84b7f2417

+ 0 - 19
seecoder-portal-server/src/main/java/cn/seecoder/seecoderportalserver/service/UserService.java

@@ -149,25 +149,6 @@ public class UserService {
         log.debug("Reset Password for User: {}", savedUser);
     }
 
-//    @Transactional(rollbackFor = RuntimeException.class)
-//    public void resetGitlabPassword(String phone, String phoneCode, String password) {
-//        checkPhoneMessageOrThrowError(phone, phoneCode);
-//
-//        User user = userRepository
-//                .findByPhone(phone)
-//                .<UsernameNotFoundException>orElseThrow(() -> {
-//                    // TODO: use customException
-//                    throw new UsernameNotFoundException("找不到手机用户[" + phone + "]");
-//                });
-//        User savedUser = userRepository.save(user);
-//        try {
-//            gitlabService.changePassword(Math.toIntExact(savedUser.getId()),password);
-//        } catch (SeecoderGitlabException e) {
-//            throw new CustomErrorException("gitlab密码重置失败,请联系管理人员!");
-//        }
-//        log.debug("Reset Password for User: {}", savedUser);
-//    }
-
     private void checkPhoneMessageOrThrowError(String phone, String phoneCode) {
         if (!aliService.checkPhoneMessage(phone, phoneCode)) {
             throw CustomErrorException.phoneVerificationNotMatch();

+ 0 - 10
seecoder-portal-server/src/main/java/cn/seecoder/seecoderportalserver/web/rest/UserController.java

@@ -87,16 +87,6 @@ public class UserController {
         return OkResponse.of(true);
     }
 
-//    @PostMapping("/resetGitlabPassword")
-//    public OkResponse<Boolean> resetGitlabPassword(@RequestBody ResetPasswordDTO resetPasswordDTO) {
-//        userService.resetGitlabPassword(
-//                resetPasswordDTO.getPhone(),
-//                resetPasswordDTO.getIdentifyCode(),
-//                resetPasswordDTO.getPassword()
-//        );
-//        return OkResponse.of(true);
-//    }
-
     @GetMapping("/findIdByPhone/{phone}")
     public OkResponse<Long> findIdByPhone(@PathVariable String phone) {
         return OkResponse.of(userService.findIdByPhone(phone));