Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fangyeqing
/
xkl-interface
·
Commits
Go to a project
GitLab
Go to dashboard
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
zhaoyue
8 years ago
Commit
7022e3a890f0853996270dd60c1ded9325c8387c
1 parent
e1906c9a
ADD member pulse and breathrate
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
5 deletions
src/main/java/com/xkl/controller/qrcode/QRCodeController.java
src/main/java/com/xkl/model/UsrInfoModel.java
src/main/test/IPToolsTest.java
src/main/java/com/xkl/controller/qrcode/QRCodeController.java
View file @
7022e3a
...
...
@@ -74,7 +74,7 @@ public class QRCodeController {
if
(
user
==
null
)
{
//用户,密码错误
return
new
ResponseEntity
<>(
ResultModel
.
error
(
ResultStatus
.
USERNAME_OR_PASSWORD_ERROR
),
HttpStatus
.
OK
);
}
else
{
String
qrCode
=
qrCodeService
.
getQRCodeWithAccount
(
user
.
getLoginAccount
());
String
qrCode
=
qrCodeService
.
getQRCodeWithAccount
(
user
.
getLoginAccount
());
QrCodeModel
qrModel
=
new
QrCodeModel
(
qrCode
);
return
new
ResponseEntity
<>(
ResultModel
.
ok
(
qrModel
),
HttpStatus
.
OK
);
}
...
...
@@ -150,7 +150,8 @@ public class QRCodeController {
}
int
age
=
DatetimeTools
.
getAge
(
birthDate
,
new
Date
());
UsrInfoModel
usrInfo
=
new
UsrInfoModel
(
user
.
getLoginAccount
(),
xklMemberEntity
.
getName
(),
xklMemberEntity
.
getIdcard
(),
xklMemberEntity
.
getPhone
(),
xklMemberEntity
.
isSex
()
?
1
:
0
,
age
,
qrcode
,
genWebloginUrl
(
qrcode
));
xklMemberEntity
.
getIdcard
(),
xklMemberEntity
.
getPhone
(),
xklMemberEntity
.
isSex
()
?
1
:
0
,
age
,
xklMemberEntity
.
getCurPulse
(),
xklMemberEntity
.
getCurBreathrate
(),
qrcode
,
genWebloginUrl
(
qrcode
));
return
new
ResponseEntity
<>(
ResultModel
.
ok
(
usrInfo
),
HttpStatus
.
OK
);
}
...
...
src/main/java/com/xkl/model/UsrInfoModel.java
View file @
7022e3a
...
...
@@ -13,29 +13,36 @@ public class UsrInfoModel {
private
String
phone
;
private
int
sex
;
private
int
age
;
private
int
curPulse
;
private
int
curBreathrate
;
private
String
qrcode
;
private
String
webloginUrl
;
public
UsrInfoModel
(
String
account
,
String
name
,
String
id_cardnum
,
String
phone
,
int
sex
,
int
age
,
String
qrcode
,
String
webloginUrl
)
{
public
UsrInfoModel
(
String
account
,
String
name
,
String
id_cardnum
,
String
phone
,
int
sex
,
int
age
,
int
pulse
,
int
breathrate
,
String
qrcode
,
String
webloginUrl
)
{
this
.
account
=
account
;
this
.
name
=
name
;
this
.
id_cardnum
=
id_cardnum
;
this
.
phone
=
phone
;
this
.
sex
=
sex
;
this
.
age
=
age
;
this
.
curPulse
=
pulse
;
this
.
curBreathrate
=
breathrate
;
this
.
qrcode
=
qrcode
;
this
.
webloginUrl
=
webloginUrl
;
}
public
UsrInfoModel
(
String
account
,
String
name
,
String
id_cardnum
,
String
phone
,
int
sex
,
int
age
,
String
qrcode
)
{
public
UsrInfoModel
(
String
account
,
String
name
,
String
id_cardnum
,
String
phone
,
int
sex
,
int
age
,
int
pulse
,
int
breathrate
,
String
qrcode
)
{
this
.
account
=
account
;
this
.
name
=
name
;
this
.
id_cardnum
=
id_cardnum
;
this
.
phone
=
phone
;
this
.
sex
=
sex
;
this
.
age
=
age
;
this
.
curPulse
=
pulse
;
this
.
curBreathrate
=
breathrate
;
this
.
qrcode
=
qrcode
;
}
public
String
getAccount
()
{
return
account
;
}
...
...
@@ -99,4 +106,20 @@ public class UsrInfoModel {
public
void
setWebloginUrl
(
String
webloginUrl
)
{
this
.
webloginUrl
=
webloginUrl
;
}
public
int
getCurPulse
()
{
return
curPulse
;
}
public
void
setCurPulse
(
int
curPulse
)
{
this
.
curPulse
=
curPulse
;
}
public
int
getCurBreathrate
()
{
return
curBreathrate
;
}
public
void
setCurBreathrate
(
int
curBreathrate
)
{
this
.
curBreathrate
=
curBreathrate
;
}
}
...
...
src/main/test/IPToolsTest.java
View file @
7022e3a
package
PACKAGE_NAME
;
import
com.xkl.domain.Location
;
import
com.xkl.tools.IPTools
;
import
org.junit.Test
;
/**
* Created by zhaoyue on 2017/4/15.
*/
public
class
IPToolsTest
{
@Test
public
void
testGetIPLocation
()
{
Location
location
=
IPTools
.
getLocationWithIP
(
"111.39.32.104"
);
System
.
out
.
println
(
location
);
}
}
...
...
Please
register
or
login
to post a comment