Authored by zhaoyue

Merge branch 'zhaoyue-dev4' into 'master'

ADD member pulse and breathrate



See merge request !48
... ... @@ -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);
}
... ...
... ... @@ -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;
}
}
... ...
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);
}
}
... ...