Browse Source

is_del

master
6 years ago
parent
commit
83470cc1b0
  1. 10
      cloudutil/src/main/java/com/ccsens/cloudutil/aspect/LogAspect.java
  2. 4
      cloudutil/src/main/java/com/ccsens/cloudutil/bean/tall/dto/MemberRoleDto.java
  3. 2
      ht/src/main/java/com/ccsens/ht/api/DoctorController.java
  4. 11
      ht/src/main/java/com/ccsens/ht/aspect/DoctorAuditAspect.java
  5. 13
      ht/src/main/java/com/ccsens/ht/aspect/MustLoginAspect.java
  6. 20
      ht/src/main/java/com/ccsens/ht/bean/BeanConfig.java
  7. 29
      ht/src/main/java/com/ccsens/ht/bean/dto/DoctorDto.java
  8. 17
      ht/src/main/java/com/ccsens/ht/bean/dto/PatientDto.java
  9. 31
      ht/src/main/java/com/ccsens/ht/bean/dto/PatientReportDto.java
  10. 2
      ht/src/main/java/com/ccsens/ht/bean/dto/PositionDto.java
  11. 21
      ht/src/main/java/com/ccsens/ht/bean/dto/QuestionDto.java
  12. 4
      ht/src/main/java/com/ccsens/ht/bean/vo/DoctorVo.java
  13. 12
      ht/src/main/java/com/ccsens/ht/bean/vo/PatientReportVo.java
  14. 4
      ht/src/main/java/com/ccsens/ht/bean/vo/PatientVo.java
  15. 4
      ht/src/main/java/com/ccsens/ht/bean/vo/PositionVo.java
  16. 10
      ht/src/main/java/com/ccsens/ht/bean/vo/QuestionVo.java
  17. 22
      ht/src/main/java/com/ccsens/ht/config/BeanConfig.java
  18. 220
      ht/src/main/java/com/ccsens/ht/intercept/MybatisInterceptor.java
  19. 3
      ht/src/main/java/com/ccsens/ht/persist/dao/HtDoctorAuditDao.java
  20. 13
      ht/src/main/java/com/ccsens/ht/service/DoctorService.java
  21. 6
      ht/src/main/java/com/ccsens/ht/service/IDoctorService.java
  22. 13
      ht/src/main/java/com/ccsens/ht/service/PatientReportService.java
  23. 2
      ht/src/main/java/com/ccsens/ht/service/PatientService.java
  24. 20
      ht/src/main/java/com/ccsens/ht/service/QuestionService.java
  25. 6
      ht/src/main/java/com/ccsens/ht/uitl/Constant.java
  26. 13
      ht/src/main/resources/mapper_dao/HtDoctorAuditDao.xml
  27. 6
      ht/src/main/resources/mapper_dao/HtPatientReportDao.xml
  28. 5
      ht/src/main/resources/mapper_dao/HtPositionDao.xml
  29. 1
      ht/src/main/resources/mapper_dao/HtQuestionOptionDao.xml
  30. 2
      ht/src/main/resources/mapper_dao/HtReportDao.xml
  31. 1
      ht/src/main/resources/mapper_raw/HtTitleMapper.xml
  32. 2
      tall/src/main/java/com/ccsens/tall/bean/vo/MemberVo.java
  33. 4
      tall/src/main/java/com/ccsens/tall/web/MemberRoleController.java
  34. 6
      tall/src/main/resources/mapper_dao/ProMemberDao.xml
  35. 14
      util/src/main/java/com/ccsens/util/config/ControllerExceptionHandler.java

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

