企业四要素,手机号三要素开关
parent
cb14981874
commit
763f5f3c99
|
|
@ -306,4 +306,8 @@ fs:
|
||||||
robot:
|
robot:
|
||||||
monitorSwitch: true
|
monitorSwitch: true
|
||||||
monitorChartId: oc_34e207df88addd15d83ec274fda95ef6
|
monitorChartId: oc_34e207df88addd15d83ec274fda95ef6
|
||||||
monitorEnv: 测试
|
monitorEnv: 测试
|
||||||
|
|
||||||
|
# 企业四要素,手机号三要素
|
||||||
|
lfv2:
|
||||||
|
enable: false
|
||||||
|
|
@ -307,4 +307,8 @@ fs:
|
||||||
robot:
|
robot:
|
||||||
monitorSwitch: false
|
monitorSwitch: false
|
||||||
monitorChartId: oc_34e207df88addd15d83ec274fda95ef6
|
monitorChartId: oc_34e207df88addd15d83ec274fda95ef6
|
||||||
monitorEnv: 本地
|
monitorEnv: 本地
|
||||||
|
|
||||||
|
# 企业四要素,手机号三要素
|
||||||
|
lfv2:
|
||||||
|
enable: false
|
||||||
|
|
@ -307,3 +307,7 @@ fs:
|
||||||
monitorSwitch: true
|
monitorSwitch: true
|
||||||
monitorChartId: oc_34e207df88addd15d83ec274fda95ef6
|
monitorChartId: oc_34e207df88addd15d83ec274fda95ef6
|
||||||
monitorEnv: 生产
|
monitorEnv: 生产
|
||||||
|
|
||||||
|
# 企业四要素,手机号三要素
|
||||||
|
lfv2:
|
||||||
|
enable: true
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue