Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
map-parent
Overview
Overview
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
常超
map-parent
Commits
e5a1f2e0
Commit
e5a1f2e0
authored
Jul 02, 2022
by
yangyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
西藏单点登录处理提交
parent
217234d8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
14 deletions
+29
-14
common/service_base/src/main/java/com/founder/servicebase/controller/SysUserController.java
+6
-1
service/publicapi/src/main/java/com/founder/publicapi/controller/SkInterface/GlgxInterface.java
+23
-13
No files found.
common/service_base/src/main/java/com/founder/servicebase/controller/SysUserController.java
View file @
e5a1f2e0
package
com
.
founder
.
servicebase
.
controller
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.api.ApiController
;
import
com.founder.commonutils.model.newPublicEntity.MapRestResult
;
...
...
@@ -98,7 +99,11 @@ public class SysUserController extends ApiController {
String
IV
=
"map_vues"
+
today
;
// 用于api测试接口
if
(
"text"
.
equals
(
user
.
getIdentitycard
())){
user
.
setIdentitycard
(
AesEncryptUtil
.
encrypt
(
"430000000000000000"
,
KEY
,
IV
).
trim
());
// 从库中取一个身份证 进行单点登录用于测试接口是否通
SysUser
one
=
sysUserService
.
getOne
(
new
LambdaQueryWrapper
<
SysUser
>()
.
eq
(
SysUser
::
getScbz
,
"0"
)
.
last
(
"limit 1"
));
user
.
setIdentitycard
(
AesEncryptUtil
.
encrypt
(
one
.
getIdentitycard
(),
KEY
,
IV
).
trim
());
}
String
identityCard
=
desEncrypt
(
user
.
getIdentitycard
(),
KEY
,
IV
).
trim
();
QueryWrapper
queryWrapper
=
new
QueryWrapper
();
...
...
service/publicapi/src/main/java/com/founder/publicapi/controller/SkInterface/GlgxInterface.java
View file @
e5a1f2e0
package
com
.
founder
.
publicapi
.
controller
.
SkInterface
;
import
cn.hutool.json.JSONObject
;
import
com.alibaba.fastjson.JSON
;
import
com.founder.commonutils.model.newPublicEntity.Car
;
import
com.founder.commonutils.model.newPublicEntity.MapRestResult
;
import
com.founder.commonutils.model.newPublicEntity.PeopleInfo
;
import
com.founder.commonutils.model.newPublicEntity.Phone
;
import
com.founder.commonutils.model.vo.response.SkRelatedResultVO
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.data.mongodb.core.MongoTemplate
;
...
...
@@ -15,6 +15,7 @@ import org.springframework.stereotype.Service;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
@Service
...
...
@@ -72,10 +73,13 @@ public class GlgxInterface {
peopleInfo
.
setChildren
(
peopleInfos
);
// 返回结果数据 与前端一致
map
.
put
(
"result"
,
JSON
.
toJSONString
(
peopleInfo
));
map
.
put
(
"objecttype"
,
objectType
);
map
.
put
(
"objectvalue"
,
objectValue
);
return
MapRestResult
.
build
(
200
,
"成功获取身份信息!"
,
1
,
map
);
List
<
SkRelatedResultVO
>
newList
=
new
ArrayList
<>();
SkRelatedResultVO
skRelatedResultVO
=
new
SkRelatedResultVO
();
skRelatedResultVO
.
setObjecttype
(
objectType
);
skRelatedResultVO
.
setObjectvalue
(
objectValue
);
skRelatedResultVO
.
setResult
(
JSON
.
toJSONString
(
peopleInfo
));
newList
.
add
(
skRelatedResultVO
);
return
MapRestResult
.
build
(
200
,
"成功获取身份信息!"
,
1
,
newList
);
}
else
if
(
objectType
.
equals
(
"03"
)){
//手机号能够了查到身份证号还有车牌号
Query
query
=
new
Query
();
...
...
@@ -116,10 +120,13 @@ public class GlgxInterface {
peopleInfo
.
setChildren
(
peopleInfos
);
// 返回结果数据 与前端一致
map
.
put
(
"objecttype"
,
objectType
);
map
.
put
(
"objectvalue"
,
objectValue
);
map
.
put
(
"result"
,
JSON
.
toJSONString
(
peopleInfo
));
return
MapRestResult
.
build
(
200
,
"成功获取身份信息!"
,
1
,
map
);
List
<
SkRelatedResultVO
>
newList
=
new
ArrayList
<>();
SkRelatedResultVO
skRelatedResultVO
=
new
SkRelatedResultVO
();
skRelatedResultVO
.
setObjecttype
(
objectType
);
skRelatedResultVO
.
setObjectvalue
(
objectValue
);
skRelatedResultVO
.
setResult
(
JSON
.
toJSONString
(
peopleInfo
));
newList
.
add
(
skRelatedResultVO
);
return
MapRestResult
.
build
(
200
,
"成功获取身份信息!"
,
1
,
newList
);
}
else
if
(
objectType
.
equals
(
"02"
)){
//身份证号查询出来车牌号还有手机号
Query
query
=
new
Query
();
...
...
@@ -162,10 +169,13 @@ public class GlgxInterface {
self
.
setChildren
(
peopleInfos
);
// 返回结果数据 与前端一致
map
.
put
(
"objecttype"
,
objectType
);
map
.
put
(
"objectvalue"
,
objectValue
);
map
.
put
(
"result"
,
JSON
.
toJSONString
(
self
));
return
MapRestResult
.
build
(
200
,
"成功获取手机号码信息!"
,
1
,
map
);
List
<
SkRelatedResultVO
>
newList
=
new
ArrayList
<>();
SkRelatedResultVO
skRelatedResultVO
=
new
SkRelatedResultVO
();
skRelatedResultVO
.
setObjecttype
(
objectType
);
skRelatedResultVO
.
setObjectvalue
(
objectValue
);
skRelatedResultVO
.
setResult
(
JSON
.
toJSONString
(
self
));
newList
.
add
(
skRelatedResultVO
);
return
MapRestResult
.
build
(
200
,
"成功获取手机号码信息!"
,
1
,
newList
);
}
else
{
return
MapRestResult
.
error
(
"无法查询此标识号类型"
);
}
...
...
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