Authored by zhaoyue

Merge branch 'zhaoyue-dev4' into 'master'

ADD member pulse and breathrate



See merge request !48
@@ -74,7 +74,7 @@ public class QRCodeController { @@ -74,7 +74,7 @@ public class QRCodeController {
74 if (user == null) {//用户,密码错误 74 if (user == null) {//用户,密码错误
75 return new ResponseEntity<>(ResultModel.error(ResultStatus.USERNAME_OR_PASSWORD_ERROR), HttpStatus.OK); 75 return new ResponseEntity<>(ResultModel.error(ResultStatus.USERNAME_OR_PASSWORD_ERROR), HttpStatus.OK);
76 } else { 76 } else {
77 - String qrCode = qrCodeService.getQRCodeWithAccount(user.getLoginAccount()); 77 + String qrCode = qrCodeService.getQRCodeWithAccount(user.getLoginAccount());
78 QrCodeModel qrModel = new QrCodeModel(qrCode); 78 QrCodeModel qrModel = new QrCodeModel(qrCode);
79 return new ResponseEntity<>(ResultModel.ok(qrModel), HttpStatus.OK); 79 return new ResponseEntity<>(ResultModel.ok(qrModel), HttpStatus.OK);
80 } 80 }
@@ -150,7 +150,8 @@ public class QRCodeController { @@ -150,7 +150,8 @@ public class QRCodeController {
150 } 150 }
151 int age = DatetimeTools.getAge(birthDate, new Date()); 151 int age = DatetimeTools.getAge(birthDate, new Date());
152 UsrInfoModel usrInfo = new UsrInfoModel(user.getLoginAccount(), xklMemberEntity.getName(), 152 UsrInfoModel usrInfo = new UsrInfoModel(user.getLoginAccount(), xklMemberEntity.getName(),
153 - xklMemberEntity.getIdcard(), xklMemberEntity.getPhone(), xklMemberEntity.isSex() ? 1 : 0, age, qrcode, genWebloginUrl(qrcode)); 153 + xklMemberEntity.getIdcard(), xklMemberEntity.getPhone(), xklMemberEntity.isSex() ? 1 : 0, age,
  154 + xklMemberEntity.getCurPulse(), xklMemberEntity.getCurBreathrate(), qrcode, genWebloginUrl(qrcode));
154 return new ResponseEntity<>(ResultModel.ok(usrInfo), HttpStatus.OK); 155 return new ResponseEntity<>(ResultModel.ok(usrInfo), HttpStatus.OK);
155 } 156 }
156 157
@@ -13,29 +13,36 @@ public class UsrInfoModel { @@ -13,29 +13,36 @@ public class UsrInfoModel {
13 private String phone; 13 private String phone;
14 private int sex; 14 private int sex;
15 private int age; 15 private int age;
  16 + private int curPulse;
  17 + private int curBreathrate;
16 private String qrcode; 18 private String qrcode;
17 private String webloginUrl; 19 private String webloginUrl;
18 20
19 - public UsrInfoModel(String account, String name, String id_cardnum, String phone, int sex, int age, String qrcode,String webloginUrl) { 21 + public UsrInfoModel(String account, String name, String id_cardnum, String phone, int sex, int age, int pulse, int breathrate, String qrcode, String webloginUrl) {
20 this.account = account; 22 this.account = account;
21 this.name = name; 23 this.name = name;
22 this.id_cardnum = id_cardnum; 24 this.id_cardnum = id_cardnum;
23 this.phone = phone; 25 this.phone = phone;
24 this.sex = sex; 26 this.sex = sex;
25 this.age = age; 27 this.age = age;
  28 + this.curPulse = pulse;
  29 + this.curBreathrate = breathrate;
26 this.qrcode = qrcode; 30 this.qrcode = qrcode;
27 this.webloginUrl = webloginUrl; 31 this.webloginUrl = webloginUrl;
28 } 32 }
29 33
30 - public UsrInfoModel(String account, String name, String id_cardnum, String phone, int sex, int age, String qrcode) { 34 + public UsrInfoModel(String account, String name, String id_cardnum, String phone, int sex, int age, int pulse, int breathrate, String qrcode) {
31 this.account = account; 35 this.account = account;
32 this.name = name; 36 this.name = name;
33 this.id_cardnum = id_cardnum; 37 this.id_cardnum = id_cardnum;
34 this.phone = phone; 38 this.phone = phone;
35 this.sex = sex; 39 this.sex = sex;
36 this.age = age; 40 this.age = age;
  41 + this.curPulse = pulse;
  42 + this.curBreathrate = breathrate;
37 this.qrcode = qrcode; 43 this.qrcode = qrcode;
38 } 44 }
  45 +
39 public String getAccount() { 46 public String getAccount() {
40 return account; 47 return account;
41 } 48 }
@@ -99,4 +106,20 @@ public class UsrInfoModel { @@ -99,4 +106,20 @@ public class UsrInfoModel {
99 public void setWebloginUrl(String webloginUrl) { 106 public void setWebloginUrl(String webloginUrl) {
100 this.webloginUrl = webloginUrl; 107 this.webloginUrl = webloginUrl;
101 } 108 }
  109 +
  110 + public int getCurPulse() {
  111 + return curPulse;
  112 + }
  113 +
  114 + public void setCurPulse(int curPulse) {
  115 + this.curPulse = curPulse;
  116 + }
  117 +
  118 + public int getCurBreathrate() {
  119 + return curBreathrate;
  120 + }
  121 +
  122 + public void setCurBreathrate(int curBreathrate) {
  123 + this.curBreathrate = curBreathrate;
  124 + }
102 } 125 }
1 -package PACKAGE_NAME; 1 +import com.xkl.domain.Location;
  2 +import com.xkl.tools.IPTools;
  3 +import org.junit.Test;
2 4
3 /** 5 /**
4 * Created by zhaoyue on 2017/4/15. 6 * Created by zhaoyue on 2017/4/15.
5 */ 7 */
6 public class IPToolsTest { 8 public class IPToolsTest {
  9 +
  10 + @Test
  11 + public void testGetIPLocation() {
  12 + Location location = IPTools.getLocationWithIP("111.39.32.104");
  13 + System.out.println(location);
  14 + }
7 } 15 }