保誠-保戶業務員媒合平台
wayne
2022-02-14 81be73b65d72cb2e61b31ec30a9a1b81c242e671
[BUG] [todo 135269] 修正Eservice的登入帳號是否成功登入的檢核

該code僅表達代碼狀態,真的是否能夠登入是取決於 issuccess 欄位是否為"true"

修改1個檔案
5 ■■■■■ 已變更過的檔案
pamapi/src/main/java/com/pollex/pam/security/provider/EServiceAuthenticationProvider.java 5 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
pamapi/src/main/java/com/pollex/pam/security/provider/EServiceAuthenticationProvider.java
@@ -8,7 +8,6 @@
import com.pollex.pam.security.token.EServiceAuthenticationToken;
import com.pollex.pam.service.LoginRecordService;
import com.pollex.pam.service.dto.EServiceResponse;
import com.pollex.pam.service.util.HttpRequestUtil;
import com.pollex.pam.web.rest.errors.EServiceErrorException;
import org.apache.http.conn.ssl.NoopHostnameVerifier;
import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
@@ -43,7 +42,7 @@
@Component
public class EServiceAuthenticationProvider {
    private static final String E_SERVICE_LOGIN_SUCCESS_CODE = "0";
    private static final String E_SERVICE_LOGIN_SUCCESS_CODE = "true";
    private static final Logger log = LoggerFactory.getLogger(EServiceAuthenticationProvider.class);
    @Autowired
@@ -70,7 +69,7 @@
                EServiceResponse eServiceResponse = responseEntity.getBody();
                log.debug("eService response = {}", eServiceResponse);
                if(E_SERVICE_LOGIN_SUCCESS_CODE.equals(eServiceResponse.getCode())){
                if(E_SERVICE_LOGIN_SUCCESS_CODE.equals(eServiceResponse.getIssuccess())){
                    loginRecordService.saveEServiceLoginSuccessRecord(account);
                    return getConsultantToken(account, credentials);
                }