Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
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
youjj
cloud-platform
Commits
e4f7eafb
Commit
e4f7eafb
authored
Jun 11, 2019
by
youjj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改实名认证和旅游线路标签
parent
e0c44221
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
52 deletions
+32
-52
TourTagBiz.java
.../src/main/java/com/xxfc/platform/tour/biz/TourTagBiz.java
+1
-1
TourTagController.java
...n/java/com/xxfc/platform/tour/rest/TourTagController.java
+1
-1
CertifHttpUtils.java
...va/com/xxfc/platform/universal/utils/CertifHttpUtils.java
+1
-1
CertificationController.java
...latform/universal/controller/CertificationController.java
+21
-45
CertificationService.java
...xxfc/platform/universal/service/CertificationService.java
+8
-4
No files found.
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/biz/TourTagBiz.java
View file @
e4f7eafb
...
...
@@ -48,7 +48,7 @@ public class TourTagBiz extends BaseBiz<TourTagMapper,TourTag> {
public
PageDataVO
<
TourTag
>
find
All
(
Map
map
)
{
public
PageDataVO
<
TourTag
>
find
Page
(
Map
map
)
{
TourTag
tag
=
new
TourTag
();
tag
.
setIsDel
(
0
);
return
PageDataVO
.
pageInfo
((
Integer
)
map
.
get
(
"page"
),(
Integer
)
map
.
get
(
"limit"
),()
->
mapper
.
findAllByIsDel
(
tag
));
...
...
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/rest/TourTagController.java
View file @
e4f7eafb
...
...
@@ -39,7 +39,7 @@ public class TourTagController extends BaseController<TourTagBiz,TourTag> {
}
PageDataVO
<
TourTag
>
all
=
tagBiz
.
find
All
(
BeanUtil
.
beanToMap
(
dto
));
PageDataVO
<
TourTag
>
all
=
tagBiz
.
find
Page
(
BeanUtil
.
beanToMap
(
dto
));
return
ObjectRestResponse
.
succ
(
all
);
...
...
xx-universal/xx-universal-api/src/main/java/com/xxfc/platform/universal/utils/CertifHttpUtils.java
View file @
e4f7eafb
package
com
.
xxfc
.
platform
.
universal
.
utils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang
3
.StringUtils
;
import
org.apache.http.HttpResponse
;
import
org.apache.http.NameValuePair
;
import
org.apache.http.client.HttpClient
;
...
...
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/controller/CertificationController.java
View file @
e4f7eafb
...
...
@@ -3,7 +3,7 @@ package com.xxfc.platform.universal.controller;
import
com.alibaba.druid.util.StringUtils
;
import
com.github.wxiaoqi.security.admin.feign.UserFeign
;
import
com.github.wxiaoqi.security.admin.feign.dto.UserDTO
;
import
com.github.wxiaoqi.security.admin.feign.dto.
App
UserDTO
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.xxfc.platform.universal.entity.IdInformation
;
...
...
@@ -44,24 +44,28 @@ public class CertificationController {
String
token
=
request
.
getHeader
(
"Authorization"
);
System
.
out
.
println
(
token
);
if
(
StringUtils
.
isEmpty
(
token
))
{
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
RSTOKEN_NULL_CODE
,
"token为空"
);
}
//获得用户信息
ObjectRestResponse
<
UserDTO
>
userDTOObjectRestResponse
=
userFeign
.
userinfo
ByToken
(
token
);
ObjectRestResponse
<
AppUserDTO
>
appUserDTOObjectRestResponse
=
userFeign
.
userDetail
ByToken
(
token
);
if
(
userDTOObjectRestResponse
==
null
||
userDTOObjectRestResponse
.
getData
()==
null
||
userDTOObjectRestResponse
.
getData
().
getId
()==
0
)
{
System
.
out
.
println
(
appUserDTOObjectRestResponse
.
getData
());
if
(
appUserDTOObjectRestResponse
==
null
||
appUserDTOObjectRestResponse
.
getData
()==
null
||
appUserDTOObjectRestResponse
.
getData
().
getId
()==
0
)
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
GET_APPUSER_FAILED_CODE
,
"获取用户失败"
);
}
UserDTO
userDTO
=
userDTOObjectRestResponse
.
getData
();
AppUserDTO
appUserDTO
=
appUserDTOObjectRestResponse
.
getData
();
idInformation
.
setUserLonginId
(
userDTO
.
getI
d
());
idInformation
.
setUserLonginId
(
appUserDTO
.
getUseri
d
());
//获取用户认证信息
...
...
@@ -79,49 +83,21 @@ public class CertificationController {
Integer
type
=
idInformation
.
getCertificateType
();
if
(
type
==
0
||
am
==
0
){
return
certificationService
.
stringCertificate
(
idInformation
);
}
try
{
if
(
type
==
0
&&
am
==
0
){
return
certificationService
.
stringCertificate
(
idInformation
);
}
if
(
type
==
0
||
am
==
1
){
return
certificationService
.
imageCertificate
(
idInformation
);
if
(
type
==
0
&&
am
==
1
){
return
certificationService
.
imageCertificate
(
idInformation
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
SUCCESS_CODE
,
"该证件件或方式,暂时不能进行实名认证
"
);
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
SUCCESS_CODE
,
"错误
"
);
}
//
// //请求参数jsone对象后台Map接收
// //字段
// // frontImage:正面身份证照片地址,
// // backImage:反面身份证照片地址
// @PostMapping("/image")
// public ObjectRestResponse imageCertificate(@RequestBody IdInformation idInformation, HttpServletRequest request) {
//
//
// String token = request.getHeader("Authorization");
// Integer uid = certificationService.getUid(token);
//
// idInformation.setUserLonginId(uid);
//
// Map resultMap= certificationService.imageCertificate(idInformation);
// ObjectRestResponse orr = new ObjectRestResponse().rel((Boolean) resultMap.get("rel"));
//
// if (!(Boolean) resultMap.get("rel")){
// return (ObjectRestResponse) orr.data(resultMap.get("data")).msg("FAILED").status(ResultCode.FAILED_CODE);
//
// }
// return orr;
// }
}
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/service/CertificationService.java
View file @
e4f7eafb
...
...
@@ -367,7 +367,10 @@ public class CertificationService {
StatusLine
statusLine
=
response
.
getStatusLine
();
int
statusCode
=
statusLine
.
getStatusCode
();
//状态码: 200 正常;400 URL无效;401 appCode错误; 403 次数用完; 500 API网管错误
/**
* 状态码: 200 正常;400 URL无效;401 appCode错误; 403 次数用完; 500 API网管错误
*/
//获取response的body
if
(
statusCode
==
200
)
{
return
EntityUtils
.
toString
(
response
.
getEntity
());
...
...
@@ -410,8 +413,9 @@ public class CertificationService {
int
statusCode
=
statusLine
.
getStatusCode
();
System
.
out
.
println
(
statusCode
);
//状态码: 200 正常;400 URL无效;401 appCode错误; 403 次数用完; 500 API网管错误
/**
* 状态码: 200 正常;400 URL无效;401 appCode错误; 403 次数用完; 500 API网管错误
*/
//获取response的body
if
(
statusCode
==
200
)
{
return
EntityUtils
.
toString
(
response
.
getEntity
());
...
...
@@ -437,7 +441,7 @@ public class CertificationService {
//保存认证信息
try
{
idInformationMapper
.
addIdInformation
(
idInformation
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
return
false
;
}
...
...
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