Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
pension
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
mengmeng
pension
Commits
d774347f
Commit
d774347f
authored
Mar 19, 2021
by
mlchun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.注册信息优化
parent
22eeac2a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
SwaggerConfig.java
hmit-api/src/main/java/io/hmit/config/SwaggerConfig.java
+1
-1
UserServiceImpl.java
...i/src/main/java/io/hmit/service/impl/UserServiceImpl.java
+15
-0
No files found.
hmit-api/src/main/java/io/hmit/config/SwaggerConfig.java
View file @
d774347f
...
@@ -27,7 +27,7 @@ public class SwaggerConfig {
...
@@ -27,7 +27,7 @@ public class SwaggerConfig {
@Bean
@Bean
public
Docket
createRestApi
()
{
public
Docket
createRestApi
()
{
return
new
Docket
(
DocumentationType
.
SWAGGER_2
)
return
new
Docket
(
DocumentationType
.
SWAGGER_2
)
//
.host("byyl.zjhmit.com")
.
host
(
"byyl.zjhmit.com"
)
.
apiInfo
(
apiInfo
())
.
apiInfo
(
apiInfo
())
.
select
()
.
select
()
//加了ApiOperation注解的类,才生成接口文档
//加了ApiOperation注解的类,才生成接口文档
...
...
hmit-api/src/main/java/io/hmit/service/impl/UserServiceImpl.java
View file @
d774347f
...
@@ -21,6 +21,8 @@ import org.apache.commons.codec.digest.DigestUtils;
...
@@ -21,6 +21,8 @@ import org.apache.commons.codec.digest.DigestUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -159,6 +161,19 @@ public class UserServiceImpl extends BaseServiceImpl<UserDao, UserEntity> implem
...
@@ -159,6 +161,19 @@ public class UserServiceImpl extends BaseServiceImpl<UserDao, UserEntity> implem
userEntity
.
setCreateDate
(
new
Date
());
userEntity
.
setCreateDate
(
new
Date
());
userEntity
.
setIdCardNo
(
dto
.
getIdCardNo
());
userEntity
.
setIdCardNo
(
dto
.
getIdCardNo
());
userEntity
.
setCommunityName
(
dto
.
getCommunityName
());
userEntity
.
setCommunityName
(
dto
.
getCommunityName
());
userEntity
.
setHealthStatus
(
"良好"
);
//TODO
String
year
=
dto
.
getIdCardNo
().
toString
().
substring
(
6
,
10
);
String
month
=
dto
.
getIdCardNo
().
toString
().
substring
(
10
,
12
);
String
day
=
dto
.
getIdCardNo
().
toString
().
substring
(
12
,
14
);
String
time
=
year
+
"-"
+
month
+
"-"
+
day
;
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
Date
date
=
new
Date
();
try
{
date
=
sdf
.
parse
(
time
);
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
}
userEntity
.
setBirthday
(
date
);
userEntity
.
setGender
(
Integer
.
parseInt
(
dto
.
getIdCardNo
().
toString
().
substring
(
16
,
17
))
%
2
==
1
?
"男"
:
"女"
);
userEntity
.
setGender
(
Integer
.
parseInt
(
dto
.
getIdCardNo
().
toString
().
substring
(
16
,
17
))
%
2
==
1
?
"男"
:
"女"
);
userEntity
.
setOpenid
(
dto
.
getOpenid
());
userEntity
.
setOpenid
(
dto
.
getOpenid
());
insert
(
userEntity
);
insert
(
userEntity
);
...
...
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