企业四要素,手机号三要素开关

pull/1121/head
梁宇奇 2025-12-06 16:30:28 +08:00
parent cb14981874
commit 763f5f3c99
4 changed files with 25 additions and 2 deletions

View File

@ -306,4 +306,8 @@ fs:
robot: robot:
monitorSwitch: true monitorSwitch: true
monitorChartId: oc_34e207df88addd15d83ec274fda95ef6 monitorChartId: oc_34e207df88addd15d83ec274fda95ef6
monitorEnv: 测试 monitorEnv: 测试
# 企业四要素,手机号三要素
lfv2:
enable: false

View File

@ -307,4 +307,8 @@ fs:
robot: robot:
monitorSwitch: false monitorSwitch: false
monitorChartId: oc_34e207df88addd15d83ec274fda95ef6 monitorChartId: oc_34e207df88addd15d83ec274fda95ef6
monitorEnv: 本地 monitorEnv: 本地
# 企业四要素,手机号三要素
lfv2:
enable: false

View File

@ -307,3 +307,7 @@ fs:
monitorSwitch: true monitorSwitch: true
monitorChartId: oc_34e207df88addd15d83ec274fda95ef6 monitorChartId: oc_34e207df88addd15d83ec274fda95ef6
monitorEnv: 生产 monitorEnv: 生产
# 企业四要素,手机号三要素
lfv2:
enable: true

View File

@ -27,6 +27,9 @@ public class Lfv2Client {
@Value("${lfv2.auth:APPCODE 4dd403cda2694a45a1124b09637612b6}") @Value("${lfv2.auth:APPCODE 4dd403cda2694a45a1124b09637612b6}")
private String authCode; private String authCode;
@Value("${lfv2.enable}")
private Boolean enable;
/** /**
* *
* *
@ -38,6 +41,10 @@ public class Lfv2Client {
*/ */
public boolean checkEnterprise(String creditCode, String enterpriseName, String legalPersonName, public boolean checkEnterprise(String creditCode, String enterpriseName, String legalPersonName,
String legalIdNumber) { String legalIdNumber) {
if (!enable) {
log.warn("未开启企业四要素检查,直接通过");
return true;
}
Map<String, String> headers = new HashMap<>(); Map<String, String> headers = new HashMap<>();
//最后在header中的格式(中间是英文空格)为Authorization:APPCODE 83359fd73fe94948385f570e3c139105 //最后在header中的格式(中间是英文空格)为Authorization:APPCODE 83359fd73fe94948385f570e3c139105
headers.put("Authorization", authCode); headers.put("Authorization", authCode);
@ -75,6 +82,10 @@ public class Lfv2Client {
* @return * @return
*/ */
public boolean checkPhone(String phoneNumber, String personName, String idNumber) { public boolean checkPhone(String phoneNumber, String personName, String idNumber) {
if (!enable) {
log.warn("未开启手机号三要素校验,直接通过");
return true;
}
Map<String, String> headers = new HashMap<>(); Map<String, String> headers = new HashMap<>();
//最后在header中的格式(中间是英文空格)为Authorization:APPCODE 83359fd73fe94948385f570e3c139105 //最后在header中的格式(中间是英文空格)为Authorization:APPCODE 83359fd73fe94948385f570e3c139105
headers.put("Authorization", authCode); headers.put("Authorization", authCode);