zhizhi wu 6 years ago
parent
commit
619f90b009
  1. 4
      health/src/main/java/com/ccsens/health/bean/dto/JourneyDto.java
  2. 1
      health/src/main/java/com/ccsens/health/service/AbnormalService.java
  3. 18
      health/src/main/java/com/ccsens/health/service/UserService.java
  4. 4
      health/src/main/resources/application.yml
  5. 4
      tall/src/main/resources/application.yml

4
health/src/main/java/com/ccsens/health/bean/dto/JourneyDto.java

@ -48,8 +48,8 @@ public class JourneyDto {
public static class SelectUser{
@ApiModelProperty("userId")
private Long userId;
@ApiModelProperty("token")
private String token;
// @ApiModelProperty("token")
// private String token;
@ApiModelProperty("开始时间 默认今天零点")
private Long startTime;
@ApiModelProperty("结束时间 默认当前时间")

1
health/src/main/java/com/ccsens/health/service/AbnormalService.java

@ -69,6 +69,7 @@ public class AbnormalService implements IAbnormalService{
HealthAbnormal healthAbnormal = new HealthAbnormal();
healthAbnormal.setId(snowflake.nextId());
BeanUtil.copyProperties(addAbnormal,healthAbnormal);
healthAbnormal.setHealthStatus((short) addAbnormal.getHealthType());
healthAbnormalDao.insertSelective(healthAbnormal);
AbnormalVo.AbnormalStatisticsVo abnormalStatisticsVo = new AbnormalVo.AbnormalStatisticsVo();

18
health/src/main/java/com/ccsens/health/service/UserService.java

@ -53,6 +53,7 @@ public class UserService implements IUserService{
/**
* 查询个人信息
*
* @param params
* @return
*/
@ -66,17 +67,17 @@ public class UserService implements IUserService{
if (ObjectUtil.isNotNull(selectUser.getUserId())) {
userId = selectUser.getUserId();
} else {
String id = tallFeignClient.getUserId(selectUser.getToken());
if(StrUtil.isNotEmpty(id)){
userId = Long.valueOf(id);
}
// String id = tallFeignClient.getUserId(selectUser.getToken());
// if(StrUtil.isNotEmpty(id)){
userId = params.getUserId();
// }
}
if (ObjectUtil.isNull(userId)) {
throw new BaseException(CodeEnum.NOT_EMPLOYEE);
}
//查询信息
UserVo.UserInfo userInfoVo = new UserVo.UserInfo();
UserVo.UserInfo userInfoVo = null;
RealNameAuthExample realNameAuthExample = new RealNameAuthExample();
realNameAuthExample.createCriteria().andUserIdEqualTo(userId);
List<RealNameAuth> realNameAuthList = realNameAuthDao.selectByExample(realNameAuthExample);
@ -84,7 +85,7 @@ public class UserService implements IUserService{
userInfoVo = new UserVo.UserInfo();
BeanUtil.copyProperties(realNameAuthList.get(0), userInfoVo);
// userInfoVo.setRealName(HealthConstant.REAL_NAME_YES);
}
// //判断是否为学校成员
// EmployeeExample newExample = new EmployeeExample();
// newExample.createCriteria().andTallUserIdEqualTo(userId);
@ -110,12 +111,13 @@ public class UserService implements IUserService{
}
}
userInfoVo.setHealthCodeList(healthCodeList);
}
return userInfoVo;
}
/**
* 保存个人信息
*
* @param params
* @return
*/
@ -199,6 +201,7 @@ public class UserService implements IUserService{
/**
* 绑定帐号
*
* @param sourceUserId 源userId
* @param targetUserId 替换的userId()
* @return
@ -243,6 +246,7 @@ public class UserService implements IUserService{
/**
* 查询个人轨迹
*
* @param params
* @return
*/

4
health/src/main/resources/application.yml

@ -1,4 +1,4 @@
spring:
profiles:
active: test
include: common, util-test
active: prod
include: common, util-prod

4
tall/src/main/resources/application.yml

@ -1,4 +1,4 @@
spring:
profiles:
active: prod
include: util-prod,common
active: dev
include: util-dev,common
Loading…
Cancel
Save