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{ public static class SelectUser{
@ApiModelProperty("userId") @ApiModelProperty("userId")
private Long userId; private Long userId;
@ApiModelProperty("token") // @ApiModelProperty("token")
private String token; // private String token;
@ApiModelProperty("开始时间 默认今天零点") @ApiModelProperty("开始时间 默认今天零点")
private Long startTime; private Long startTime;
@ApiModelProperty("结束时间 默认当前时间") @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 healthAbnormal = new HealthAbnormal();
healthAbnormal.setId(snowflake.nextId()); healthAbnormal.setId(snowflake.nextId());
BeanUtil.copyProperties(addAbnormal,healthAbnormal); BeanUtil.copyProperties(addAbnormal,healthAbnormal);
healthAbnormal.setHealthStatus((short) addAbnormal.getHealthType());
healthAbnormalDao.insertSelective(healthAbnormal); healthAbnormalDao.insertSelective(healthAbnormal);
AbnormalVo.AbnormalStatisticsVo abnormalStatisticsVo = new AbnormalVo.AbnormalStatisticsVo(); 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 * @param params
* @return * @return
*/ */
@ -66,17 +67,17 @@ public class UserService implements IUserService{
if (ObjectUtil.isNotNull(selectUser.getUserId())) { if (ObjectUtil.isNotNull(selectUser.getUserId())) {
userId = selectUser.getUserId(); userId = selectUser.getUserId();
} else { } else {
String id = tallFeignClient.getUserId(selectUser.getToken()); // String id = tallFeignClient.getUserId(selectUser.getToken());
if(StrUtil.isNotEmpty(id)){ // if(StrUtil.isNotEmpty(id)){
userId = Long.valueOf(id); userId = params.getUserId();
} // }
} }
if (ObjectUtil.isNull(userId)) { if (ObjectUtil.isNull(userId)) {
throw new BaseException(CodeEnum.NOT_EMPLOYEE); throw new BaseException(CodeEnum.NOT_EMPLOYEE);
} }
//查询信息 //查询信息
UserVo.UserInfo userInfoVo = new UserVo.UserInfo(); UserVo.UserInfo userInfoVo = null;
RealNameAuthExample realNameAuthExample = new RealNameAuthExample(); RealNameAuthExample realNameAuthExample = new RealNameAuthExample();
realNameAuthExample.createCriteria().andUserIdEqualTo(userId); realNameAuthExample.createCriteria().andUserIdEqualTo(userId);
List<RealNameAuth> realNameAuthList = realNameAuthDao.selectByExample(realNameAuthExample); List<RealNameAuth> realNameAuthList = realNameAuthDao.selectByExample(realNameAuthExample);
@ -84,7 +85,7 @@ public class UserService implements IUserService{
userInfoVo = new UserVo.UserInfo(); userInfoVo = new UserVo.UserInfo();
BeanUtil.copyProperties(realNameAuthList.get(0), userInfoVo); BeanUtil.copyProperties(realNameAuthList.get(0), userInfoVo);
// userInfoVo.setRealName(HealthConstant.REAL_NAME_YES); // userInfoVo.setRealName(HealthConstant.REAL_NAME_YES);
}
// //判断是否为学校成员 // //判断是否为学校成员
// EmployeeExample newExample = new EmployeeExample(); // EmployeeExample newExample = new EmployeeExample();
// newExample.createCriteria().andTallUserIdEqualTo(userId); // newExample.createCriteria().andTallUserIdEqualTo(userId);
@ -110,12 +111,13 @@ public class UserService implements IUserService{
} }
} }
userInfoVo.setHealthCodeList(healthCodeList); userInfoVo.setHealthCodeList(healthCodeList);
}
return userInfoVo; return userInfoVo;
} }
/** /**
* 保存个人信息 * 保存个人信息
*
* @param params * @param params
* @return * @return
*/ */
@ -199,6 +201,7 @@ public class UserService implements IUserService{
/** /**
* 绑定帐号 * 绑定帐号
*
* @param sourceUserId 源userId * @param sourceUserId 源userId
* @param targetUserId 替换的userId() * @param targetUserId 替换的userId()
* @return * @return
@ -243,6 +246,7 @@ public class UserService implements IUserService{
/** /**
* 查询个人轨迹 * 查询个人轨迹
*
* @param params * @param params
* @return * @return
*/ */

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

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

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

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