Browse Source

0324.5

master
zhangye 5 years ago
parent
commit
7ea7de839f
  1. 12
      cloudutil/src/main/java/com/ccsens/cloudutil/aspect/LogAspect.java
  2. 2
      health/src/main/java/com/ccsens/health/service/JourneyService.java
  3. 2
      health/src/main/java/com/ccsens/health/service/StudentService.java
  4. 4
      health/src/main/resources/application-common.yml
  5. 3
      health/src/main/resources/application-dev.yml
  6. 38
      health/src/main/resources/application-prod.yml
  7. 3
      health/src/main/resources/application-test.yml
  8. 4
      health/src/main/resources/application.yml
  9. 8
      health/src/main/resources/druid-prod.yml
  10. 5
      ht/src/main/java/com/ccsens/ht/service/PatientReportService.java
  11. 1
      ht/src/main/java/com/ccsens/ht/uitl/Constant.java
  12. 18
      tall/src/main/java/com/ccsens/tall/web/UserController.java
  13. 4
      tall/src/main/resources/application.yml

12
cloudutil/src/main/java/com/ccsens/cloudutil/aspect/LogAspect.java

@ -23,6 +23,8 @@ import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.Part;
import java.lang.reflect.Method;
import java.util.HashSet;
import java.util.Set;
/**
* @description:
@ -38,6 +40,12 @@ public class LogAspect {
@Autowired
private TallFeignClient tallFeignClient;
private Set<String> ignoreUrlSet = new HashSet<>();
{
ignoreUrlSet.add("/log/operation");
ignoreUrlSet.add("/users/token");
}
@Pointcut("execution(* com.ccsens.tall.web..*(..)) || execution(* com.ccsens.ht.api..*(..))")
public void logAdvice(){
@ -81,8 +89,8 @@ public class LogAspect {
HttpServletRequest request = ((ServletRequestAttributes)
RequestContextHolder.getRequestAttributes()).getRequest();
String url = request.getServletPath();
String logUrl = "/log/operation";
if (logUrl.equalsIgnoreCase(url)){
if (ignoreUrlSet.contains(url)){
log.info("保存日志,不进行记录");
return null;
}

2
health/src/main/java/com/ccsens/health/service/JourneyService.java

@ -26,6 +26,7 @@ import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
@ -49,6 +50,7 @@ public class JourneyService implements IJourneyService{
@Resource
private IStudentService studentService;
@Resource
@Lazy
private IAsyncService asyncService;
@Autowired
private JourneyAbnormalDao journeyAbnormalDao;

2
health/src/main/java/com/ccsens/health/service/StudentService.java

@ -16,6 +16,7 @@ import com.ccsens.util.bean.dto.QueryDto;
import com.ccsens.util.exception.BaseException;
import io.swagger.annotations.ApiModelProperty;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Lazy;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import org.springframework.transaction.PlatformTransactionManager;
@ -49,6 +50,7 @@ public class StudentService implements IStudentService{
@Resource
private RealNameAuthDao realNameAuthDao;
@Resource
@Lazy
private IAsyncService asyncService;
@Resource
private SiteClockInDao siteClockInDao;

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

@ -24,7 +24,5 @@ spring:
multipart:
max-file-size: 10MB
max-request-size: 100MB
snowflake:
datacenterId: 1
workerId: 1

3
health/src/main/resources/application-dev.yml

@ -3,6 +3,9 @@ server:
servlet:
context-path:
spring:
snowflake:
datacenterId: 1
workerId: 1
application:
name: health
datasource:

38
health/src/main/resources/application-prod.yml

@ -0,0 +1,38 @@
server:
port: 7081
servlet:
context-path:
spring:
snowflake:
datacenterId: 2
workerId: 2
application:
name: health
datasource:
type: com.alibaba.druid.pool.DruidDataSource
rabbitmq:
host: api.ccsens.com
password: 111111
port: 5672
username: admin
redis:
database: 0
host: 127.0.0.1
jedis:
pool:
max-active: 200
max-idle: 10
max-wait: -1ms
min-idle: 0
password: ''
port: 6379
timeout: 1000ms
swagger:
enable: false
eureka:
instance:
ip-address: 192.144.182.42
file:
path: /home/cloud/health/uploads/
domain: https://sd.tall.com/gateway/health/
imgDomain: https://sd.tall.com/gateway/health/uploads

3
health/src/main/resources/application-test.yml

@ -3,6 +3,9 @@ server:
servlet:
context-path:
spring:
snowflake:
datacenterId: 1
workerId: 1
application:
name: health
datasource:

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

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

8
health/src/main/resources/druid-prod.yml

@ -3,7 +3,7 @@ spring:
druid:
connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
driverClassName: com.mysql.cj.jdbc.Driver
dynamicUrl: jdbc:mysql://localhost:3306/${schema}
dynamicUrl: jdbc:mysql://api.ccsens.com:3306/${schema}
filterExclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*'
filterName: druidFilter
filterProfileEnable: true
@ -15,7 +15,7 @@ spring:
maxWait: 60000
minEvictableIdleTimeMillis: 300000
minIdle: 5
password:
password: 7cdefb88e0b8c8a401b66a83ee0cf80387461268074d1c3dcb146ab485318633
poolPreparedStatements: true
servletLogSlowSql: true
servletLoginPassword: 111111
@ -27,7 +27,7 @@ spring:
testOnReturn: false
testWhileIdle: true
timeBetweenEvictionRunsMillis: 60000
url: jdbc:mysql://127.0.0.1/health?useUnicode=true&characterEncoding=UTF-8
url: jdbc:mysql://api.ccsens.com/health?useUnicode=true&characterEncoding=UTF-8
username: root
validationQuery: SELECT 1 FROM DUAL
env: CCSENS_GAME
env: CCSENS_HEALTH

5
ht/src/main/java/com/ccsens/ht/service/PatientReportService.java

@ -89,6 +89,7 @@ public class PatientReportService implements IPatientReportService {
htPatientReport.setEvaluationCode(Constant.Ht.Report.PARENT_CODE);
htPatientReport.setName(Constant.Ht.Report.PARENT_NAME + DateUtil.today());
htPatientReport.setSerialNumber(htPatient.getId() + "_" + (times + 1));
htPatientReport.setReportTime(System.currentTimeMillis());
htPatientReportDao.insertSelective(htPatientReport);
log.info("生成病友报告单:{}", generate);
PatientReportVo.Generate generateVo = new PatientReportVo.Generate();
@ -343,6 +344,10 @@ public class PatientReportService implements IPatientReportService {
if (StringUtil.isNotEmpty(score.getRemark()) && score.getRemark().matches(Constant.Ht.Report.IGNORE_SCORE)) {
return score.getScore() == null ? null : 0;
}
if (Constant.Ht.Report.MOCA_SJZ.equals(score.getCode())) {
return 0;
}
return score.getScore();
}
if (hasAdd.get()) {

1
ht/src/main/java/com/ccsens/ht/uitl/Constant.java

@ -108,6 +108,7 @@ public class Constant {
public final static String PARENT_NAME = "认知功能神经心理量表检查报告单";
public final static Byte TYPE_EVALUATION = 2;
public final static String IGNORE_SCORE = "[个]";
public final static String MOCA_SJZ = "SZJ";
public final static Map<String, Byte> TYPE = new HashMap<>();
static {
//1:报告单 2:测评 3:测评子类 4:二级子类

18
tall/src/main/java/com/ccsens/tall/web/UserController.java

@ -380,15 +380,15 @@ public class UserController {
}catch(Exception e){
return JsonResponse.newInstance().ok(CodeEnum.NOT_LOGIN);
}
//验证用户存根
if(userService.tokenNotExistInCache(Long.valueOf(claims.getSubject()))){
return JsonResponse.newInstance().ok(CodeEnum.NOT_LOGIN);
}
//验证用户是否禁用
SysUser user = userService.getUserById(Long.valueOf(claims.getSubject()));
if(user.getRecStatus() == WebConstant.REC_STATUS.Disabled.value){
return JsonResponse.newInstance().ok(CodeEnum.NOT_LOGIN);
}
// //验证用户存根
// if(userService.tokenNotExistInCache(Long.valueOf(claims.getSubject()))){
// return JsonResponse.newInstance().ok(CodeEnum.NOT_LOGIN);
// }
// //验证用户是否禁用
// SysUser user = userService.getUserById(Long.valueOf(claims.getSubject()));
// if(user.getRecStatus() == WebConstant.REC_STATUS.Disabled.value){
// return JsonResponse.newInstance().ok(CodeEnum.NOT_LOGIN);
// }
tokenToUserId.setId(Long.valueOf(claims.getSubject()));

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

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