add code history

This commit is contained in:
Mohd-Arham
2025-11-28 18:21:47 +05:30
parent 81ddef90f0
commit ff97877997
11 changed files with 275 additions and 5 deletions
@@ -21,6 +21,7 @@ import com.billpaymentservice.bbps.entites.UsersDetails;
import com.billpaymentservice.bbps.repository.UserRepository;
import com.billpaymentservice.bbps.repository.UsersDetailsRepository;
import com.billpaymentservice.bbps.service.AuthService;
import com.billpaymentservice.bbps.util.BBPSConstant;
import com.billpaymentservice.bbps.util.Helper;
import com.billpaymentservice.bbps.util.OtpClient;
import java.util.Optional;
@@ -93,8 +94,13 @@ public class AuthServiceImpl implements AuthService {
return ResponseModel.builder().message("Login Success").status("Success").statusCode(200).data(authResp)
.build();
} else {
AuthResponses authResp = new AuthResponses("", "User Not Found", "Authentication failed", 401, null);
return ResponseModel.builder().message("User Not Found").status("Failure").statusCode(401)
LOGGER.warn("OTP verified successfully, but user not found for mobileNo: {}", mobileNo);
// AuthResponses authResp = new AuthResponses("", "User Not Found", "Authentication failed", 401, null);
AuthResponses authResp = new AuthResponses("", "User Not Found",
"OTP verified successfully, but user not found", BBPSConstant.OTP_VERIFIED_USER_NOT_FORUN,
null);
return ResponseModel.builder().message("OTP verified successfully, but user not found")
.status("Failure").statusCode(BBPSConstant.OTP_VERIFIED_USER_NOT_FORUN) // Not Found
.data(authResp).build();
}