@ -1,12 +1,9 @@
package com.ccsens.cloudutil.aspect;
import cn.hutool.core.util.ZipUtil;
import com.ccsens.cloudutil.bean.tall.dto.LogDto;
import com.ccsens.cloudutil.feign.TallFeignClient;
import com.ccsens.util.CodeEnum;
import com.ccsens.util.UploadFileUtil_Servlet3;
import com.ccsens.util.WebConstant;
import com.ccsens.util.exception.BaseException;
import io.jsonwebtoken.Claims;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
@ -48,7 +45,7 @@ public class LogAspect {
}
@Around("logAdvice()")
public Object around(ProceedingJoinPoint pjp){
public Object around(ProceedingJoinPoint pjp) throws Throwable {
LogDto logDto = initLog(pjp);
@ -58,12 +55,11 @@ public class LogAspect {
} catch (Throwable throwable) {
log.error("方法运行异常", throwable);
if (logDto != null) {
String message = throwable.getMessage();
String message = throwable.toString();
logDto.setResult(message.length() > 1000 ? message.substring(0,1000) : message);
tallFeignClient.log(logDto);
}
throw new BaseException(CodeEnum.SYS_ERROR);
throw throwable;
}
if (logDto != null) {
String message = result == null ? null : result.toString().length() > 1000 ? result.toString().substring(0, 1000) : result.toString();

4
cloudutil/src/main/java/com/ccsens/cloudutil/bean/tall/dto/MemberRoleDto.java

@ -40,8 +40,8 @@ public class MemberRoleDto {
public CodeEnum check(){
//至少有一个条件
boolean hasProject = (projectId == null || projectId == 0 ) && StrUtil.isBlank(projectName);
if (!hasProject) {
boolean noProject = (projectId == null || projectId == 0 ) && StrUtil.isBlank(projectName);
if (noProject) {
return CodeEnum.PARAM_ERROR;
}
return CodeEnum.SUCCESS;

2
ht/src/main/java/com/ccsens/ht/api/DoctorController.java

@ -78,4 +78,6 @@ public class DoctorController {
}
}

11
ht/src/main/java/com/ccsens/ht/aspect/DoctorAuditAspect.java

@ -37,7 +37,7 @@ public class DoctorAuditAspect {
@Pointcut("@annotation(com.ccsens.ht.annotation.DoctorAudit)")
public void doctorAuditAdvice(){}
@Around("doctorAuditAdvice()")
public Object around(ProceedingJoinPoint pjp){
public Object around(ProceedingJoinPoint pjp) throws Throwable {
Object[] args = pjp.getArgs();
QueryDto dto = (QueryDto) args[0];
@ -50,13 +50,8 @@ public class DoctorAuditAspect {
return JsonResponse.newInstance().ok(CodeEnum.AUDIT_NOT_PASS);
}
Object result;
try {
result =pjp.proceed();
} catch (Throwable throwable) {
log.error("doctorAudit运行异常", throwable);
throw new BaseException(CodeEnum.SYS_ERROR);
}
Object result =pjp.proceed();
return result;
}

13
ht/src/main/java/com/ccsens/ht/aspect/MustLoginAspect.java

@ -1,6 +1,5 @@
package com.ccsens.ht.aspect;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.ccsens.cloudutil.feign.TallFeignClient;
@ -14,7 +13,6 @@ import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.aspectj.lang.reflect.MethodSignature;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
@ -22,7 +20,6 @@ import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import java.util.Arrays;
/**
* @description:
@ -41,7 +38,7 @@ public class MustLoginAspect {
public void loginAdvice(){}
@Around("loginAdvice()")
public Object around(ProceedingJoinPoint pjp){
public Object around(ProceedingJoinPoint pjp) throws Throwable {
HttpServletRequest request = ((ServletRequestAttributes)
RequestContextHolder.getRequestAttributes()).getRequest();
@ -68,13 +65,7 @@ public class MustLoginAspect {
dto.setUserId(userId);
}
Object result;
try {
result = pjp.proceed();
} catch (Throwable throwable) {
log.error("doctorAudit运行异常", throwable);
throw new BaseException(CodeEnum.SYS_ERROR);
}
Object result = pjp.proceed();
return result;
}

20
ht/src/main/java/com/ccsens/ht/bean/BeanConfig.java

@ -1,20 +0,0 @@
//package com.ccsens.ht.bean;
//
//import org.springframework.cloud.client.loadbalancer.LoadBalanced;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.web.client.RestTemplate;
//
///**
// * @description:
// * @author: wuHuiJuan
// * @create: 2019/11/26 15:45
// */
//@Configuration
//public class BeanConfig {
// @Bean
// @LoadBalanced
// public RestTemplate restTemplate() {
// return new RestTemplate();
// }
//}

29
ht/src/main/java/com/ccsens/ht/bean/dto/DoctorDto.java

@ -9,6 +9,7 @@ import org.springframework.beans.BeanUtils;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
/**
* @program: ptpro
@ -17,27 +18,27 @@ import javax.validation.constraints.NotNull;
* @create: 2019/10/31 10:35
*/
public class DoctorDto {
@ApiModel
@ApiModel("DoctorDtoSubmit")
@Data
public static class Submit{
@ApiModelProperty("职务ID")
@NotNull
@NotNull(message = "职务不能为空")
private Long positionId;
@ApiModelProperty("职称ID")
@NotNull()
@NotNull(message = "职称不能为空")
private Long titleId;
@ApiModelProperty("姓名")
@NotNull(message = "姓名不能为空")
private String name;
@ApiModelProperty("性别(0:男 1:女)")
@NotNull
@Min(0)
@Max(1)
@NotNull(message = "性别不能为空")
@Min(value = 0, message = "请选择正确的性别")
@Max(value = 1, message = "请选择正确的性别")
private Byte sex;
@ApiModelProperty("年龄")
@NotNull
@Min(0)
@Max(150)
@NotNull(message = "年龄不能为空")
@Min(value = 0, message = "请输入正确年龄")
@Max(value = 150, message = "请输入正确年龄")
private Integer age;
public HtDoctor copy() {
@ -49,20 +50,22 @@ public class DoctorDto {
@ApiModel
@ApiModel("DoctorDtoAudit")
@Data
public static class Audit{
@ApiModelProperty("待审核医生ID")
@NotNull
@NotNull(message="被审核医生信息不能为空")
private Long doctorId;
@ApiModelProperty("审核状态 1:审核通过 2:审核失败")
@NotNull
@NotNull(message = "医生审核状态不能为空")
private Byte auditState;
}
@ApiModel
@ApiModel("DoctorDtoQuery")
@Data
public static class Query{
@ApiModelProperty("名字")
private String name;
@ApiModelProperty("职称ID")
private Long titleId;
@ApiModelProperty("医院/科室/职务ID")

17
ht/src/main/java/com/ccsens/ht/bean/dto/PatientDto.java

@ -7,6 +7,8 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.beans.BeanUtils;
import javax.validation.constraints.NotNull;
/**
* @program: ptpro
* @description: 病人相关接口请求参数
@ -14,7 +16,7 @@ import org.springframework.beans.BeanUtils;
* @create: 2019/10/31 09:28
*/
public class PatientDto {
@ApiModel
@ApiModel("PatientDtoQuery")
@Data
public static class Query{
@ApiModelProperty("报告单ID")
@ -32,7 +34,7 @@ public class PatientDto {
}
@Data
@ApiModel
@ApiModel("PatientDtoEdit")
public static class Edit{
@ApiModelProperty("病人id")
private Long id;
@ -45,6 +47,7 @@ public class PatientDto {
@ApiModelProperty("病人住院号")
private String hospitalNumber;
@ApiModelProperty("病人身份证号")
@NotNull(message="身份证信息不能为空")
private String idcard;
@ApiModelProperty("性别(0:男 1:女)")
private Byte sex;
@ -75,7 +78,7 @@ public class PatientDto {
@ApiModelProperty("城市")
private String city;
@ApiModelProperty("住址")
private String adress;
private String address;
@ApiModelProperty("住所(1:自己家中 2:养老院 3:其他)")
private Byte domicile;
@ApiModelProperty("独立生活能力(1:能够独立生活 2:需要他人帮助完成复杂活动 3:需要他人帮助完成基本活动 4:完全依赖他人生活 5:未知 6:其他)")
@ -96,20 +99,24 @@ public class PatientDto {
}
@Data
@ApiModel
@ApiModel("PatientDtoQueryOtherMsg")
public static class QueryOtherMsg {
@ApiModelProperty("病人id")
@NotNull(message = "病人ID不能为空")
private Long patientId;
@ApiModelProperty("类型")
@NotNull(message="查询类型不能为空")
private String queryType;
}
@Data
@ApiModel
@ApiModel("PatientDtoEditOtherMsg")
public static class EditOtherMsg {
@ApiModelProperty("病人其他信息")
@NotNull(message="病人其他信息不能为空")
private JSONObject model;
@ApiModelProperty("类型")
@NotNull(message="病人类型不能为空")
private String editType;
}
}

31
ht/src/main/java/com/ccsens/ht/bean/dto/PatientReportDto.java

@ -9,6 +9,7 @@ import org.springframework.beans.BeanUtils;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
/**
* @program: ptpro
@ -18,37 +19,35 @@ import javax.validation.constraints.NotNull;
*/
public class PatientReportDto {
@ApiModel
@ApiModel("PatientReportDtoGenerate")
@Data
public static class Generate{
@ApiModelProperty("病人ID")
@NotNull
@NotNull(message = "病人ID不能为空")
private Long patientId;
}
@ApiModel
@ApiModel("PatientReportDtoEdit")
@Data
public static class Edit{
@ApiModelProperty("初步印象")
@NotNull
@NotNull(message="初步印象不能为空")
private String initialImpression;
@ApiModelProperty("临床诊断")
@NotNull
@NotNull(message = "临床诊断不能为空")
private String clinicalDiagnosis;
@ApiModelProperty("床号")
@NotNull
private String bedNumber;
@ApiModelProperty("病人年龄 ")
@NotNull
private Byte patientAge;
@ApiModelProperty("严重程度(1:轻度 2:中度 3:重度) ")
@NotNull
@NotNull(message = "严重程度不能为空")
private Long pasi;
@ApiModelProperty("科别")
@NotNull
@NotNull(message = "科别不允许为空")
private String department;
@ApiModelProperty("病人报告单ID")
@NotNull
@NotNull(message = "报告单ID不允许为空")
private Long id;
public HtPatientReport copy(){
@ -59,11 +58,11 @@ public class PatientReportDto {
}
}
@ApiModel
@ApiModel("PatientReportDtoQueryReports")
@Data
public static class QueryReports{
@ApiModelProperty("病人ID")
@NotNull
@NotNull(message = "病人ID不能为空")
private Long patientId;
@ApiModelProperty("第几页")
@Min(value = 1)
@ -74,20 +73,20 @@ public class PatientReportDto {
private int pageSize = 10;
}
@ApiModel
@ApiModel("PatientReportDtoQueryDetail")
@Data
public static class QueryDetail{
@ApiModelProperty("病人报告单ID")
@NotNull
@NotNull(message = "病人报告单ID不能为空")
private Long id;
}
/**医生对报告单权限*/
@ApiModel
@ApiModel("PatientReportDtoAuthority")
@Data
public static class Authority{
@ApiModelProperty("病人报告单ID")
@NotNull
@NotNull(message = "病人报告单ID不能为空")
private Long id;
}
}

2
ht/src/main/java/com/ccsens/ht/bean/dto/PositionDto.java

@ -10,7 +10,7 @@ import lombok.Data;
* @create: 2019/11/19 16:24
*/
public class PositionDto {
@ApiModel
@ApiModel("PositionDtoPosition")
@Data
public static class Position {
@ApiModelProperty("上级部门ID 为空,默认查所有医院")

21
ht/src/main/java/com/ccsens/ht/bean/dto/QuestionDto.java

@ -17,40 +17,39 @@ import java.util.List;
public class QuestionDto {
@Data
@ApiModel
@ApiModel("QuestionDtoQuery")
public static class Query{
@ApiModelProperty("病人报告单ID")
@NotNull
private Long patientReportId;
@ApiModelProperty("测评类型")
@NotNull
@NotNull(message = "测评类型不能为空")
private String code;
@ApiModelProperty("题号")
@NotNull
@NotNull(message = "题号不能为空")
private int num;
}
@Data
@ApiModel("保存分数")
@ApiModel("QuestionDtoScore")
public static class Score{
@ApiModelProperty("病人报告单ID")
@NotNull
@NotNull(message = "病人报告单ID不能为空")
private Long patientReportId;
@ApiModelProperty("试题ID")
@NotNull
@NotNull(message = "试题ID不能为空")
private Long questionId;
@ApiModelProperty("选项集合")
@NotNull
@NotNull(message = "选项集合不能为空")
private List<Option> options;
}
@Data
@ApiModel("选项")
@ApiModel("QuestionDtoOption")
public static class Option{
@NotNull
@NotNull(message = "选项ID不能为空")
@ApiModelProperty("选项ID")
private Long id;
@NotNull
@NotNull(message = "病友画图或录音不能为空")
@ApiModelProperty("病友画图或录音")
private Part part;
}

4
ht/src/main/java/com/ccsens/ht/bean/vo/DoctorVo.java

@ -15,7 +15,7 @@ import lombok.Data;
public class DoctorVo {
@Data
@ApiModel
@ApiModel("DoctorVoQuery")
public static class Query{
@ApiModelProperty("id")
private Long id;
@ -41,6 +41,8 @@ public class DoctorVo {
private String titleName;
@ApiModelProperty("职务名称")
private String positionName;
@ApiModelProperty("科室名称")
private String department;
}

12
ht/src/main/java/com/ccsens/ht/bean/vo/PatientReportVo.java

@ -18,14 +18,14 @@ import java.util.List;
public class PatientReportVo {
@Data
@ApiModel
@ApiModel("PatientReportVoGenerate")
public static class Generate{
@ApiModelProperty("病人报告单ID")
private Long id;
}
@Data
@ApiModel
@ApiModel("PatientReportVoReportName")
public static class ReportName{
@ApiModelProperty("报告单ID")
private Long id;
@ -37,7 +37,7 @@ public class PatientReportVo {
private String url;
}
@ApiModel
@ApiModel("PatientReportVoReprotDetail")
@Data
public static class ReprotDetail{
@ApiModelProperty("报告单上病人信息")
@ -46,7 +46,7 @@ public class PatientReportVo {
private List<ReportScore> scores;
}
@ApiModel()
@ApiModel("PatientReportVoReprotPatient")
@Data
public static class ReprotPatient{
@ApiModelProperty("病人报告单ID")
@ -98,7 +98,7 @@ public class PatientReportVo {
}
/**分数类型*/
@ApiModel
@ApiModel("PatientReportVoReportScore")
@Data
public static class ReportScore{
@ApiModelProperty("报告单检查类型")
@ -126,7 +126,7 @@ public class PatientReportVo {
}
/**医生对报告单权限*/
@ApiModel
@ApiModel("PatientReportVoAuthority")
@Data
public static class Authority{
@ApiModelProperty("对报告单的操作权限 0:仅查看 1: 可修改 2:可审查")

4
ht/src/main/java/com/ccsens/ht/bean/vo/PatientVo.java

@ -19,7 +19,7 @@ import java.util.List;
public class PatientVo {
/**病友查询返回*/
@ApiModel
@ApiModel("PatientVoQuery")
@Data
public static class Query{
@ApiModelProperty("病人id")
@ -91,7 +91,7 @@ public class PatientVo {
}
@ApiModel
@ApiModel("PatientVoEdit")
@Data
public static class Edit {
@ApiModelProperty("病友ID")

4
ht/src/main/java/com/ccsens/ht/bean/vo/PositionVo.java

@ -17,7 +17,7 @@ import java.util.List;
*/
public class PositionVo {
@ApiModel
@ApiModel("PositionVoPosition")
@Data
public static class Position {
@ApiModelProperty("职务ID")
@ -38,7 +38,7 @@ public class PositionVo {
}
}
@ApiModel
@ApiModel("PositionVoTitle")
@Data
public static class Title{
@ApiModelProperty("职称ID")

10
ht/src/main/java/com/ccsens/ht/bean/vo/QuestionVo.java

@ -20,7 +20,7 @@ import java.util.List;
public class QuestionVo {
@Data
@ApiModel
@ApiModel("QuestionVoQuery")
public static class Query{
@ApiModelProperty("问题")
private Question question;
@ -43,7 +43,7 @@ public class QuestionVo {
}
@Data
@ApiModel("试题")
@ApiModel("QuestionVoQuestion")
public static class Question{
@ApiModelProperty("试题ID")
private Long id;
@ -105,7 +105,7 @@ public class QuestionVo {
}
@Data
@ApiModel("选项")
@ApiModel("QuestionVoOption")
public static class Option {
@ApiModelProperty("选项ID")
private Long id;
@ -126,7 +126,7 @@ public class QuestionVo {
}
@Data
@ApiModel("引导语")
@ApiModel("QuestionVoIntroduce")
public static class Introduce {
@ApiModelProperty("引导语ID")
private Long id;
@ -155,7 +155,7 @@ public class QuestionVo {
}
@Data
@ApiModel("病友答题记录")
@ApiModel("QuestionVoRecord")
public static class Record{
@ApiModelProperty("答题记录ID")
private Long id;

22
ht/src/main/java/com/ccsens/ht/config/BeanConfig.java

@ -0,0 +1,22 @@
package com.ccsens.ht.config;
import com.ccsens.ht.intercept.MybatisInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* @description:
* @author: wuHuiJuan
* @create: 2019/12/11 10:59
*/
@Configuration
public class BeanConfig {
/**
* 注册拦截器
*/
@Bean
public MybatisInterceptor mybatisInterceptor() {
MybatisInterceptor interceptor = new MybatisInterceptor();
return interceptor;
}
}

220
ht/src/main/java/com/ccsens/ht/intercept/MybatisInterceptor.java

@ -0,0 +1,220 @@
package com.ccsens.ht.intercept;
import cn.hutool.core.collection.CollectionUtil;
import com.ccsens.ht.bean.po.HtDoctorExample;
import com.ccsens.ht.uitl.Constant;
import org.apache.ibatis.binding.MapperMethod;
import org.apache.ibatis.cache.CacheKey;
import org.apache.ibatis.executor.CachingExecutor;
import org.apache.ibatis.executor.Executor;
import org.apache.ibatis.executor.parameter.ParameterHandler;
import org.apache.ibatis.executor.statement.PreparedStatementHandler;
import org.apache.ibatis.executor.statement.StatementHandler;
import org.apache.ibatis.mapping.*;
import org.apache.ibatis.plugin.*;
import org.apache.ibatis.reflection.DefaultReflectorFactory;
import org.apache.ibatis.reflection.MetaObject;
import org.apache.ibatis.reflection.factory.DefaultObjectFactory;
import org.apache.ibatis.reflection.wrapper.DefaultObjectWrapperFactory;
import org.apache.ibatis.session.Configuration;
import org.apache.ibatis.session.ResultHandler;
import org.apache.ibatis.session.RowBounds;
import org.springframework.beans.BeanUtils;
import org.springframework.util.ClassUtils;
import java.beans.PropertyDescriptor;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.sql.PreparedStatement;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Properties;
/**
* @description:
* @author: wuHuiJuan
* @create: 2019/12/11 10:58
*/
@Intercepts({
@Signature(
type = Executor.class,
method = "query",
args = {MappedStatement.class, Object.class, RowBounds.class, ResultHandler.class}
)/*,
@Signature(
type = Executor.class,
method = "query",
args = {MappedStatement.class, Object.class, RowBounds.class, ResultHandler.class, CacheKey.class, BoundSql.class}
)*/
/*@Signature(
type = ParameterHandler.class,
method = "setParameters",
args = {PreparedStatement.class}
)*/
})
public class MybatisInterceptor implements Interceptor {
private static final String PARAM_KEY = "is_del";
@Override
public Object intercept(Invocation invocation) throws Throwable {
// Object[] args = invocation.getArgs();
// MappedStatement statement = (MappedStatement) args[0];
// BoundSql boundSql = statement.getBoundSql(args.length > 1 ? args[1] : null);
// String sql = boundSql.getSql();
// String whereDel = "is_del";
// int whereIndex = sql.indexOf("where") > 0 ? sql.indexOf("where") : sql.indexOf("WHERE");
// boolean hasParam = true;
// if (whereIndex < 0) {
// hasParam = false;
// sql += " where ";
// whereIndex = sql.indexOf("where");
// }
// //sql中不包含is_del,则添加
// if (!sql.substring(whereIndex).contains(whereDel)) {
// StringBuilder sqlBuilder = new StringBuilder();
// sqlBuilder.append(sql.substring(0, whereIndex + "where".length()))
// .append(hasParam ? " is_del = 0 and " : " is_del = 0 ")
// .append(sql.substring(whereIndex + "where".length()));
// //通过反射修改sql语句
//// Field field = boundSql.getClass().getDeclaredField("sql");
//// field.setAccessible(true);
//// field.set(boundSql, builder.toString());
//
// System.out.println("------------------");
// List<ParameterMapping> parameterMappings = boundSql.getParameterMappings();
// Configuration configuration = statement.getConfiguration();
// BoundSql newBoundSql = new BoundSql(configuration, sqlBuilder.toString(), parameterMappings, boundSql.getParameterObject());
// for (ParameterMapping parameterMapping : parameterMappings) {
// String prop = parameterMapping.getProperty();
// if (boundSql.hasAdditionalParameter(prop)) {
// Object param = boundSql.getAdditionalParameter(prop);
// newBoundSql.setAdditionalParameter(prop, param);
// }
// }
// BoundSqlSource newSqlSource = new BoundSqlSource(newBoundSql);
// MappedStatement newMappedStatement = copyFromMappedStatement(
// statement, newSqlSource);
// args[MAPPED_STATEMENT_INDEX] = newMappedStatement;
// }
String selectByExample = "selectByExample";
String selectByPrimaryKey = "selectByPrimaryKey";
Object[] args = invocation.getArgs();
MappedStatement statement = (MappedStatement) args[0];
if (statement.getId().endsWith(selectByExample)) {
//XXXExample
Object example = args[1];
Method method = example.getClass().getMethod("getOredCriteria", null);
//获取到条件数组,第一个是Criteria
List list = (List)method.invoke(example);
if (CollectionUtil.isEmpty(list)) {
Class clazz = ((ResultMap)statement.getResultMaps().get(0)).getType();
String exampleName = clazz.getName() + "Example";
Object paramExample = Class.forName(exampleName).newInstance();
Method createCriteria = paramExample.getClass().getMethod("createCriteria");
Object criteria = createCriteria.invoke(paramExample);
Method andIsDelEqualTo = criteria.getClass().getMethod("andIsDelEqualTo", Byte.class);
andIsDelEqualTo.invoke(criteria, Constant.Ht.NUMBER_DEFAULT);
list.add(criteria);
} else {
Object criteria = list.get(0);
Method getCriteria = criteria.getClass().getMethod("getCriteria");
List params = (List)getCriteria.invoke(criteria);
boolean hasDel = false;
for(Object param: params) {
Method getCondition = param.getClass().getMethod("getCondition");
Object condition = getCondition.invoke(param);
if ("iis_del =".equals(condition)) {
hasDel = true;
}
}
if (!hasDel) {
Method andIsDelEqualTo = criteria.getClass().getMethod("andIsDelEqualTo", Byte.class);
andIsDelEqualTo.invoke(criteria, Constant.Ht.NUMBER_DEFAULT);
}
}
} else if (statement.getId().endsWith(selectByPrimaryKey)) {
BoundSql boundSql = statement.getBoundSql(args[1]);
String sql = boundSql.getSql() + " and is_del = 0";
MappedStatement newStatement = newMappedStatement(statement, new BoundSqlSqlSource(boundSql));
MetaObject msObject = MetaObject.forObject(newStatement, new DefaultObjectFactory(), new DefaultObjectWrapperFactory(),new DefaultReflectorFactory());
msObject.setValue("sqlSource.boundSql.sql", sql);
args[0] = newStatement;
}
return invocation.proceed();
}
@Override
public Object plugin(Object target) {
return Plugin.wrap(target, this);
}
@Override
public void setProperties(Properties properties) {
}
private MappedStatement newMappedStatement(MappedStatement ms, SqlSource newSqlSource) {
MappedStatement.Builder builder =
new MappedStatement.Builder(ms.getConfiguration(), ms.getId(), newSqlSource, ms.getSqlCommandType());
builder.resource(ms.getResource());
builder.fetchSize(ms.getFetchSize());
builder.statementType(ms.getStatementType());
builder.keyGenerator(ms.getKeyGenerator());
if (ms.getKeyProperties() != null && ms.getKeyProperties().length != 0) {
StringBuilder keyProperties = new StringBuilder();
for (String keyProperty : ms.getKeyProperties()) {
keyProperties.append(keyProperty).append(",");
}
keyProperties.delete(keyProperties.length() - 1, keyProperties.length());
builder.keyProperty(keyProperties.toString());
}
builder.timeout(ms.getTimeout());
builder.parameterMap(ms.getParameterMap());
builder.resultMaps(ms.getResultMaps());
builder.resultSetType(ms.getResultSetType());
builder.cache(ms.getCache());
builder.flushCacheRequired(ms.isFlushCacheRequired());
builder.useCache(ms.isUseCache());
return builder.build();
}
private String getOperateType(Invocation invocation) {
final Object[] args = invocation.getArgs();
MappedStatement ms = (MappedStatement) args[0];
SqlCommandType commondType = ms.getSqlCommandType();
if (commondType.compareTo(SqlCommandType.SELECT) == 0) {
return "select";
}
if (commondType.compareTo(SqlCommandType.INSERT) == 0) {
return "insert";
}
if (commondType.compareTo(SqlCommandType.UPDATE) == 0) {
return "update";
}
if (commondType.compareTo(SqlCommandType.DELETE) == 0) {
return "delete";
}
return null;
}
// 定义一个内部辅助类,作用是包装sq
class BoundSqlSqlSource implements SqlSource {
private BoundSql boundSql;
public BoundSqlSqlSource(BoundSql boundSql) {
this.boundSql = boundSql;
}
@Override
public BoundSql getBoundSql(Object parameterObject) {
return boundSql;
}
}
}

3
ht/src/main/java/com/ccsens/ht/persist/dao/HtDoctorAuditDao.java

@ -29,10 +29,11 @@ public interface HtDoctorAuditDao extends HtDoctorAuditMapper {
* @param titleId 职称ID
* @param jobId 职务ID
* @param recursionId 职务ID(查询=该职务和该职务的子职务)
* @param name 医生名字
*@return: java.util.List<com.ccsens.ht.bean.po.HtDoctor>
*@Author: wuhuijuan
*@date: 2019/10/25 16:14
*/
List<DoctorVo.Query> queryDoctor(@Param(value = "auditorId") Long auditorId, @Param(value = "titleId") Long titleId, @Param(value = "jobId") Long jobId, @Param(value = "recursionId")Long recursionId);
List<DoctorVo.Query> queryDoctor(@Param(value = "auditorId") Long auditorId, @Param(value = "titleId") Long titleId, @Param(value = "jobId") Long jobId, @Param(value = "recursionId")Long recursionId, @Param(value = "name")String name);
}

13
ht/src/main/java/com/ccsens/ht/service/DoctorService.java

@ -143,7 +143,7 @@ public class DoctorService implements IDoctorService {
}
PageHelper.startPage(query.getPageNum(), query.getPageSize());
List<DoctorVo.Query> htDoctorDtos = htDoctorAuditDao.queryDoctor(htDoctors.get(0).getId(), query.getTitleId(), jobId, recursionId);
List<DoctorVo.Query> htDoctorDtos = htDoctorAuditDao.queryDoctor(htDoctors.get(0).getId(), query.getTitleId(), jobId, recursionId, query.getName());
log.info("医生信息");
return new PageInfo<>(htDoctorDtos);
}
@ -186,12 +186,18 @@ public class DoctorService implements IDoctorService {
JsonResponse result;
if (Constant.Ht.Doctor.CHECK_SUCCESS == audit.getAuditState()) {
MemberRoleDto.Assign assign = new MemberRoleDto.Assign();
assign.setUserId(waitDoctor.getUserId());
assign.setCreateBy(htDoctors.get(0).getUserId());
assign.setName(waitDoctor.getName());
assign.setRoleNames(roles);
result = tallFeignClient.assignRoles(assign);
//删除资格认证角色
MemberRoleDto.Delete delete = new MemberRoleDto.Delete();
delete.setUserId(waitDoctor.getUserId());
delete.setRoleNames(Constant.Ht.Doctor.DEL_ROLES);
tallFeignClient.deleteRoles(delete);
} else {
MemberRoleDto.Delete delete = new MemberRoleDto.Delete();
delete.setUserId(waitDoctor.getUserId());
@ -259,5 +265,8 @@ public class DoctorService implements IDoctorService {
}
}
@Override
public List<HtDoctor> selectByExample(HtDoctorExample doctorExample) {
return htDoctorMapper.selectByExample(doctorExample);
}
}

6
ht/src/main/java/com/ccsens/ht/service/IDoctorService.java

@ -1,11 +1,15 @@
package com.ccsens.ht.service;
import com.ccsens.ht.bean.dto.DoctorDto;
import com.ccsens.ht.bean.po.HtDoctor;
import com.ccsens.ht.bean.po.HtDoctorExample;
import com.ccsens.ht.bean.vo.DoctorVo;
import com.ccsens.util.CodeEnum;
import com.ccsens.util.JsonResponse;
import com.github.pagehelper.PageInfo;
import java.util.List;
/**
* @program: ptpro
* @description: 资格认证/审核
@ -45,4 +49,6 @@ public interface IDoctorService {
*/
PageInfo<DoctorVo.Query> queryDoctors(DoctorDto.Query query, Long userId);
List<HtDoctor> selectByExample(HtDoctorExample doctorExample);
}

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

@ -1,5 +1,6 @@
package com.ccsens.ht.service;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.lang.Snowflake;
import com.ccsens.ht.bean.dto.PatientReportDto;
@ -148,6 +149,18 @@ public class PatientReportService implements IPatientReportService {
HtDoctorExample doctorExample = new HtDoctorExample();
doctorExample.createCriteria().andUserIdEqualTo(userId).andAuditStateEqualTo(Constant.Ht.Doctor.CHECK_SUCCESS).andIsDelEqualTo(Constant.Ht.NUMBER_DEFAULT);
List<HtDoctor> doctors = htDoctorMapper.selectByExample(doctorExample);
log.info("当前用户是否为医生:{}", CollectionUtil.isNotEmpty(doctors));
if (CollectionUtil.isEmpty(doctors)) {
reports.forEach(report -> {
PatientReportVo.ReportName name = new PatientReportVo.ReportName();
name.setId(report.getId());
name.setName(report.getName());
name.setUrl(report.getUrl());
name.setAuthority((byte)0);
reportVos.add(name);
});
return new PageInfo<>(reportVos);
}
HtDoctor doctor = doctors.get(0);
//查询下属职务
List<Long> lowerPositionIds = htPositionDao.queryAllLowerPosition(doctor.getPositionId());

2
ht/src/main/java/com/ccsens/ht/service/PatientService.java

@ -154,7 +154,7 @@ public class PatientService implements IPatientService {
}
if (oldPatient != null) {
patient.setId(oldPatient.getId());
htPatientMapper.updateByPrimaryKeySelective(patient);
htPatientMapper.updateByPrimaryKey(patient);
} else {
patient.setId(snowflake.nextId());
htPatientMapper.insertSelective(patient);

20
ht/src/main/java/com/ccsens/ht/service/QuestionService.java

@ -95,11 +95,17 @@ public class QuestionService implements IQuestionService {
//试题选项
List<QuestionVo.Option> options = htQuestionOptionDao.queryOption(question.getId(), query.getPatientReportId());
//答题记录
HtPatientQuestionRecordExample recordExample = new HtPatientQuestionRecordExample();
recordExample.createCriteria().andPatientReportIdEqualTo(query.getPatientReportId()).andQuestionIdEqualTo(question.getId());
recordExample.setOrderByClause("record_time");
List<HtPatientQuestionRecord> records = htPatientQuestionRecordMapper.selectByExample(recordExample);
List<QuestionVo.Record> recordVos = QuestionVo.Record.toRecords(records);
List<QuestionVo.Record> recordVos;
if (query.getPatientReportId() != null && query.getPatientReportId() != 0) {
HtPatientQuestionRecordExample recordExample = new HtPatientQuestionRecordExample();
recordExample.createCriteria().andPatientReportIdEqualTo(query.getPatientReportId()).andQuestionIdEqualTo(question.getId());
recordExample.setOrderByClause("record_time");
List<HtPatientQuestionRecord> records = htPatientQuestionRecordMapper.selectByExample(recordExample);
recordVos = QuestionVo.Record.toRecords(records);
} else {
recordVos = new ArrayList<>();
}
//封装返回
QuestionVo.Query data = new QuestionVo.Query(questionVo, options, introduceVos, recordVos);
log.info("试题信息:{}", data);
@ -189,7 +195,9 @@ public class QuestionService implements IQuestionService {
//删除该病人原有的答案
HtPatientScoreExample delExample = new HtPatientScoreExample();
delExample.createCriteria().andPatientReportIdEqualTo(report.getId()).andQuestionIdEqualTo(question.getId());
htPatientScoreDao.deleteByExample(delExample);
HtPatientScore delScore = new HtPatientScore();
delScore.setIsDel(Constant.Ht.IS_DEL);
htPatientScoreDao.updateByExampleSelective(delScore, delExample);
//保存现在的答案
htPatientScoreDao.insertBatch(scores);
return CodeEnum.SUCCESS;

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

@ -67,12 +67,16 @@ public class Constant {
public static final byte CHECK_SUCCESS = 1;
public static final byte CHECK_FAIL = 2;
public static final String NO_EVALUATION = "资格认证";
public static final String COMMON = "评测";
public static final String AUDIT = "审核";
public static final String MANAGE = "管理";
public static final String PATIENT = "往期报告单";
public static final List<String> DEL_ROLES = new ArrayList<>();
static {
DEL_ROLES.add(NO_EVALUATION);
}
}
public static class Question {

13
ht/src/main/resources/mapper_dao/HtDoctorAuditDao.xml

@ -24,6 +24,7 @@
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="title_name" jdbcType="VARCHAR" property="titleName" />
<result column="position_name" jdbcType="VARCHAR" property="positionName" />
<result column="department" jdbcType="VARCHAR" property="department" />
</resultMap>
<insert id="insertBatch" parameterType="List">
@ -36,9 +37,13 @@
</foreach>
</insert>
<select id="queryDoctor" resultMap="DoctorDtoResultMap">
select d.*, t.title as title_name, p.`name` as position_name from t_ht_doctor d, t_ht_doctor_audit a, t_ht_title t, t_ht_position p
where d.id = a.doctor_id and d.title_id = t.id and d.position_id = p.id
and a.auditor_id = #{auditorId,jdbcType=BIGINT}
select d.*, t.title as title_name, p.`name` as position_name, pt.name as department
from t_ht_doctor d, t_ht_doctor_audit a, t_ht_title t, t_ht_position p, t_ht_position pt
where d.id = a.doctor_id and d.title_id = t.id and d.position_id = p.id and p.superior_department_id = pt.id
and a.auditor_id = #{auditorId,jdbcType=BIGINT} and d.is_del = 0 and a.is_del = 0 and t.is_del = 0 and p.is_del = 0 and pt.is_del = 0
<if test="name != null and name != ''">
and d.name = #{name,jdbcType=VARCHAR}
</if>
<if test="titleId != null">
and d.title_id = #{titleId,jdbcType=BIGINT}
</if>
@ -51,7 +56,7 @@
select id from (
select t1.id , name, t1.type, if(find_in_set(superior_department_id, @pids) > 0 or id=@pids, @pids:=concat(@pids, ',', id), 0) as ischild
from
(select id, name, type, superior_department_id from t_ht_position ORDER BY superior_department_id, id) t1,
(select id, name, type, superior_department_id from t_ht_position where is_del = 0 ORDER BY superior_department_id, id) t1,
(select @pids := #{recursionId,jdbcType=BIGINT}) t2
) t3 where t3.type &lt;&gt; 3 and ischild != 0
)

6
ht/src/main/resources/mapper_dao/HtPatientReportDao.xml

@ -41,13 +41,15 @@
select r.*, d.name as doctor_name, p.name as patient_name, p.sex, p.educational_status, p.educational_status_unit, p.career, p.hospital_number, p.patient_number
from t_ht_patient_report r, t_ht_patient p, t_ht_doctor d
where r.patient_id = p.id and r.doctor_id = d.id and r.id = #{id, jdbcType=BIGINT}
and r.is_del = 0 and p.is_del = 0 and d.is_del = 0
</select>
<select id="queryReportScore" resultMap="ScoreMap">
select t1.code,t1.name, t1.description, t1.total_score, t1.remark,t1.type,t1.parent_code, sum(t2.score) as score
from
(select code,name, description, total_score, remark, type, parent_code, sort from t_ht_report where is_show = 1 ) t1
(select code,name, description, total_score, remark, type, parent_code, sort from t_ht_report where is_show = 1 and is_del = 0) t1
left join t_ht_patient_score t2 on t1.code = t2.question_parent_code
where (t2.patient_report_id = #{id, jdbcType=BIGINT} and t2.type in (0,2)) or t2.id is null
where (t2.patient_report_id = #{id, jdbcType=BIGINT} and t2.type in (0,2) and t2.is_del = 0)
or (t2.id is null and t2.is_del = 0)
GROUP BY t1.code
order by t1.type,t1.sort
</select>

5
ht/src/main/resources/mapper_dao/HtPositionDao.xml

@ -38,7 +38,7 @@
@l:=@l + 1 as lvl
from (SELECT @r := #{superiorId,jdbcType=BIGINT}, @l := 0) vars,
t_ht_position h
where @r &lt;&gt; 0
where @r &lt;&gt; 0 and is_del = 0
<if test="hasAudit != null">
and has_audit = #{hasAudit,jdbcType=TINYINT}
</if>
@ -48,13 +48,14 @@
) t1
JOIN t_ht_position t2
on t1._id = t2.id
where t2.is_del = 0
ORDER BY t1.lvl desc;
</select>
<select id="queryAllLowerPosition" resultType="java.lang.Long">
select id from (
select t1.id , name, t1.type, if(find_in_set(superior_id, @pids) > 0 or id=@pids, @pids:=concat(@pids, ',', id), 0) as ischild
from
(select id, name, type, superior_id from t_ht_position ORDER BY superior_id, id) t1,
(select id, name, type, superior_id from t_ht_position where is_del = 0 ORDER BY superior_id, id) t1,
(select @pids := #{id,jdbcType=BIGINT}) t2
) t3 where t3.type = 3 and ischild != 0
</select>

1
ht/src/main/resources/mapper_dao/HtQuestionOptionDao.xml

@ -44,6 +44,7 @@
select t1.id, t1.type, t1.question_id, t1.name, t1.score, t1.display, if (t2.id is null, 0, 1) as choose , if(t2.type = 3, null, t2.answer) as answer
from t_ht_question_option t1 left join t_ht_patient_score t2 on t1.id = t2.option_id
where t1.question_id = #{questionId,jdbcType=BIGINT} and (t2.id is null or t2.patient_report_id = #{patientReportId,jdbcType=BIGINT})
and t1.is_del = 0 and t2.is_del = 0
group by t1.id
order by t1.sort
</select>

2
ht/src/main/resources/mapper_dao/HtReportDao.xml

@ -33,7 +33,7 @@
</insert>
<select id="queryReportShow" resultMap="BaseResultMap">
select * from t_ht_report where is_show = 1 order by type,sort
select * from t_ht_report where is_show = 1 and is_del = 0 order by type,sort
</select>
</mapper>

1
ht/src/main/resources/mapper_raw/HtTitleMapper.xml

@ -38,7 +38,6 @@
</trim>
</if>
</foreach>
and is_del = 0
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">

2
tall/src/main/java/com/ccsens/tall/bean/vo/MemberVo.java

@ -9,7 +9,7 @@ public class MemberVo {
public static class MemberInfo{
private Long id;
private Long userId;
private Long memberRoleId;
// private Long memberRoleId;
private String nickname;
private String avatarUrl;
private Integer no;

4
tall/src/main/java/com/ccsens/tall/web/MemberRoleController.java

@ -52,7 +52,7 @@ public class MemberRoleController {
* @return
*/
@RequestMapping("assignRoles")
public JsonResponse assignRoles(MemberRoleDto.Assign assign) {
public JsonResponse assignRoles(@Validated @RequestBody MemberRoleDto.Assign assign) {
log.info("分配角色请求参数:{}", assign);
CodeEnum codeEnum = memberRoleService.assignRoles(assign);
log.info("分配角色结果:{}", codeEnum);
@ -66,7 +66,7 @@ public class MemberRoleController {
* @return
*/
@RequestMapping("deleteRoles")
public JsonResponse deleteRoles(MemberRoleDto.Delete deleteDto) {
public JsonResponse deleteRoles(@Validated @RequestBody MemberRoleDto.Delete deleteDto) {
log.info("删除角色请求参数:{}", deleteDto);
CodeEnum codeEnum = memberRoleService.deleteRole(deleteDto);
log.info("删除角色结果:{}", codeEnum);

6
tall/src/main/resources/mapper_dao/ProMemberDao.xml

@ -5,7 +5,7 @@
<resultMap id="resultMap_ProMemberInfo" type="com.ccsens.tall.bean.vo.MemberVo$MemberInfo">
<id column="mId" property="id" />
<result column="mUserId" property="userId" />
<result column="mMemberRoleId" property="memberRoleId" />
<!--<result column="mMemberRoleId" property="memberRoleId" />-->
<result column="mNickName" property="nickname" />
<result column="mAvatarUrl" property="avatarUrl" />
<result column="mNo" property="no" />
@ -19,7 +19,6 @@
select
m.id as mId,
m.user_id as mUserId,
m.member_role_id as mMemberRoleId,
m.nickname as mNickName,
m.avatar_url as mAvatarUrl,
m.no as mNo,
@ -39,7 +38,6 @@
select
m.id as mId,
m.user_id as mUserId,
m.member_role_id as mMemberRoleId,
m.nickname as mNickName,
m.avatar_url as mAvatarUrl,
m.no as mNo,
@ -57,7 +55,6 @@
select
m.id as mId,
m.user_id as mUserId,
m.member_role_id as mMemberRoleId,
m.nickname as mNickName,
m.avatar_url as mAvatarUrl,
m.no as mNo,
@ -75,7 +72,6 @@
select
m.id as mId,
m.user_id as mUserId,
m.member_role_id as mMemberRoleId,
m.nickname as mNickName,
m.avatar_url as mAvatarUrl,
m.no as mNo,

14
util/src/main/java/com/ccsens/util/config/ControllerExceptionHandler.java

@ -1,8 +1,10 @@
package com.ccsens.util.config;
import com.ccsens.util.CodeEnum;
import com.ccsens.util.JsonResponse;
import com.ccsens.util.exception.BaseException;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
import org.springframework.http.converter.HttpMessageNotReadableException;
import org.springframework.validation.BindException;
import org.springframework.validation.BindingResult;
@ -33,14 +35,16 @@ public class ControllerExceptionHandler {
public JsonResponse validateExceptionHandlero(HttpServletRequest req,
MethodArgumentNotValidException e){
BindingResult bindingResult = e.getBindingResult();
StringBuilder errorMesssage = new StringBuilder();
// StringBuilder errorMesssage = new StringBuilder();
// for (FieldError fieldError : bindingResult.getFieldErrors()) {
// System.out.println("-------------" + fieldError.getField() + "----" + fieldError.getRejectedValue());
// errorMesssage.append(fieldError.getDefaultMessage() + "\n");
// }
errorMesssage.append(bindingResult.getFieldErrors().get(0).getDefaultMessage());
e.printStackTrace();
log.info("MethodArgumentNotValidException",e);
return JsonResponse.newInstance().fail(-10,errorMesssage.toString());
//
// errorMesssage.append(bindingResult.getFieldErrors().get(0).getDefaultMessage());
// e.printStackTrace();
log.error("MethodArgumentNotValidException",e);
return JsonResponse.newInstance().fail(CodeEnum.PARAM_NULL.getCode(),bindingResult.getFieldError().getDefaultMessage());
}
@ExceptionHandler(value = BindException.class)

Loading…
Cancel
Save