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
4778f8f0
Commit
4778f8f0
authored
Jul 27, 2019
by
hanfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改实名认证
parent
c7ee4031
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
41 additions
and
20 deletions
+41
-20
AppVersion.java
...rc/main/java/com/xxfc/platform/app/entity/AppVersion.java
+2
-1
AppVersionBiz.java
...rc/main/java/com/xxfc/platform/app/biz/AppVersionBiz.java
+25
-9
AppVersionMapper.xml
...app-server/src/main/resources/mapper/AppVersionMapper.xml
+2
-2
IdInformation.java
...ava/com/xxfc/platform/universal/entity/IdInformation.java
+5
-5
CertificationController.java
...latform/universal/controller/CertificationController.java
+6
-3
CertificationService.java
...xxfc/platform/universal/service/CertificationService.java
+1
-0
No files found.
xx-app/xx-app-api/src/main/java/com/xxfc/platform/app/entity/AppVersion.java
View file @
4778f8f0
package
com
.
xxfc
.
platform
.
app
.
entity
;
package
com
.
xxfc
.
platform
.
app
.
entity
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.math.BigInteger
;
import
javax.persistence.*
;
import
javax.persistence.*
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -94,7 +95,7 @@ public class AppVersion implements Serializable {
...
@@ -94,7 +95,7 @@ public class AppVersion implements Serializable {
*/
*/
@Column
(
name
=
"crt_time"
)
@Column
(
name
=
"crt_time"
)
@ApiModelProperty
(
value
=
"版本上传时间"
,
hidden
=
true
)
@ApiModelProperty
(
value
=
"版本上传时间"
,
hidden
=
true
)
private
Long
crtTime
;
private
BigInteger
crtTime
;
/**
/**
* 是否删除;0-正常;1-删除
* 是否删除;0-正常;1-删除
...
...
xx-app/xx-app-server/src/main/java/com/xxfc/platform/app/biz/AppVersionBiz.java
View file @
4778f8f0
...
@@ -5,12 +5,15 @@ import com.github.pagehelper.PageInfo;
...
@@ -5,12 +5,15 @@ import com.github.pagehelper.PageInfo;
import
com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken
;
import
com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken
;
import
com.github.wxiaoqi.security.common.constant.RestCode
;
import
com.github.wxiaoqi.security.common.constant.RestCode
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.util.EntityUtils
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.github.wxiaoqi.security.common.util.process.SystemConfig
;
import
com.github.wxiaoqi.security.common.util.process.SystemConfig
;
import
com.xxfc.platform.app.vo.appVersionQuery
;
import
com.xxfc.platform.app.vo.appVersionQuery
;
import
com.xxfc.platform.vehicle.common.RestResponse
;
import
com.xxfc.platform.vehicle.common.RestResponse
;
import
com.xxfc.platform.vehicle.constant.RedisKey
;
import
com.xxfc.platform.vehicle.constant.RedisKey
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.log4j.Log4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.io.FileUtils
;
import
org.apache.commons.io.FileUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.ibatis.session.RowBounds
;
import
org.apache.ibatis.session.RowBounds
;
...
@@ -38,6 +41,7 @@ import tk.mybatis.mapper.weekend.WeekendSqls;
...
@@ -38,6 +41,7 @@ import tk.mybatis.mapper.weekend.WeekendSqls;
import
java.io.File
;
import
java.io.File
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.math.BigInteger
;
import
java.util.List
;
import
java.util.List
;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.TimeUnit
;
...
@@ -49,6 +53,7 @@ import java.util.concurrent.TimeUnit;
...
@@ -49,6 +53,7 @@ import java.util.concurrent.TimeUnit;
* @date 2019-06-24 10:34:00
* @date 2019-06-24 10:34:00
*/
*/
@Service
@Service
@Slf4j
public
class
AppVersionBiz
extends
BaseBiz
<
AppVersionMapper
,
AppVersion
>
{
public
class
AppVersionBiz
extends
BaseBiz
<
AppVersionMapper
,
AppVersion
>
{
@Value
(
"${app.uploadPath}"
)
@Value
(
"${app.uploadPath}"
)
...
@@ -59,6 +64,7 @@ public class AppVersionBiz extends BaseBiz<AppVersionMapper,AppVersion> {
...
@@ -59,6 +64,7 @@ public class AppVersionBiz extends BaseBiz<AppVersionMapper,AppVersion> {
private
RedisTemplate
redisTemplate
;
private
RedisTemplate
redisTemplate
;
public
static
final
DateTimeFormatter
DEFAULT_DATE_TIME_FORMATTER
=
DateTimeFormat
.
forPattern
(
"yyyy-MM-dd"
);
public
static
final
DateTimeFormatter
DEFAULT_DATE_TIME_FORMATTER
=
DateTimeFormat
.
forPattern
(
"yyyy-MM-dd"
);
private
AppVersion
entity
;
public
ObjectRestResponse
getVersion
(
String
version
,
Integer
type
){
public
ObjectRestResponse
getVersion
(
String
version
,
Integer
type
){
...
@@ -125,9 +131,12 @@ public class AppVersionBiz extends BaseBiz<AppVersionMapper,AppVersion> {
...
@@ -125,9 +131,12 @@ public class AppVersionBiz extends BaseBiz<AppVersionMapper,AppVersion> {
*/
*/
public
ResponseEntity
<
byte
[]>
downloadInstallationPackage
(
String
realFileRelPath
)
throws
Exception
{
public
ResponseEntity
<
byte
[]>
downloadInstallationPackage
(
String
realFileRelPath
)
throws
Exception
{
String
filePath
=
uploadPath
+
realFileRelPath
;
String
filePath
=
uploadPath
+
realFileRelPath
;
File
file
=
new
File
(
filePath
);
//新建一个文件
//新建一个文件
HttpHeaders
headers
=
new
HttpHeaders
();
//http头信息
File
file
=
new
File
(
filePath
);
String
downloadFileName
=
new
String
(
file
.
getName
());
//设置编码
//http头信息
HttpHeaders
headers
=
new
HttpHeaders
();
//设置编码
String
downloadFileName
=
new
String
(
file
.
getName
());
headers
.
setContentDispositionFormData
(
"attachment"
,
downloadFileName
);
headers
.
setContentDispositionFormData
(
"attachment"
,
downloadFileName
);
headers
.
setContentType
(
MediaType
.
APPLICATION_OCTET_STREAM
);
headers
.
setContentType
(
MediaType
.
APPLICATION_OCTET_STREAM
);
return
new
ResponseEntity
<
byte
[]>(
FileUtils
.
readFileToByteArray
(
file
),
headers
,
HttpStatus
.
CREATED
);
return
new
ResponseEntity
<
byte
[]>(
FileUtils
.
readFileToByteArray
(
file
),
headers
,
HttpStatus
.
CREATED
);
...
@@ -137,11 +146,14 @@ public class AppVersionBiz extends BaseBiz<AppVersionMapper,AppVersion> {
...
@@ -137,11 +146,14 @@ public class AppVersionBiz extends BaseBiz<AppVersionMapper,AppVersion> {
* 添加版本信息
* 添加版本信息
* @param appVersion
* @param appVersion
*/
*/
@Transactional
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
insertAppVersion
(
AppVersion
appVersion
)
{
public
void
insertAppVersion
(
AppVersion
appVersion
)
{
appVersion
.
setDownloadSwitch
(
0
);
if
(
appVersion
.
getDownloadSwitch
()==
null
){
appVersion
.
setDownloadSwitch
(
1
);
}
insertSelective
(
appVersion
);
insertSelective
(
appVersion
);
}
}
public
AppVersion
get
(
Integer
id
)
{
public
AppVersion
get
(
Integer
id
)
{
if
(
id
==
null
)
{
if
(
id
==
null
)
{
throw
new
IllegalArgumentException
(
"Parameter is null"
);
throw
new
IllegalArgumentException
(
"Parameter is null"
);
...
@@ -164,17 +176,21 @@ public class AppVersionBiz extends BaseBiz<AppVersionMapper,AppVersion> {
...
@@ -164,17 +176,21 @@ public class AppVersionBiz extends BaseBiz<AppVersionMapper,AppVersion> {
*/
*/
public
void
remove
(
Integer
id
)
{
public
void
remove
(
Integer
id
)
{
AppVersion
appVersion
=
new
AppVersion
();
AppVersion
appVersion
=
new
AppVersion
();
appVersion
.
setId
(
id
);
appVersion
.
setIsDel
(
1
);
appVersion
.
setIsDel
(
1
);
Example
example
=
Example
.
builder
(
AppVersion
.
class
)
mapper
.
updateByPrimaryKeySelective
(
appVersion
);
.
where
(
WeekendSqls
.<
AppVersion
>
custom
().
andEqualTo
(
AppVersion:
:
getId
,
id
))
// mapper.updateByExampleSelective(appVersion,example);
.
build
();
mapper
.
updateByExampleSelective
(
appVersion
,
example
);
}
}
public
PageInfo
<
AppVersion
>
getAll
(
appVersionQuery
query
)
{
public
PageInfo
<
AppVersion
>
getAll
(
appVersionQuery
query
)
{
PageHelper
.
startPage
(
query
.
getPage
(),
query
.
getLimit
());
PageHelper
.
startPage
(
query
.
getPage
(),
query
.
getLimit
());
List
<
AppVersion
>
appVersionList
=
mapper
.
getAllByquery
(
query
);
List
<
AppVersion
>
appVersionList
=
mapper
.
getAllByquery
(
query
);
return
PageInfo
.
of
(
appVersionList
);
return
PageInfo
.
of
(
appVersionList
);
}
@Override
public
int
insertSelectiveRe
(
AppVersion
entity
)
{
entity
.
setCrtTime
(
BigInteger
.
valueOf
(
System
.
currentTimeMillis
()));
return
mapper
.
insertSelective
(
entity
);
}
}
}
}
\ No newline at end of file
xx-app/xx-app-server/src/main/resources/mapper/AppVersionMapper.xml
View file @
4778f8f0
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<select
id=
"getAllByquery"
parameterType=
"com.xxfc.platform.app.vo.appVersionQuery"
<select
id=
"getAllByquery"
parameterType=
"com.xxfc.platform.app.vo.appVersionQuery"
resultType=
"com.xxfc.platform.app.entity.AppVersion"
>
resultType=
"com.xxfc.platform.app.entity.AppVersion"
>
select * from app_version
select * from app_version
where
1=1
where
is_del=0
<if
test=
"versionName !=null and versionName != ''"
>
<if
test=
"versionName !=null and versionName != ''"
>
and version_name like concat('%',#{versionName},'%')
and version_name like concat('%',#{versionName},'%')
</if>
</if>
...
@@ -19,6 +19,6 @@
...
@@ -19,6 +19,6 @@
<if
test=
"content != null and content != ''"
>
<if
test=
"content != null and content != ''"
>
and content like concat('%',#{content},'%')
and content like concat('%',#{content},'%')
</if>
</if>
order by crt_time desc
</select>
</select>
</mapper>
</mapper>
\ No newline at end of file
xx-universal/xx-universal-api/src/main/java/com/xxfc/platform/universal/entity/IdInformation.java
View file @
4778f8f0
...
@@ -79,11 +79,11 @@ public class IdInformation implements Serializable {
...
@@ -79,11 +79,11 @@ public class IdInformation implements Serializable {
@JsonFormat
(
pattern
=
"yyyyMMdd"
,
timezone
=
"GMT+8"
)
@JsonFormat
(
pattern
=
"yyyyMMdd"
,
timezone
=
"GMT+8"
)
private
Date
expirationDate
;
private
Date
expirationDate
;
/**
//
/**
* 认证方式
//
* 认证方式
*/
//
*/
@Column
(
name
=
"authentication_methods"
)
//
@Column(name = "authentication_methods")
private
Integer
authenticationMethods
;
//
private Integer authenticationMethods;
/**
/**
*创建时间
*创建时间
...
...
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/controller/CertificationController.java
View file @
4778f8f0
...
@@ -48,9 +48,12 @@ public class CertificationController {
...
@@ -48,9 +48,12 @@ public class CertificationController {
MQServiceBiZ
mqServiceBiZ
;
MQServiceBiZ
mqServiceBiZ
;
/**
* 实名认证
* @param idInformation
* @param request
* @return
*/
@PostMapping
(
"/app/certificate"
)
@PostMapping
(
"/app/certificate"
)
public
ObjectRestResponse
certificate
(
@RequestBody
IdInformation
idInformation
,
HttpServletRequest
request
)
{
public
ObjectRestResponse
certificate
(
@RequestBody
IdInformation
idInformation
,
HttpServletRequest
request
)
{
...
...
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/service/CertificationService.java
View file @
4778f8f0
...
@@ -406,6 +406,7 @@ public class CertificationService {
...
@@ -406,6 +406,7 @@ public class CertificationService {
Example
exa
=
new
Example
(
IdInformation
.
class
);
Example
exa
=
new
Example
(
IdInformation
.
class
);
Example
.
Criteria
criteria
=
exa
.
createCriteria
();
Example
.
Criteria
criteria
=
exa
.
createCriteria
();
criteria
.
andEqualTo
(
"idNumber"
,
idInformation
.
getIdNumber
());
criteria
.
andEqualTo
(
"idNumber"
,
idInformation
.
getIdNumber
());
criteria
.
andEqualTo
(
"userLonginId"
,
idInformation
.
getUserLonginId
());
List
<
IdInformation
>
idInformations
=
idInformationMapper
.
selectByExample
(
exa
);
List
<
IdInformation
>
idInformations
=
idInformationMapper
.
selectByExample
(
exa
);
if
(
CollectionUtils
.
isEmpty
(
idInformations
))
{
if
(
CollectionUtils
.
isEmpty
(
idInformations
))
{
idInformation
.
setCrtTime
(
new
Date
());
idInformation
.
setCrtTime
(
new
Date
());
...
...
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