保誠-保戶業務員媒合平台
wayne
2022-03-11 242fad1691917c4fd82c7f04b6190a7113628e93
pamapi/src/main/java/com/pollex/pam/web/rest/OtpResource.java
@@ -3,7 +3,7 @@
import java.util.Arrays;
import java.util.UUID;
import com.pollex.pam.web.rest.errors.CustomerNotRegisteredException;
import com.pollex.pam.business.aop.logging.audit.AuditLoggingInject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -17,20 +17,22 @@
import org.springframework.web.bind.annotation.RestController;
import com.pollex.pam.config.ApplicationProperties;
import com.pollex.pam.domain.Customer;
import com.pollex.pam.enums.OtpLoginTypeEnum;
import com.pollex.pam.repository.CustomerRepository;
import com.pollex.pam.business.domain.Customer;
import com.pollex.pam.business.enums.OtpLoginTypeEnum;
import com.pollex.pam.business.repository.CustomerRepository;
import com.pollex.pam.security.jwt.JWTFilter;
import com.pollex.pam.security.jwt.TokenProvider;
import com.pollex.pam.service.CustomerAuthService;
import com.pollex.pam.service.CustomerService;
import com.pollex.pam.service.OtpTmpService;
import com.pollex.pam.business.service.OtpTmpService;
import com.pollex.pam.service.OtpUtilService;
import com.pollex.pam.service.OtpWebService;
import com.pollex.pam.service.dto.CustomerRegisterDTO;
import com.pollex.pam.service.dto.OtpResponseDTO;
import com.pollex.pam.web.rest.vm.OtpLoginVM;
import com.pollex.pam.web.rest.vm.VerifyOtpVM;
import com.pollex.pam.business.service.dto.CustomerRegisterDTO;
import com.pollex.pam.business.service.dto.OtpResponseDTO;
import com.pollex.pam.business.web.vm.OtpLoginVM;
import com.pollex.pam.business.web.vm.VerifyOtpVM;
import static com.pollex.pam.business.aop.logging.audit.AuditLoggingType.CUSTOMER_LOGIN;
@RestController
@RequestMapping("/api/otp")
@@ -82,6 +84,7 @@
        return new ResponseEntity<>(otpResponse, HttpStatus.OK);
    }
    @AuditLoggingInject(type = CUSTOMER_LOGIN)
    @PostMapping("/verify")
    public ResponseEntity<UserJWTController.JWTToken> verifyOtp(@RequestBody VerifyOtpVM verifyOtpParam) {
       otpUtilService.verifyOtp(verifyOtpParam);