Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangxinjiang
yifu-mvp
Commits
c8b53d80
Commit
c8b53d80
authored
Jun 21, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
附属信息附件上传接口调整
parent
5b0d9375
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
147 additions
and
25 deletions
+147
-25
TEmpEducationController.java
.../v1/yifu/archives/controller/TEmpEducationController.java
+3
-2
TCanCheck.java
...n/java/com/yifu/cloud/plus/v1/check/entity/TCanCheck.java
+40
-0
ChecksUtil.java
...n/java/com/yifu/cloud/plus/v1/check/utils/ChecksUtil.java
+25
-19
TCanCheckMapper.java
.../com/yifu/cloud/plus/v1/check/mapper/TCanCheckMapper.java
+15
-0
TCanCheckService.java
...om/yifu/cloud/plus/v1/check/service/TCanCheckService.java
+16
-0
TCanCheckServiceImpl.java
...loud/plus/v1/check/service/impl/TCanCheckServiceImpl.java
+27
-0
TCheckBankNoServiceImpl.java
...d/plus/v1/check/service/impl/TCheckBankNoServiceImpl.java
+5
-1
TCheckIdCardServiceImpl.java
...d/plus/v1/check/service/impl/TCheckIdCardServiceImpl.java
+4
-1
TCheckMobileServiceImpl.java
...d/plus/v1/check/service/impl/TCheckMobileServiceImpl.java
+5
-1
application-dev.yml
...eck/yifu-check-biz/src/main/resources/application-dev.yml
+3
-1
TCanCheckMapper.xml
...u-check-biz/src/main/resources/mapper/TCanCheckMapper.xml
+4
-0
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/TEmpEducationController.java
View file @
c8b53d80
...
@@ -70,8 +70,9 @@ public class TEmpEducationController {
...
@@ -70,8 +70,9 @@ public class TEmpEducationController {
* @param tEmpEducation 员工学历信息表
* @param tEmpEducation 员工学历信息表
* @return
* @return
*/
*/
@Operation
(
description
=
"不分页查询"
)
@Operation
(
description
=
"不分页查询
hasPermission('archives_tempeducation_export')
"
)
@GetMapping
(
"/noPage"
)
@GetMapping
(
"/noPage"
)
@PreAuthorize
(
"@pms.hasPermission('archives_tempeducation_export')"
)
public
R
<
List
<
TEmpEducation
>>
getTEmpEducationNoPage
(
TEmpEducation
tEmpEducation
)
{
public
R
<
List
<
TEmpEducation
>>
getTEmpEducationNoPage
(
TEmpEducation
tEmpEducation
)
{
return
R
.
ok
(
tEmpEducationService
.
list
(
Wrappers
.
query
(
tEmpEducation
)));
return
R
.
ok
(
tEmpEducationService
.
list
(
Wrappers
.
query
(
tEmpEducation
)));
}
}
...
@@ -93,7 +94,7 @@ public class TEmpEducationController {
...
@@ -93,7 +94,7 @@ public class TEmpEducationController {
* @param tEmpEducation 员工学历信息表
* @param tEmpEducation 员工学历信息表
* @return R
* @return R
*/
*/
@Operation
(
description
=
"新增员工学历信息表"
)
@Operation
(
description
=
"新增员工学历信息表
hasPermission('archives_tempeducation_add')
"
)
@SysLog
(
"新增员工学历信息表"
)
@SysLog
(
"新增员工学历信息表"
)
@PostMapping
@PostMapping
@PreAuthorize
(
"@pms.hasPermission('archives_tempeducation_add')"
)
@PreAuthorize
(
"@pms.hasPermission('archives_tempeducation_add')"
)
...
...
yifu-check/yifu-check-api/src/main/java/com/yifu/cloud/plus/v1/check/entity/TCanCheck.java
0 → 100644
View file @
c8b53d80
package
com
.
yifu
.
cloud
.
plus
.
v1
.
check
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
javax.validation.constraints.NotNull
;
/**
* 实名校验限定调用API的条数表
*
* @author hgw
* @date 2022-6-10 11:07:37
*/
@Data
@EqualsAndHashCode
(
callSuper
=
true
)
@TableName
(
"t_can_check"
)
@Tag
(
name
=
"可以校验"
)
public
class
TCanCheck
extends
Model
<
TCanCheck
>
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@Schema
(
description
=
"主键"
)
private
String
id
;
/**
* 0不可,1可以校验
*/
@NotNull
(
message
=
"0不可,1可以校验不能为空"
)
@Schema
(
description
=
"0不可,1可以校验"
)
private
Integer
canCheck
;
}
yifu-check/yifu-check-api/src/main/java/com/yifu/cloud/plus/v1/check/utils/ChecksUtil.java
View file @
c8b53d80
package
com
.
yifu
.
cloud
.
plus
.
v1
.
check
.
utils
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
check
.
utils
;
import
com.google.gson.JsonArray
;
import
com.google.gson.JsonArray
;
import
com.google.gson.JsonElement
;
import
com.google.gson.JsonObject
;
import
com.google.gson.JsonObject
;
import
com.google.gson.JsonParser
;
import
com.google.gson.JsonParser
;
import
com.yifu.cloud.plus.v1.check.constant.ChecksConstants
;
import
com.yifu.cloud.plus.v1.check.constant.ChecksConstants
;
...
@@ -10,7 +11,9 @@ import com.yifu.cloud.plus.v1.check.entity.TCheckMobile;
...
@@ -10,7 +11,9 @@ import com.yifu.cloud.plus.v1.check.entity.TCheckMobile;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -20,10 +23,9 @@ import java.util.Map;
...
@@ -20,10 +23,9 @@ import java.util.Map;
* @description 测试身份证
* @description 测试身份证
* @date 2022/5/7
* @date 2022/5/7
*/
*/
public
class
ChecksUtil
{
public
class
ChecksUtil
{
@Value
(
"${canCheck:false}"
)
private
static
boolean
canCheck
;
private
static
final
String
APP_ID
=
"oi0mucL4"
;
private
static
final
String
APP_ID
=
"oi0mucL4"
;
...
@@ -33,7 +35,7 @@ public class ChecksUtil {
...
@@ -33,7 +35,7 @@ public class ChecksUtil {
private
static
JsonParser
jsonParser
=
new
JsonParser
();
private
static
JsonParser
jsonParser
=
new
JsonParser
();
public
static
void
checkIdCard
(
TCheckIdCard
checkIdCard
)
{
public
static
void
checkIdCard
(
TCheckIdCard
checkIdCard
,
boolean
canCheck
)
{
if
(
canCheck
)
{
if
(
canCheck
)
{
// 1.调用身份信息校验api
// 1.调用身份信息校验api
...
@@ -49,7 +51,7 @@ public class ChecksUtil {
...
@@ -49,7 +51,7 @@ public class ChecksUtil {
* @Date 17:50 2022/6/20
* @Date 17:50 2022/6/20
* @param mobiles 检测手机号,多个手机号码用英文半角逗号隔开,仅支持国内号码
* @param mobiles 检测手机号,多个手机号码用英文半角逗号隔开,仅支持国内号码
**/
**/
public
static
R
<
Map
<
String
,
TCheckMobile
>>
checkMobile
(
String
mobiles
)
{
public
static
R
<
Map
<
String
,
TCheckMobile
>>
checkMobile
(
String
mobiles
,
boolean
canCheck
)
{
Map
<
String
,
TCheckMobile
>
checkMobiles
=
new
HashMap
<>();
Map
<
String
,
TCheckMobile
>
checkMobiles
=
new
HashMap
<>();
if
(
canCheck
)
{
if
(
canCheck
)
{
// 1.调用身份信息校验api
// 1.调用身份信息校验api
...
@@ -67,7 +69,7 @@ public class ChecksUtil {
...
@@ -67,7 +69,7 @@ public class ChecksUtil {
* @param cardNo 银行卡号,限单个 是 [string]
* @param cardNo 银行卡号,限单个 是 [string]
* @param mobile 银行预留手机号,仅支持国内11位号码
* @param mobile 银行预留手机号,仅支持国内11位号码
**/
**/
public
static
R
<
TCheckBankNo
>
checkBankNo
(
String
name
,
String
idNum
,
String
cardNo
,
String
mobile
)
{
public
static
R
<
TCheckBankNo
>
checkBankNo
(
String
name
,
String
idNum
,
String
cardNo
,
String
mobile
,
boolean
canCheck
)
{
TCheckBankNo
checkBankNo
=
new
TCheckBankNo
();
TCheckBankNo
checkBankNo
=
new
TCheckBankNo
();
if
(
canCheck
)
{
if
(
canCheck
)
{
// 1.调用身份信息校验api
// 1.调用身份信息校验api
...
@@ -93,15 +95,16 @@ public class ChecksUtil {
...
@@ -93,15 +95,16 @@ public class ChecksUtil {
// 校验状态码 200000:成功,其他失败
// 校验状态码 200000:成功,其他失败
JsonObject
resJson
=
jsonObject
.
get
(
ChecksConstants
.
DATA
).
getAsJsonObject
();
JsonObject
resJson
=
jsonObject
.
get
(
ChecksConstants
.
DATA
).
getAsJsonObject
();
String
message
=
jsonObject
.
get
(
ChecksConstants
.
MESSAGE
).
getAsString
();
String
message
=
jsonObject
.
get
(
ChecksConstants
.
MESSAGE
).
getAsString
();
JsonElement
temp
;
if
(
Common
.
isNotNull
(
resJson
)){
if
(
Common
.
isNotNull
(
resJson
)){
TCheckBankNo
bankNo
=
new
TCheckBankNo
();
TCheckBankNo
bankNo
=
new
TCheckBankNo
();
bankNo
.
setBankNo
(
resJson
.
getAsJsonObject
().
get
(
"bankNo"
).
getAsString
(
));
bankNo
.
setBankNo
(
getJsonElementValue
(
resJson
.
getAsJsonObject
().
get
(
"bankNo"
)
));
bankNo
.
setBankName
(
resJson
.
getAsJsonObject
().
get
(
"bankName"
).
getAsString
(
));
bankNo
.
setBankName
(
getJsonElementValue
(
resJson
.
getAsJsonObject
().
get
(
"bankName"
)
));
bankNo
.
setCardCategory
(
resJson
.
getAsJsonObject
().
get
(
"cardCategory"
).
getAsString
(
));
bankNo
.
setCardCategory
(
getJsonElementValue
(
resJson
.
getAsJsonObject
().
get
(
"cardCategory"
)
));
bankNo
.
setCardType
(
resJson
.
getAsJsonObject
().
get
(
"cardType"
).
getAsString
(
));
bankNo
.
setCardType
(
getJsonElementValue
(
resJson
.
getAsJsonObject
().
get
(
"cardType"
)
));
bankNo
.
setResult
(
resJson
.
getAsJsonObject
().
get
(
ChecksConstants
.
RESULT
).
getAsString
(
));
bankNo
.
setResult
(
getJsonElementValue
(
resJson
.
getAsJsonObject
().
get
(
ChecksConstants
.
RESULT
)
));
bankNo
.
setMessage
(
message
);
bankNo
.
setMessage
(
message
);
bankNo
.
setRemark
(
resJson
.
getAsJsonObject
().
get
(
ChecksConstants
.
REMARK
).
getAsString
(
));
bankNo
.
setRemark
(
getJsonElementValue
(
resJson
.
getAsJsonObject
().
get
(
ChecksConstants
.
REMARK
)
));
bankNo
.
setType
(
CommonConstants
.
ONE_STRING
);
bankNo
.
setType
(
CommonConstants
.
ONE_STRING
);
}
}
}
else
{
}
else
{
...
@@ -114,7 +117,9 @@ public class ChecksUtil {
...
@@ -114,7 +117,9 @@ public class ChecksUtil {
return
R
.
ok
(
checkBankNo
);
return
R
.
ok
(
checkBankNo
);
}
}
private
static
String
getJsonElementValue
(
JsonElement
temp
){
return
Common
.
isNotNull
(
temp
)?
temp
.
getAsString
():
CommonConstants
.
EMPTY_STRING
;
}
/**
/**
* @Author fxj
* @Author fxj
...
@@ -139,11 +144,11 @@ public class ChecksUtil {
...
@@ -139,11 +144,11 @@ public class ChecksUtil {
TCheckMobile
mobile
=
null
;
TCheckMobile
mobile
=
null
;
for
(
int
i
=
0
;
i
<
mobileArray
.
size
();
i
++){
for
(
int
i
=
0
;
i
<
mobileArray
.
size
();
i
++){
mobile
=
new
TCheckMobile
();
mobile
=
new
TCheckMobile
();
mobile
.
setMobile
(
mobileArray
.
get
(
i
).
getAsJsonObject
().
get
(
ChecksConstants
.
MOBILE
).
getAsString
(
));
mobile
.
setMobile
(
getJsonElementValue
(
mobileArray
.
get
(
i
).
getAsJsonObject
().
get
(
ChecksConstants
.
MOBILE
)
));
mobile
.
setArea
(
mobileArray
.
get
(
i
).
getAsJsonObject
().
get
(
ChecksConstants
.
AREA
).
getAsString
(
));
mobile
.
setArea
(
getJsonElementValue
(
mobileArray
.
get
(
i
).
getAsJsonObject
().
get
(
ChecksConstants
.
AREA
)
));
mobile
.
setNumbertype
(
mobileArray
.
get
(
i
).
getAsJsonObject
().
get
(
ChecksConstants
.
NUMBER_TYPE
).
getAsString
(
));
mobile
.
setNumbertype
(
getJsonElementValue
(
mobileArray
.
get
(
i
).
getAsJsonObject
().
get
(
ChecksConstants
.
NUMBER_TYPE
)
));
mobile
.
setChargesstatus
(
mobileArray
.
get
(
i
).
getAsJsonObject
().
get
(
ChecksConstants
.
CHARGES_STATUS
).
getAsString
(
));
mobile
.
setChargesstatus
(
getJsonElementValue
(
mobileArray
.
get
(
i
).
getAsJsonObject
().
get
(
ChecksConstants
.
CHARGES_STATUS
)
));
mobile
.
setStatus
(
mobileArray
.
get
(
i
).
getAsJsonObject
().
get
(
ChecksConstants
.
STATUS
).
getAsString
(
));
mobile
.
setStatus
(
getJsonElementValue
(
mobileArray
.
get
(
i
).
getAsJsonObject
().
get
(
ChecksConstants
.
STATUS
)
));
mobile
.
setMessage
(
message
);
mobile
.
setMessage
(
message
);
mobile
.
setType
(
CommonConstants
.
ONE_STRING
);
mobile
.
setType
(
CommonConstants
.
ONE_STRING
);
checkMobileMap
.
put
(
mobile
.
getMobile
(),
mobile
);
checkMobileMap
.
put
(
mobile
.
getMobile
(),
mobile
);
...
@@ -170,13 +175,14 @@ public class ChecksUtil {
...
@@ -170,13 +175,14 @@ public class ChecksUtil {
// 调用身份信息校验成功
// 调用身份信息校验成功
// 解析结果数据,进行业务处理
// 解析结果数据,进行业务处理
// 校验状态码 200000:成功,其他失败
// 校验状态码 200000:成功,其他失败
String
resultStr
=
jsonObject
.
get
(
ChecksConstants
.
DATA
).
getAsJsonObject
().
get
(
ChecksConstants
.
RESULT
).
getAsString
();
JsonObject
resultJson
=
jsonObject
.
get
(
ChecksConstants
.
DATA
).
getAsJsonObject
();
String
resultStr
=
getJsonElementValue
(
resultJson
.
getAsJsonObject
().
get
(
ChecksConstants
.
RESULT
));
if
(
"01"
.
equals
(
resultStr
))
{
if
(
"01"
.
equals
(
resultStr
))
{
checkIdCard
.
setIsTrue
(
1
);
checkIdCard
.
setIsTrue
(
1
);
checkIdCard
.
setReason
(
"正确"
);
checkIdCard
.
setReason
(
"正确"
);
}
else
{
}
else
{
checkIdCard
.
setIsTrue
(
0
);
checkIdCard
.
setIsTrue
(
0
);
String
remark
=
jsonObject
.
get
(
ChecksConstants
.
DATA
).
getAsJsonObject
().
get
(
ChecksConstants
.
REMARK
).
getAsString
(
);
String
remark
=
getJsonElementValue
(
resultJson
.
get
(
ChecksConstants
.
REMARK
)
);
checkIdCard
.
setReason
(
"调用身份信息校验失败,resultStr:"
+
resultStr
+
",msg:"
+
remark
);
checkIdCard
.
setReason
(
"调用身份信息校验失败,resultStr:"
+
resultStr
+
",msg:"
+
remark
);
}
}
}
else
{
}
else
{
...
...
yifu-check/yifu-check-biz/src/main/java/com/yifu/cloud/plus/v1/check/mapper/TCanCheckMapper.java
0 → 100644
View file @
c8b53d80
package
com
.
yifu
.
cloud
.
plus
.
v1
.
check
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yifu.cloud.plus.v1.check.entity.TCanCheck
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* @Author fxj
* @Description 身份证实名校验自留库
* @Date 17:25 2022/6/21
**/
@Mapper
public
interface
TCanCheckMapper
extends
BaseMapper
<
TCanCheck
>
{
}
yifu-check/yifu-check-biz/src/main/java/com/yifu/cloud/plus/v1/check/service/TCanCheckService.java
0 → 100644
View file @
c8b53d80
package
com
.
yifu
.
cloud
.
plus
.
v1
.
check
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yifu.cloud.plus.v1.check.entity.TCanCheck
;
/**
* 校验锁
*
* @author hgw
* @date 2022-01-13 15:08:05
*/
public
interface
TCanCheckService
extends
IService
<
TCanCheck
>
{
Boolean
getCanCheck
();
}
yifu-check/yifu-check-biz/src/main/java/com/yifu/cloud/plus/v1/check/service/impl/TCanCheckServiceImpl.java
0 → 100644
View file @
c8b53d80
package
com
.
yifu
.
cloud
.
plus
.
v1
.
check
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.check.entity.TCanCheck
;
import
com.yifu.cloud.plus.v1.check.mapper.TCanCheckMapper
;
import
com.yifu.cloud.plus.v1.check.service.TCanCheckService
;
import
org.springframework.stereotype.Service
;
/**
* 身份证实名校验自留库
*
* @author hgw
* @date 2022-05-11 16:12:18
*/
@Service
(
"tCanCheckService"
)
public
class
TCanCheckServiceImpl
extends
ServiceImpl
<
TCanCheckMapper
,
TCanCheck
>
implements
TCanCheckService
{
@Override
public
Boolean
getCanCheck
()
{
TCanCheck
tCanCheck
=
baseMapper
.
selectById
(
1
);
boolean
canCheck
=
false
;
if
(
tCanCheck
!=
null
&&
tCanCheck
.
getCanCheck
()
==
1
)
{
canCheck
=
true
;
}
return
canCheck
;
}
}
yifu-check/yifu-check-biz/src/main/java/com/yifu/cloud/plus/v1/check/service/impl/TCheckBankNoServiceImpl.java
View file @
c8b53d80
...
@@ -19,12 +19,14 @@ package com.yifu.cloud.plus.v1.check.service.impl;
...
@@ -19,12 +19,14 @@ package com.yifu.cloud.plus.v1.check.service.impl;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.check.entity.TCheckBankNo
;
import
com.yifu.cloud.plus.v1.check.entity.TCheckBankNo
;
import
com.yifu.cloud.plus.v1.check.mapper.TCheckBankNoMapper
;
import
com.yifu.cloud.plus.v1.check.mapper.TCheckBankNoMapper
;
import
com.yifu.cloud.plus.v1.check.service.TCanCheckService
;
import
com.yifu.cloud.plus.v1.check.service.TCheckBankNoService
;
import
com.yifu.cloud.plus.v1.check.service.TCheckBankNoService
;
import
com.yifu.cloud.plus.v1.check.utils.ChecksUtil
;
import
com.yifu.cloud.plus.v1.check.utils.ChecksUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes
;
import
com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.MsgUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.MsgUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
/**
/**
...
@@ -33,14 +35,16 @@ import org.springframework.stereotype.Service;
...
@@ -33,14 +35,16 @@ import org.springframework.stereotype.Service;
* @author fxj
* @author fxj
* @date 2022-06-20 19:56:33
* @date 2022-06-20 19:56:33
*/
*/
@RequiredArgsConstructor
@Service
@Service
public
class
TCheckBankNoServiceImpl
extends
ServiceImpl
<
TCheckBankNoMapper
,
TCheckBankNo
>
implements
TCheckBankNoService
{
public
class
TCheckBankNoServiceImpl
extends
ServiceImpl
<
TCheckBankNoMapper
,
TCheckBankNo
>
implements
TCheckBankNoService
{
private
final
TCanCheckService
canCheckService
;
@Override
@Override
public
R
<
TCheckBankNo
>
checkBankNo
(
String
name
,
String
idNum
,
String
cardNo
,
String
mobile
)
{
public
R
<
TCheckBankNo
>
checkBankNo
(
String
name
,
String
idNum
,
String
cardNo
,
String
mobile
)
{
if
(
Common
.
isEmpty
(
name
)
||
Common
.
isEmpty
(
idNum
)
||
Common
.
isEmpty
(
cardNo
)){
if
(
Common
.
isEmpty
(
name
)
||
Common
.
isEmpty
(
idNum
)
||
Common
.
isEmpty
(
cardNo
)){
return
R
.
failed
(
MsgUtils
.
getMessage
(
ErrorCodes
.
CHECKS_BANK_NO_REQUEST_PARAM_ERROR
));
return
R
.
failed
(
MsgUtils
.
getMessage
(
ErrorCodes
.
CHECKS_BANK_NO_REQUEST_PARAM_ERROR
));
}
}
return
ChecksUtil
.
checkBankNo
(
name
,
idNum
,
cardNo
,
mobile
);
return
ChecksUtil
.
checkBankNo
(
name
,
idNum
,
cardNo
,
mobile
,
canCheckService
.
getCanCheck
()
);
}
}
}
}
yifu-check/yifu-check-biz/src/main/java/com/yifu/cloud/plus/v1/check/service/impl/TCheckIdCardServiceImpl.java
View file @
c8b53d80
...
@@ -7,6 +7,7 @@ import com.yifu.cloud.plus.v1.check.entity.TCheckApiNum;
...
@@ -7,6 +7,7 @@ import com.yifu.cloud.plus.v1.check.entity.TCheckApiNum;
import
com.yifu.cloud.plus.v1.check.entity.TCheckIdCard
;
import
com.yifu.cloud.plus.v1.check.entity.TCheckIdCard
;
import
com.yifu.cloud.plus.v1.check.entity.TCheckLock
;
import
com.yifu.cloud.plus.v1.check.entity.TCheckLock
;
import
com.yifu.cloud.plus.v1.check.mapper.TCheckIdCardMapper
;
import
com.yifu.cloud.plus.v1.check.mapper.TCheckIdCardMapper
;
import
com.yifu.cloud.plus.v1.check.service.TCanCheckService
;
import
com.yifu.cloud.plus.v1.check.service.TCheckApiNumService
;
import
com.yifu.cloud.plus.v1.check.service.TCheckApiNumService
;
import
com.yifu.cloud.plus.v1.check.service.TCheckIdCardService
;
import
com.yifu.cloud.plus.v1.check.service.TCheckIdCardService
;
import
com.yifu.cloud.plus.v1.check.service.TCheckLockService
;
import
com.yifu.cloud.plus.v1.check.service.TCheckLockService
;
...
@@ -40,6 +41,8 @@ public class TCheckIdCardServiceImpl extends ServiceImpl<TCheckIdCardMapper, TCh
...
@@ -40,6 +41,8 @@ public class TCheckIdCardServiceImpl extends ServiceImpl<TCheckIdCardMapper, TCh
private
final
TCheckLockService
tCheckLockService
;
private
final
TCheckLockService
tCheckLockService
;
private
final
TCheckApiNumService
tCheckApiNumService
;
private
final
TCheckApiNumService
tCheckApiNumService
;
private
final
TCanCheckService
canCheckService
;
/**
/**
* 身份证实名校验自留库简单分页查询
* 身份证实名校验自留库简单分页查询
*
*
...
@@ -144,7 +147,7 @@ public class TCheckIdCardServiceImpl extends ServiceImpl<TCheckIdCardMapper, TCh
...
@@ -144,7 +147,7 @@ public class TCheckIdCardServiceImpl extends ServiceImpl<TCheckIdCardMapper, TCh
// 调用API校验
// 调用API校验
if
(
nowApiNum
<
canApiNum
)
{
if
(
nowApiNum
<
canApiNum
)
{
nowApiNum
++;
nowApiNum
++;
ChecksUtil
.
checkIdCard
(
c
);
ChecksUtil
.
checkIdCard
(
c
,
canCheckService
.
getCanCheck
()
);
c
.
setCreateUser
(
userId
);
c
.
setCreateUser
(
userId
);
c
.
setCreateTime
(
LocalDateTime
.
now
());
c
.
setCreateTime
(
LocalDateTime
.
now
());
c
.
setType
(
CommonConstants
.
ONE_INT
);
c
.
setType
(
CommonConstants
.
ONE_INT
);
...
...
yifu-check/yifu-check-biz/src/main/java/com/yifu/cloud/plus/v1/check/service/impl/TCheckMobileServiceImpl.java
View file @
c8b53d80
...
@@ -19,6 +19,7 @@ package com.yifu.cloud.plus.v1.check.service.impl;
...
@@ -19,6 +19,7 @@ package com.yifu.cloud.plus.v1.check.service.impl;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yifu.cloud.plus.v1.check.entity.TCheckMobile
;
import
com.yifu.cloud.plus.v1.check.entity.TCheckMobile
;
import
com.yifu.cloud.plus.v1.check.mapper.TCheckMobileMapper
;
import
com.yifu.cloud.plus.v1.check.mapper.TCheckMobileMapper
;
import
com.yifu.cloud.plus.v1.check.service.TCanCheckService
;
import
com.yifu.cloud.plus.v1.check.service.TCheckMobileService
;
import
com.yifu.cloud.plus.v1.check.service.TCheckMobileService
;
import
com.yifu.cloud.plus.v1.check.utils.ChecksUtil
;
import
com.yifu.cloud.plus.v1.check.utils.ChecksUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
...
@@ -26,6 +27,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes;
...
@@ -26,6 +27,7 @@ import com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.MsgUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.MsgUtils
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.List
;
...
@@ -37,9 +39,11 @@ import java.util.Map;
...
@@ -37,9 +39,11 @@ import java.util.Map;
* @author fxj
* @author fxj
* @date 2022-06-20 17:29:03
* @date 2022-06-20 17:29:03
*/
*/
@RequiredArgsConstructor
@Service
@Service
public
class
TCheckMobileServiceImpl
extends
ServiceImpl
<
TCheckMobileMapper
,
TCheckMobile
>
implements
TCheckMobileService
{
public
class
TCheckMobileServiceImpl
extends
ServiceImpl
<
TCheckMobileMapper
,
TCheckMobile
>
implements
TCheckMobileService
{
private
TCanCheckService
canCheckService
;
/**
/**
* @Author fxj
* @Author fxj
* @Description 号码状态校验,单次请求上限100 多一个号码请以逗号分割
* @Description 号码状态校验,单次请求上限100 多一个号码请以逗号分割
...
@@ -54,7 +58,7 @@ public class TCheckMobileServiceImpl extends ServiceImpl<TCheckMobileMapper, TCh
...
@@ -54,7 +58,7 @@ public class TCheckMobileServiceImpl extends ServiceImpl<TCheckMobileMapper, TCh
if
(
Common
.
isNotEmpty
(
mobileList
)
&&
mobileList
.
size
()
>
CommonConstants
.
INTEGER_HUNDRED
){
if
(
Common
.
isNotEmpty
(
mobileList
)
&&
mobileList
.
size
()
>
CommonConstants
.
INTEGER_HUNDRED
){
return
R
.
failed
(
MsgUtils
.
getMessage
(
ErrorCodes
.
CHECKS_MOBILE_REQUEST_LIMIT_HUNDRED
));
return
R
.
failed
(
MsgUtils
.
getMessage
(
ErrorCodes
.
CHECKS_MOBILE_REQUEST_LIMIT_HUNDRED
));
}
}
mobileMapR
=
ChecksUtil
.
checkMobile
(
mobiles
);
mobileMapR
=
ChecksUtil
.
checkMobile
(
mobiles
,
canCheckService
.
getCanCheck
()
);
if
(
Common
.
isEmpty
(
mobileMapR
)
&&
Common
.
isEmpty
(
mobileMapR
.
getData
())){
if
(
Common
.
isEmpty
(
mobileMapR
)
&&
Common
.
isEmpty
(
mobileMapR
.
getData
())){
return
R
.
failed
(
MsgUtils
.
getMessage
(
ErrorCodes
.
CHECKS_MOBILE_REQUEST_ERROR
));
return
R
.
failed
(
MsgUtils
.
getMessage
(
ErrorCodes
.
CHECKS_MOBILE_REQUEST_ERROR
));
}
}
...
...
yifu-check/yifu-check-biz/src/main/resources/application-dev.yml
View file @
c8b53d80
...
@@ -28,4 +28,6 @@ security:
...
@@ -28,4 +28,6 @@ security:
-
/v3/api-docs
-
/v3/api-docs
-
/actuator/**
-
/actuator/**
-
/swagger-ui/**
-
/swagger-ui/**
-
/checkBankNo/**
-
/checkBankNo/**
\ No newline at end of file
# 创蓝云智校验配置
canCheck
:
true
\ No newline at end of file
yifu-check/yifu-check-biz/src/main/resources/mapper/TCanCheckMapper.xml
0 → 100644
View file @
c8b53d80
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yifu.cloud.plus.v1.check.mapper.TCanCheckMapper"
>
</mapper>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment