Merge branch 'dev'

pull/1121/head
梁宇奇 2025-12-09 22:00:56 +08:00
commit c7bffce0f0
4 changed files with 25 additions and 2 deletions

View File

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

View File

@ -308,3 +308,7 @@ fs:
monitorSwitch: false
monitorChartId: oc_34e207df88addd15d83ec274fda95ef6
monitorEnv: 本地
# 企业四要素,手机号三要素
lfv2:
enable: false

View File

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

View File

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