From e9631dd2d4ac9c2c783130bfed1f70e440cfc97d Mon Sep 17 00:00:00 2001 From: zzc Date: Tue, 11 Feb 2025 11:21:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=BA=90=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E8=A7=A3=E5=86=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/web/DmsLoginController.java | 6 +- .../web/FmsFollowupQueueController.java | 3 +- .../controller/web/PmsPatientController.java | 66 + .../src/main/resources/application-stage.yml | 4 +- .../src/main/resources/application.yml | 4 +- .../common/constant/UserConstants.java | 2 + .../common/utils/SecurityUtils.java | 14 + .../aspectj/AdminGlobalDataSourceAspect.java | 100 ++ .../framework/config/LoadingDataSource.java | 47 + .../datasource/DataSourceManager.java | 50 + .../datasource/DynamicDataSource.java | 36 + .../web/service/UserDetailsServiceImpl.java | 2 +- .../src/main/resources/mbg.xml | 2 +- .../domain/{vo => dto}/FmsFollowupDto.java | 2 +- .../system/domain/dto/PmsPatientDto.java | 90 + .../system/domain/po/PmsPatient.java | 238 +++ .../system/domain/po/PmsPatientExample.java | 1528 +++++++++++++++++ .../system/domain/vo/PmsPatientVo.java | 54 + .../system/mapper/SysUserMapper.java | 7 + .../system/persist/dao/DmsUserDao.java | 2 - .../system/persist/dao/PmsPatientDao.java | 18 + .../persist/mapper/PmsPatientMapper.java | 28 + .../system/service/DmsLoginService.java | 8 + .../system/service/ISysUserService.java | 8 + .../system/service/PmsPatientService.java | 47 + .../service/impl/DmsLoginServiceImpl.java | 26 + .../service/impl/PmsPatientServiceImpl.java | 68 + .../service/impl/SysUserServiceImpl.java | 5 + .../resources/mapper/dao/PmsPatientDao.xml | 55 + .../main/resources/mapper/dao/SysPowerDao.xml | 5 +- .../mapper/system/PmsPatientMapper.xml | 442 +++++ .../resources/mapper/system/SysUserMapper.xml | 10 +- 32 files changed, 2961 insertions(+), 16 deletions(-) create mode 100644 acupuncture-admin/src/main/java/com/acupuncture/web/controller/web/PmsPatientController.java create mode 100644 acupuncture-framework/src/main/java/com/acupuncture/framework/aspectj/AdminGlobalDataSourceAspect.java create mode 100644 acupuncture-framework/src/main/java/com/acupuncture/framework/config/LoadingDataSource.java create mode 100644 acupuncture-framework/src/main/java/com/acupuncture/framework/datasource/DataSourceManager.java rename acupuncture-system/src/main/java/com/acupuncture/system/domain/{vo => dto}/FmsFollowupDto.java (88%) create mode 100644 acupuncture-system/src/main/java/com/acupuncture/system/domain/dto/PmsPatientDto.java create mode 100644 acupuncture-system/src/main/java/com/acupuncture/system/domain/po/PmsPatient.java create mode 100644 acupuncture-system/src/main/java/com/acupuncture/system/domain/po/PmsPatientExample.java create mode 100644 acupuncture-system/src/main/java/com/acupuncture/system/domain/vo/PmsPatientVo.java create mode 100644 acupuncture-system/src/main/java/com/acupuncture/system/persist/dao/PmsPatientDao.java create mode 100644 acupuncture-system/src/main/java/com/acupuncture/system/persist/mapper/PmsPatientMapper.java create mode 100644 acupuncture-system/src/main/java/com/acupuncture/system/service/PmsPatientService.java create mode 100644 acupuncture-system/src/main/java/com/acupuncture/system/service/impl/PmsPatientServiceImpl.java create mode 100644 acupuncture-system/src/main/resources/mapper/dao/PmsPatientDao.xml create mode 100644 acupuncture-system/src/main/resources/mapper/system/PmsPatientMapper.xml diff --git a/acupuncture-admin/src/main/java/com/acupuncture/web/controller/web/DmsLoginController.java b/acupuncture-admin/src/main/java/com/acupuncture/web/controller/web/DmsLoginController.java index 1e849094..b684580d 100644 --- a/acupuncture-admin/src/main/java/com/acupuncture/web/controller/web/DmsLoginController.java +++ b/acupuncture-admin/src/main/java/com/acupuncture/web/controller/web/DmsLoginController.java @@ -14,6 +14,7 @@ import com.acupuncture.framework.web.service.TokenService; import com.acupuncture.framework.web.service.WebDmsLoginService; import com.acupuncture.system.domain.vo.DmsLoginUserVo; import com.acupuncture.system.service.DmsLoginService; +import com.acupuncture.system.service.ISysUserService; import io.swagger.annotations.Api; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; @@ -41,6 +42,8 @@ public class DmsLoginController { private TokenService tokenService; @Resource private DmsLoginService dmsLoginService; + @Resource + private ISysUserService sysUserService; /** * 登录方法 @@ -66,7 +69,8 @@ public class DmsLoginController { @GetMapping("getInfo") public AjaxResult getInfo() { LoginUser loginUser = SecurityUtils.getLoginUser(); - SysUser user = loginUser.getUser(); + //获取用户从库信息 + SysUser user = sysUserService.selectUserByTenantId(loginUser.getTenantId(), loginUser.getUsername()); //刷新token tokenService.refreshToken(loginUser); AjaxResult ajax = AjaxResult.success(); diff --git a/acupuncture-admin/src/main/java/com/acupuncture/web/controller/web/FmsFollowupQueueController.java b/acupuncture-admin/src/main/java/com/acupuncture/web/controller/web/FmsFollowupQueueController.java index 920c1d4e..3e5a2581 100644 --- a/acupuncture-admin/src/main/java/com/acupuncture/web/controller/web/FmsFollowupQueueController.java +++ b/acupuncture-admin/src/main/java/com/acupuncture/web/controller/web/FmsFollowupQueueController.java @@ -1,9 +1,8 @@ package com.acupuncture.web.controller.web; -import com.acupuncture.common.annotation.Anonymous; import com.acupuncture.common.core.domain.BaseDto; import com.acupuncture.common.core.domain.JsonResponse; -import com.acupuncture.system.domain.vo.FmsFollowupDto; +import com.acupuncture.system.domain.dto.FmsFollowupDto; import com.acupuncture.system.domain.vo.FmsFollowupVo; import com.acupuncture.system.service.FmsFollowupQueueService; import com.github.pagehelper.PageHelper; diff --git a/acupuncture-admin/src/main/java/com/acupuncture/web/controller/web/PmsPatientController.java b/acupuncture-admin/src/main/java/com/acupuncture/web/controller/web/PmsPatientController.java new file mode 100644 index 00000000..395f5bd1 --- /dev/null +++ b/acupuncture-admin/src/main/java/com/acupuncture/web/controller/web/PmsPatientController.java @@ -0,0 +1,66 @@ +package com.acupuncture.web.controller.web; + +import com.acupuncture.common.core.domain.BaseDto; +import com.acupuncture.common.core.domain.JsonResponse; +import com.acupuncture.system.domain.dto.PmsPatientDto; +import com.acupuncture.system.domain.vo.PmsPatientVo; +import com.acupuncture.system.service.PmsPatientService; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import java.util.List; + +/** + * @Author zzc + * @Package com.acupuncture.web.controller.web + * @Date 2025/2/11 9:13 + * @description: + */ +@Slf4j +@Api(tags = "随访相关") +@RestController +@RequestMapping("/patient") +public class PmsPatientController { + + @Resource + private PmsPatientService pmsPatientService; + + @ApiOperation("添加患者信息") + @PostMapping("/add") + public JsonResponse add(@RequestBody @Validated PmsPatientDto.PatientAdd dto){ + pmsPatientService.add(dto); + return JsonResponse.ok(); + } + + @ApiOperation("修改患者信息") + @PostMapping("/upd") + public JsonResponse upd(@RequestBody @Validated PmsPatientDto.PatientUpd dto){ + pmsPatientService.upd(dto); + return JsonResponse.ok(); + } + + @ApiOperation("删除患者信息") + @PostMapping("/del") + public JsonResponse del(@RequestBody @Validated PmsPatientDto.Delete dto){ + pmsPatientService.del(dto.getIdList()); + return JsonResponse.ok(); + } + + @ApiOperation("查询患者信息") + @PostMapping("/query") + public JsonResponse> query(@RequestBody @Validated BaseDto dto){ + if (dto.getPageNum() > 0) { + PageHelper.startPage(dto.getPageNum(), dto.getPageSize()); + } + return JsonResponse.ok(new PageInfo<>(pmsPatientService.query(dto.getParam()))); + } +} diff --git a/acupuncture-admin/src/main/resources/application-stage.yml b/acupuncture-admin/src/main/resources/application-stage.yml index b9ac721a..f108e725 100644 --- a/acupuncture-admin/src/main/resources/application-stage.yml +++ b/acupuncture-admin/src/main/resources/application-stage.yml @@ -6,9 +6,9 @@ spring: druid: # 主库数据源 master: - url: jdbc:mysql://localhost:3306/acupuncture?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 + url: jdbc:mysql://sd.tall.wiki:3306/acupuncture?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 username: root - password: q7510327 + password: po3OynBO[M3579p6L7)o # 从库数据源 slave: # 从数据源开关/默认关闭 diff --git a/acupuncture-admin/src/main/resources/application.yml b/acupuncture-admin/src/main/resources/application.yml index 119a9df6..548cd8d9 100644 --- a/acupuncture-admin/src/main/resources/application.yml +++ b/acupuncture-admin/src/main/resources/application.yml @@ -7,7 +7,7 @@ acupuncture: # 版权年份 copyrightYear: 2025 # 文件路径 示例( Windows配置D:/acupuncture/uploadPath,Linux配置 /home/acupuncture/uploadPath) - profile: D:/acupuncture/uploadPath + profile: /home/acupuncture/uploadPath # 获取ip地址开关 addressEnabled: false # 验证码类型 math 数字计算 char 字符验证 @@ -52,7 +52,7 @@ spring: # 国际化资源文件路径 basename: i18n/messages profiles: - active: dev + active: stage # 文件上传 servlet: multipart: diff --git a/acupuncture-common/src/main/java/com/acupuncture/common/constant/UserConstants.java b/acupuncture-common/src/main/java/com/acupuncture/common/constant/UserConstants.java index 3a2ea2cd..537ba32c 100644 --- a/acupuncture-common/src/main/java/com/acupuncture/common/constant/UserConstants.java +++ b/acupuncture-common/src/main/java/com/acupuncture/common/constant/UserConstants.java @@ -78,4 +78,6 @@ public class UserConstants */ public static final int PASSWORD_MIN_LENGTH = 5; public static final int PASSWORD_MAX_LENGTH = 20; + + public static final String HEADER_KEY_TOKEN = "Authorization"; } diff --git a/acupuncture-common/src/main/java/com/acupuncture/common/utils/SecurityUtils.java b/acupuncture-common/src/main/java/com/acupuncture/common/utils/SecurityUtils.java index 53b79d53..b99a7454 100644 --- a/acupuncture-common/src/main/java/com/acupuncture/common/utils/SecurityUtils.java +++ b/acupuncture-common/src/main/java/com/acupuncture/common/utils/SecurityUtils.java @@ -175,4 +175,18 @@ public class SecurityUtils .anyMatch(x -> Constants.SUPER_ADMIN.equals(x) || PatternMatchUtils.simpleMatch(x, role)); } + /** + * 租户ID + **/ + public static Long getTenantId() + { + try + { + return getLoginUser().getTenantId(); + } + catch (Exception e) + { + throw new ServiceException("获取租户ID异常", HttpStatus.UNAUTHORIZED); + } + } } diff --git a/acupuncture-framework/src/main/java/com/acupuncture/framework/aspectj/AdminGlobalDataSourceAspect.java b/acupuncture-framework/src/main/java/com/acupuncture/framework/aspectj/AdminGlobalDataSourceAspect.java new file mode 100644 index 00000000..56b94a62 --- /dev/null +++ b/acupuncture-framework/src/main/java/com/acupuncture/framework/aspectj/AdminGlobalDataSourceAspect.java @@ -0,0 +1,100 @@ +package com.acupuncture.framework.aspectj; + +import cn.hutool.core.util.StrUtil; +import com.acupuncture.common.constant.UserConstants; +import com.acupuncture.common.exception.base.BaseException; +import com.acupuncture.common.utils.SecurityUtils; +import com.acupuncture.common.utils.StringUtils; +import com.acupuncture.framework.datasource.DataSourceManager; +import com.acupuncture.framework.datasource.DynamicDataSourceContextHolder; +import com.acupuncture.system.domain.po.UmsDataSource; +import com.acupuncture.system.mapper.SysUserMapper; +import com.acupuncture.system.service.DmsLoginService; +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.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.core.annotation.Order; +import org.springframework.stereotype.Component; +import org.springframework.web.context.request.RequestContextHolder; +import org.springframework.web.context.request.ServletRequestAttributes; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; + +/** + * 多数据源处理 + * + * @author cc + */ +@Aspect +@Order(1) +@Component +public class AdminGlobalDataSourceAspect { + protected Logger logger = LoggerFactory.getLogger(getClass()); + + // @Autowired +// private UmsDataSourceMapper umsDataSourceMapper; + @Resource + private DmsLoginService dmsLoginService; + + private static final String DATASOURCE_NOT_FOUND = "未找到数据源"; + + @Pointcut("(execution(* com.acupuncture.web.controller..*.*(..))) && !@annotation(com.acupuncture.common.annotation.DataSource)") + public void dsPointCut() { + + } + + @Around("dsPointCut()") + public Object around(ProceedingJoinPoint point) throws Throwable { + String dataSourceKey = getDataSource(point); + + if (StringUtils.isNotNull(dataSourceKey)) { + DataSourceManager.setDataSourceKey(dataSourceKey); + } + + try { + return point.proceed(); + } finally { + // 销毁数据源 在执行方法之后 + DynamicDataSourceContextHolder.clearDataSourceType(); + } + } + + /** + * 获取需要切换的数据源 + */ + public String getDataSource(ProceedingJoinPoint point) { + // 获取请求携带的令牌 + HttpServletRequest request = ((ServletRequestAttributes) + RequestContextHolder.getRequestAttributes()).getRequest(); + + String authHeader = request.getHeader(UserConstants.HEADER_KEY_TOKEN); + //token为空 + if(StrUtil.isEmpty(authHeader)){ + return null; + } +// String deptId = request.getHeader(WebConstant.HEADER_KEY_DEPT_ID); + Long tenantId = SecurityUtils.getTenantId(); + if (tenantId == null) { + return null; + } + + //设置所属医院和数据源 +// SecurityUtils.setCurrentHospitalId(Long.parseLong(deptId)); + +// // 获取当前的用户 +// LoginUser loginUser = SecurityUtils.getLoginUser(); +// if(ObjectUtil.isNull(loginUser) || loginUser.getUser().isAdmin()){ +// return null; +// } + //根据部门ID查询数据源 + UmsDataSource dataSource = dmsLoginService.getDataSourceByTenantId(tenantId); + if (dataSource == null) { + throw new BaseException(DATASOURCE_NOT_FOUND); + } + return dataSource.getDataSourceKey(); + } +} diff --git a/acupuncture-framework/src/main/java/com/acupuncture/framework/config/LoadingDataSource.java b/acupuncture-framework/src/main/java/com/acupuncture/framework/config/LoadingDataSource.java new file mode 100644 index 00000000..685ae86e --- /dev/null +++ b/acupuncture-framework/src/main/java/com/acupuncture/framework/config/LoadingDataSource.java @@ -0,0 +1,47 @@ +package com.acupuncture.framework.config; + +import com.acupuncture.common.utils.ExceptionUtil; +import com.acupuncture.framework.datasource.DataSourceManager; +import com.acupuncture.system.domain.po.UmsDataSource; +import com.acupuncture.system.domain.po.UmsDataSourceExample; +import com.acupuncture.system.persist.mapper.UmsDataSourceMapper; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.InitializingBean; +import org.springframework.stereotype.Component; + +import javax.annotation.Resource; +import java.util.List; + + +/** + * 启动初始化数据 + * + * @author zy + * @date 2024/4/27 15:07 + */ +@Component +@Slf4j +public class LoadingDataSource implements InitializingBean { + + @Resource + private UmsDataSourceMapper umsDataSourceMapper; + @Resource + private DataSourceManager dataSourceManager; + + @Override + public void afterPropertiesSet() { + // 加载数据源 + UmsDataSourceExample example = new UmsDataSourceExample(); + example.createCriteria().andDelFlagEqualTo((byte) 0); + List baseDataSources = umsDataSourceMapper.selectByExample(example); + log.info("初次启动加载数据源...{}", baseDataSources); + for (UmsDataSource dataSource : baseDataSources) { + try { + dataSourceManager.createDataSource(dataSource); + } catch (Exception e) { + e.printStackTrace(); + log.error("加载数据源失败:", ExceptionUtil.getExceptionMessage(e)); + } + } + } +} \ No newline at end of file diff --git a/acupuncture-framework/src/main/java/com/acupuncture/framework/datasource/DataSourceManager.java b/acupuncture-framework/src/main/java/com/acupuncture/framework/datasource/DataSourceManager.java new file mode 100644 index 00000000..afc4c8ae --- /dev/null +++ b/acupuncture-framework/src/main/java/com/acupuncture/framework/datasource/DataSourceManager.java @@ -0,0 +1,50 @@ +package com.acupuncture.framework.datasource; + +import com.acupuncture.system.domain.po.UmsDataSource; +import com.zaxxer.hikari.HikariDataSource; +import org.springframework.stereotype.Component; + +import javax.sql.DataSource; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + +/** + * @author zy + * @date 2024/4/27 15:11 + */ +@Component +public class DataSourceManager { + + /** + * JDBC数据源连接池 + */ + public static final Map DATA_SOURCE_POOL_JDBC = new ConcurrentHashMap<>(); + + public void createDataSource(UmsDataSource ds) { + + String datasourceId = ds.getDataSourceKey(); + String username = ds.getUsername(); + String password = ds.getPassword(); + String jdbcUrl = ds.getUrl(); + + HikariDataSource dataSource = new HikariDataSource(); + dataSource.setUsername(username); + dataSource.setPassword(password); + dataSource.setJdbcUrl(jdbcUrl); + dataSource.setMinimumIdle(2); + dataSource.setMaxLifetime(1800000); + dataSource.setIdleTimeout(600000); + dataSource.setConnectionTimeout(10000); + + DataSourceManager.DATA_SOURCE_POOL_JDBC.put(datasourceId, dataSource); + } + + /** + * 设置数据源key + * + * @param key + */ + public static void setDataSourceKey(String key) { + DynamicDataSourceContextHolder.setDataSourceType(key); + } +} diff --git a/acupuncture-framework/src/main/java/com/acupuncture/framework/datasource/DynamicDataSource.java b/acupuncture-framework/src/main/java/com/acupuncture/framework/datasource/DynamicDataSource.java index 3d248f08..085d70a6 100644 --- a/acupuncture-framework/src/main/java/com/acupuncture/framework/datasource/DynamicDataSource.java +++ b/acupuncture-framework/src/main/java/com/acupuncture/framework/datasource/DynamicDataSource.java @@ -1,5 +1,7 @@ package com.acupuncture.framework.datasource; +import java.sql.Connection; +import java.sql.SQLException; import java.util.Map; import javax.sql.DataSource; import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource; @@ -23,4 +25,38 @@ public class DynamicDataSource extends AbstractRoutingDataSource { return DynamicDataSourceContextHolder.getDataSourceType(); } + + /** + * 切换数据源 + * + * @return + */ + @Override + protected DataSource determineTargetDataSource() { + Object dataSourceKey = this.determineCurrentLookupKey(); + // 默认系统数据源 + if (dataSourceKey == null) { + return super.getResolvedDefaultDataSource(); + } + DataSource dataSource = DataSourceManager.DATA_SOURCE_POOL_JDBC.get(dataSourceKey); + + if (dataSource == null) { + throw new RuntimeException("数据源不存在!"); + } + + + return dataSource; + } + + /** + * 获取连接 + * + * @return + * @throws SQLException + */ + @Override + public Connection getConnection() throws SQLException { + Connection connection = this.determineTargetDataSource().getConnection(); + return connection; + } } \ No newline at end of file diff --git a/acupuncture-framework/src/main/java/com/acupuncture/framework/web/service/UserDetailsServiceImpl.java b/acupuncture-framework/src/main/java/com/acupuncture/framework/web/service/UserDetailsServiceImpl.java index eefd8d6c..93dc3214 100644 --- a/acupuncture-framework/src/main/java/com/acupuncture/framework/web/service/UserDetailsServiceImpl.java +++ b/acupuncture-framework/src/main/java/com/acupuncture/framework/web/service/UserDetailsServiceImpl.java @@ -99,7 +99,7 @@ public class UserDetailsServiceImpl implements UserDetailsService public UserDetails createLoginUser(DmsLoginUserVo.DataScoreVo user) { SysUser sysUser = new SysUser(); - sysUser.setUserName(user.getDmsUsername()); + sysUser.setUserName(user.getUsername()); sysUser.setUserId(user.getDmsUserId()); return new LoginUser(user.getDmsUserId(), user.getHospitalId(), sysUser, CollUtil.newHashSet(), user.getTenantId() ,user.getScoreId()); } diff --git a/acupuncture-generator/src/main/resources/mbg.xml b/acupuncture-generator/src/main/resources/mbg.xml index c187fceb..0680f822 100644 --- a/acupuncture-generator/src/main/resources/mbg.xml +++ b/acupuncture-generator/src/main/resources/mbg.xml @@ -62,7 +62,7 @@
-
+
diff --git a/acupuncture-system/src/main/java/com/acupuncture/system/domain/vo/FmsFollowupDto.java b/acupuncture-system/src/main/java/com/acupuncture/system/domain/dto/FmsFollowupDto.java similarity index 88% rename from acupuncture-system/src/main/java/com/acupuncture/system/domain/vo/FmsFollowupDto.java rename to acupuncture-system/src/main/java/com/acupuncture/system/domain/dto/FmsFollowupDto.java index ec3072b4..d8fc7906 100644 --- a/acupuncture-system/src/main/java/com/acupuncture/system/domain/vo/FmsFollowupDto.java +++ b/acupuncture-system/src/main/java/com/acupuncture/system/domain/dto/FmsFollowupDto.java @@ -1,4 +1,4 @@ -package com.acupuncture.system.domain.vo; +package com.acupuncture.system.domain.dto; import io.swagger.annotations.ApiModelProperty; import lombok.Data; diff --git a/acupuncture-system/src/main/java/com/acupuncture/system/domain/dto/PmsPatientDto.java b/acupuncture-system/src/main/java/com/acupuncture/system/domain/dto/PmsPatientDto.java new file mode 100644 index 00000000..ad37dcba --- /dev/null +++ b/acupuncture-system/src/main/java/com/acupuncture/system/domain/dto/PmsPatientDto.java @@ -0,0 +1,90 @@ +package com.acupuncture.system.domain.dto; + +import com.acupuncture.system.domain.po.PmsPatient; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; +import java.util.List; + +/** + * @Author zzc + * @Package com.acupuncture.system.domain.dto + * @Date 2025/2/10 17:26 + * @description: + */ +public class PmsPatientDto { + + @Data + public static class PatientQuery { + @ApiModelProperty("关键字 支持模糊名字,拼音首拼,拼音全拼") + private String keywords; + @ApiModelProperty("开始年龄") + private Integer startAge; + @ApiModelProperty("结束年龄") + private Integer endAge; + @ApiModelProperty("性别") + private Integer gender; + @ApiModelProperty("建档组织") + private Long tenantId; + @ApiModelProperty("身份证") + private String idCard; + @ApiModelProperty("来源") + private Integer sourceId; + @ApiModelProperty("建档人") + private String createBy; + } + + @Data + public static class PatientAdd { + private String name; + + private Byte gender; + + private Date birthDate; + + private String ethnicity; + + private Integer educationYears; + + private String phone; + + private Byte idCardType; + + private String idCard; + + private Byte source; + + private String currentIllnessHistory; + } + + + @Data + public static class PatientUpd { + private Long id; + private String name; + + private Byte gender; + + private Date birthDate; + + private String ethnicity; + + private Integer educationYears; + + private String phone; + + private Byte idCardType; + + private String idCard; + + private Byte source; + + private String currentIllnessHistory; + } + + @Data + public static class Delete { + private List idList; + } +} diff --git a/acupuncture-system/src/main/java/com/acupuncture/system/domain/po/PmsPatient.java b/acupuncture-system/src/main/java/com/acupuncture/system/domain/po/PmsPatient.java new file mode 100644 index 00000000..67b0cbad --- /dev/null +++ b/acupuncture-system/src/main/java/com/acupuncture/system/domain/po/PmsPatient.java @@ -0,0 +1,238 @@ +package com.acupuncture.system.domain.po; + +import java.io.Serializable; +import java.util.Date; + +public class PmsPatient implements Serializable { + private Long id; + + private String name; + + private String pinyinFull; + + private String pinyinSimple; + + private Byte gender; + + private Date birthDate; + + private String ethnicity; + + private Integer educationYears; + + private String phone; + + private Byte idCardType; + + private String idCard; + + private Byte source; + + private String currentIllnessHistory; + + private Byte delFlag; + + private Long tenantId; + + private String createBy; + + private Date createTime; + + private String updateBy; + + private Date updateTime; + + private String remark; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + public String getPinyinFull() { + return pinyinFull; + } + + public void setPinyinFull(String pinyinFull) { + this.pinyinFull = pinyinFull == null ? null : pinyinFull.trim(); + } + + public String getPinyinSimple() { + return pinyinSimple; + } + + public void setPinyinSimple(String pinyinSimple) { + this.pinyinSimple = pinyinSimple == null ? null : pinyinSimple.trim(); + } + + public Byte getGender() { + return gender; + } + + public void setGender(Byte gender) { + this.gender = gender; + } + + public Date getBirthDate() { + return birthDate; + } + + public void setBirthDate(Date birthDate) { + this.birthDate = birthDate; + } + + public String getEthnicity() { + return ethnicity; + } + + public void setEthnicity(String ethnicity) { + this.ethnicity = ethnicity == null ? null : ethnicity.trim(); + } + + public Integer getEducationYears() { + return educationYears; + } + + public void setEducationYears(Integer educationYears) { + this.educationYears = educationYears; + } + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone == null ? null : phone.trim(); + } + + public Byte getIdCardType() { + return idCardType; + } + + public void setIdCardType(Byte idCardType) { + this.idCardType = idCardType; + } + + public String getIdCard() { + return idCard; + } + + public void setIdCard(String idCard) { + this.idCard = idCard == null ? null : idCard.trim(); + } + + public Byte getSource() { + return source; + } + + public void setSource(Byte source) { + this.source = source; + } + + public String getCurrentIllnessHistory() { + return currentIllnessHistory; + } + + public void setCurrentIllnessHistory(String currentIllnessHistory) { + this.currentIllnessHistory = currentIllnessHistory == null ? null : currentIllnessHistory.trim(); + } + + public Byte getDelFlag() { + return delFlag; + } + + public void setDelFlag(Byte delFlag) { + this.delFlag = delFlag; + } + + public Long getTenantId() { + return tenantId; + } + + public void setTenantId(Long tenantId) { + this.tenantId = tenantId; + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy == null ? null : createBy.trim(); + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy == null ? null : updateBy.trim(); + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark == null ? null : remark.trim(); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", name=").append(name); + sb.append(", pinyinFull=").append(pinyinFull); + sb.append(", pinyinSimple=").append(pinyinSimple); + sb.append(", gender=").append(gender); + sb.append(", birthDate=").append(birthDate); + sb.append(", ethnicity=").append(ethnicity); + sb.append(", educationYears=").append(educationYears); + sb.append(", phone=").append(phone); + sb.append(", idCardType=").append(idCardType); + sb.append(", idCard=").append(idCard); + sb.append(", source=").append(source); + sb.append(", currentIllnessHistory=").append(currentIllnessHistory); + sb.append(", delFlag=").append(delFlag); + sb.append(", tenantId=").append(tenantId); + sb.append(", createBy=").append(createBy); + sb.append(", createTime=").append(createTime); + sb.append(", updateBy=").append(updateBy); + sb.append(", updateTime=").append(updateTime); + sb.append(", remark=").append(remark); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/acupuncture-system/src/main/java/com/acupuncture/system/domain/po/PmsPatientExample.java b/acupuncture-system/src/main/java/com/acupuncture/system/domain/po/PmsPatientExample.java new file mode 100644 index 00000000..f7b65924 --- /dev/null +++ b/acupuncture-system/src/main/java/com/acupuncture/system/domain/po/PmsPatientExample.java @@ -0,0 +1,1528 @@ +package com.acupuncture.system.domain.po; + +import java.util.ArrayList; +import java.util.Date; +import java.util.Iterator; +import java.util.List; + +public class PmsPatientExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public PmsPatientExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + protected void addCriterionForJDBCDate(String condition, Date value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + addCriterion(condition, new java.sql.Date(value.getTime()), property); + } + + protected void addCriterionForJDBCDate(String condition, List values, String property) { + if (values == null || values.size() == 0) { + throw new RuntimeException("Value list for " + property + " cannot be null or empty"); + } + List dateList = new ArrayList(); + Iterator iter = values.iterator(); + while (iter.hasNext()) { + dateList.add(new java.sql.Date(iter.next().getTime())); + } + addCriterion(condition, dateList, property); + } + + protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("name is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("name is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("name =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("name <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("name >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("name >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("name <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("name <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("name like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("name not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("name in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("name not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("name between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("name not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andPinyinFullIsNull() { + addCriterion("pinyin_full is null"); + return (Criteria) this; + } + + public Criteria andPinyinFullIsNotNull() { + addCriterion("pinyin_full is not null"); + return (Criteria) this; + } + + public Criteria andPinyinFullEqualTo(String value) { + addCriterion("pinyin_full =", value, "pinyinFull"); + return (Criteria) this; + } + + public Criteria andPinyinFullNotEqualTo(String value) { + addCriterion("pinyin_full <>", value, "pinyinFull"); + return (Criteria) this; + } + + public Criteria andPinyinFullGreaterThan(String value) { + addCriterion("pinyin_full >", value, "pinyinFull"); + return (Criteria) this; + } + + public Criteria andPinyinFullGreaterThanOrEqualTo(String value) { + addCriterion("pinyin_full >=", value, "pinyinFull"); + return (Criteria) this; + } + + public Criteria andPinyinFullLessThan(String value) { + addCriterion("pinyin_full <", value, "pinyinFull"); + return (Criteria) this; + } + + public Criteria andPinyinFullLessThanOrEqualTo(String value) { + addCriterion("pinyin_full <=", value, "pinyinFull"); + return (Criteria) this; + } + + public Criteria andPinyinFullLike(String value) { + addCriterion("pinyin_full like", value, "pinyinFull"); + return (Criteria) this; + } + + public Criteria andPinyinFullNotLike(String value) { + addCriterion("pinyin_full not like", value, "pinyinFull"); + return (Criteria) this; + } + + public Criteria andPinyinFullIn(List values) { + addCriterion("pinyin_full in", values, "pinyinFull"); + return (Criteria) this; + } + + public Criteria andPinyinFullNotIn(List values) { + addCriterion("pinyin_full not in", values, "pinyinFull"); + return (Criteria) this; + } + + public Criteria andPinyinFullBetween(String value1, String value2) { + addCriterion("pinyin_full between", value1, value2, "pinyinFull"); + return (Criteria) this; + } + + public Criteria andPinyinFullNotBetween(String value1, String value2) { + addCriterion("pinyin_full not between", value1, value2, "pinyinFull"); + return (Criteria) this; + } + + public Criteria andPinyinSimpleIsNull() { + addCriterion("pinyin_simple is null"); + return (Criteria) this; + } + + public Criteria andPinyinSimpleIsNotNull() { + addCriterion("pinyin_simple is not null"); + return (Criteria) this; + } + + public Criteria andPinyinSimpleEqualTo(String value) { + addCriterion("pinyin_simple =", value, "pinyinSimple"); + return (Criteria) this; + } + + public Criteria andPinyinSimpleNotEqualTo(String value) { + addCriterion("pinyin_simple <>", value, "pinyinSimple"); + return (Criteria) this; + } + + public Criteria andPinyinSimpleGreaterThan(String value) { + addCriterion("pinyin_simple >", value, "pinyinSimple"); + return (Criteria) this; + } + + public Criteria andPinyinSimpleGreaterThanOrEqualTo(String value) { + addCriterion("pinyin_simple >=", value, "pinyinSimple"); + return (Criteria) this; + } + + public Criteria andPinyinSimpleLessThan(String value) { + addCriterion("pinyin_simple <", value, "pinyinSimple"); + return (Criteria) this; + } + + public Criteria andPinyinSimpleLessThanOrEqualTo(String value) { + addCriterion("pinyin_simple <=", value, "pinyinSimple"); + return (Criteria) this; + } + + public Criteria andPinyinSimpleLike(String value) { + addCriterion("pinyin_simple like", value, "pinyinSimple"); + return (Criteria) this; + } + + public Criteria andPinyinSimpleNotLike(String value) { + addCriterion("pinyin_simple not like", value, "pinyinSimple"); + return (Criteria) this; + } + + public Criteria andPinyinSimpleIn(List values) { + addCriterion("pinyin_simple in", values, "pinyinSimple"); + return (Criteria) this; + } + + public Criteria andPinyinSimpleNotIn(List values) { + addCriterion("pinyin_simple not in", values, "pinyinSimple"); + return (Criteria) this; + } + + public Criteria andPinyinSimpleBetween(String value1, String value2) { + addCriterion("pinyin_simple between", value1, value2, "pinyinSimple"); + return (Criteria) this; + } + + public Criteria andPinyinSimpleNotBetween(String value1, String value2) { + addCriterion("pinyin_simple not between", value1, value2, "pinyinSimple"); + return (Criteria) this; + } + + public Criteria andGenderIsNull() { + addCriterion("gender is null"); + return (Criteria) this; + } + + public Criteria andGenderIsNotNull() { + addCriterion("gender is not null"); + return (Criteria) this; + } + + public Criteria andGenderEqualTo(Byte value) { + addCriterion("gender =", value, "gender"); + return (Criteria) this; + } + + public Criteria andGenderNotEqualTo(Byte value) { + addCriterion("gender <>", value, "gender"); + return (Criteria) this; + } + + public Criteria andGenderGreaterThan(Byte value) { + addCriterion("gender >", value, "gender"); + return (Criteria) this; + } + + public Criteria andGenderGreaterThanOrEqualTo(Byte value) { + addCriterion("gender >=", value, "gender"); + return (Criteria) this; + } + + public Criteria andGenderLessThan(Byte value) { + addCriterion("gender <", value, "gender"); + return (Criteria) this; + } + + public Criteria andGenderLessThanOrEqualTo(Byte value) { + addCriterion("gender <=", value, "gender"); + return (Criteria) this; + } + + public Criteria andGenderIn(List values) { + addCriterion("gender in", values, "gender"); + return (Criteria) this; + } + + public Criteria andGenderNotIn(List values) { + addCriterion("gender not in", values, "gender"); + return (Criteria) this; + } + + public Criteria andGenderBetween(Byte value1, Byte value2) { + addCriterion("gender between", value1, value2, "gender"); + return (Criteria) this; + } + + public Criteria andGenderNotBetween(Byte value1, Byte value2) { + addCriterion("gender not between", value1, value2, "gender"); + return (Criteria) this; + } + + public Criteria andBirthDateIsNull() { + addCriterion("birth_date is null"); + return (Criteria) this; + } + + public Criteria andBirthDateIsNotNull() { + addCriterion("birth_date is not null"); + return (Criteria) this; + } + + public Criteria andBirthDateEqualTo(Date value) { + addCriterionForJDBCDate("birth_date =", value, "birthDate"); + return (Criteria) this; + } + + public Criteria andBirthDateNotEqualTo(Date value) { + addCriterionForJDBCDate("birth_date <>", value, "birthDate"); + return (Criteria) this; + } + + public Criteria andBirthDateGreaterThan(Date value) { + addCriterionForJDBCDate("birth_date >", value, "birthDate"); + return (Criteria) this; + } + + public Criteria andBirthDateGreaterThanOrEqualTo(Date value) { + addCriterionForJDBCDate("birth_date >=", value, "birthDate"); + return (Criteria) this; + } + + public Criteria andBirthDateLessThan(Date value) { + addCriterionForJDBCDate("birth_date <", value, "birthDate"); + return (Criteria) this; + } + + public Criteria andBirthDateLessThanOrEqualTo(Date value) { + addCriterionForJDBCDate("birth_date <=", value, "birthDate"); + return (Criteria) this; + } + + public Criteria andBirthDateIn(List values) { + addCriterionForJDBCDate("birth_date in", values, "birthDate"); + return (Criteria) this; + } + + public Criteria andBirthDateNotIn(List values) { + addCriterionForJDBCDate("birth_date not in", values, "birthDate"); + return (Criteria) this; + } + + public Criteria andBirthDateBetween(Date value1, Date value2) { + addCriterionForJDBCDate("birth_date between", value1, value2, "birthDate"); + return (Criteria) this; + } + + public Criteria andBirthDateNotBetween(Date value1, Date value2) { + addCriterionForJDBCDate("birth_date not between", value1, value2, "birthDate"); + return (Criteria) this; + } + + public Criteria andEthnicityIsNull() { + addCriterion("ethnicity is null"); + return (Criteria) this; + } + + public Criteria andEthnicityIsNotNull() { + addCriterion("ethnicity is not null"); + return (Criteria) this; + } + + public Criteria andEthnicityEqualTo(String value) { + addCriterion("ethnicity =", value, "ethnicity"); + return (Criteria) this; + } + + public Criteria andEthnicityNotEqualTo(String value) { + addCriterion("ethnicity <>", value, "ethnicity"); + return (Criteria) this; + } + + public Criteria andEthnicityGreaterThan(String value) { + addCriterion("ethnicity >", value, "ethnicity"); + return (Criteria) this; + } + + public Criteria andEthnicityGreaterThanOrEqualTo(String value) { + addCriterion("ethnicity >=", value, "ethnicity"); + return (Criteria) this; + } + + public Criteria andEthnicityLessThan(String value) { + addCriterion("ethnicity <", value, "ethnicity"); + return (Criteria) this; + } + + public Criteria andEthnicityLessThanOrEqualTo(String value) { + addCriterion("ethnicity <=", value, "ethnicity"); + return (Criteria) this; + } + + public Criteria andEthnicityLike(String value) { + addCriterion("ethnicity like", value, "ethnicity"); + return (Criteria) this; + } + + public Criteria andEthnicityNotLike(String value) { + addCriterion("ethnicity not like", value, "ethnicity"); + return (Criteria) this; + } + + public Criteria andEthnicityIn(List values) { + addCriterion("ethnicity in", values, "ethnicity"); + return (Criteria) this; + } + + public Criteria andEthnicityNotIn(List values) { + addCriterion("ethnicity not in", values, "ethnicity"); + return (Criteria) this; + } + + public Criteria andEthnicityBetween(String value1, String value2) { + addCriterion("ethnicity between", value1, value2, "ethnicity"); + return (Criteria) this; + } + + public Criteria andEthnicityNotBetween(String value1, String value2) { + addCriterion("ethnicity not between", value1, value2, "ethnicity"); + return (Criteria) this; + } + + public Criteria andEducationYearsIsNull() { + addCriterion("education_years is null"); + return (Criteria) this; + } + + public Criteria andEducationYearsIsNotNull() { + addCriterion("education_years is not null"); + return (Criteria) this; + } + + public Criteria andEducationYearsEqualTo(Integer value) { + addCriterion("education_years =", value, "educationYears"); + return (Criteria) this; + } + + public Criteria andEducationYearsNotEqualTo(Integer value) { + addCriterion("education_years <>", value, "educationYears"); + return (Criteria) this; + } + + public Criteria andEducationYearsGreaterThan(Integer value) { + addCriterion("education_years >", value, "educationYears"); + return (Criteria) this; + } + + public Criteria andEducationYearsGreaterThanOrEqualTo(Integer value) { + addCriterion("education_years >=", value, "educationYears"); + return (Criteria) this; + } + + public Criteria andEducationYearsLessThan(Integer value) { + addCriterion("education_years <", value, "educationYears"); + return (Criteria) this; + } + + public Criteria andEducationYearsLessThanOrEqualTo(Integer value) { + addCriterion("education_years <=", value, "educationYears"); + return (Criteria) this; + } + + public Criteria andEducationYearsIn(List values) { + addCriterion("education_years in", values, "educationYears"); + return (Criteria) this; + } + + public Criteria andEducationYearsNotIn(List values) { + addCriterion("education_years not in", values, "educationYears"); + return (Criteria) this; + } + + public Criteria andEducationYearsBetween(Integer value1, Integer value2) { + addCriterion("education_years between", value1, value2, "educationYears"); + return (Criteria) this; + } + + public Criteria andEducationYearsNotBetween(Integer value1, Integer value2) { + addCriterion("education_years not between", value1, value2, "educationYears"); + return (Criteria) this; + } + + public Criteria andPhoneIsNull() { + addCriterion("phone is null"); + return (Criteria) this; + } + + public Criteria andPhoneIsNotNull() { + addCriterion("phone is not null"); + return (Criteria) this; + } + + public Criteria andPhoneEqualTo(String value) { + addCriterion("phone =", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneNotEqualTo(String value) { + addCriterion("phone <>", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneGreaterThan(String value) { + addCriterion("phone >", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneGreaterThanOrEqualTo(String value) { + addCriterion("phone >=", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneLessThan(String value) { + addCriterion("phone <", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneLessThanOrEqualTo(String value) { + addCriterion("phone <=", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneLike(String value) { + addCriterion("phone like", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneNotLike(String value) { + addCriterion("phone not like", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneIn(List values) { + addCriterion("phone in", values, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneNotIn(List values) { + addCriterion("phone not in", values, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneBetween(String value1, String value2) { + addCriterion("phone between", value1, value2, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneNotBetween(String value1, String value2) { + addCriterion("phone not between", value1, value2, "phone"); + return (Criteria) this; + } + + public Criteria andIdCardTypeIsNull() { + addCriterion("id_card_type is null"); + return (Criteria) this; + } + + public Criteria andIdCardTypeIsNotNull() { + addCriterion("id_card_type is not null"); + return (Criteria) this; + } + + public Criteria andIdCardTypeEqualTo(Byte value) { + addCriterion("id_card_type =", value, "idCardType"); + return (Criteria) this; + } + + public Criteria andIdCardTypeNotEqualTo(Byte value) { + addCriterion("id_card_type <>", value, "idCardType"); + return (Criteria) this; + } + + public Criteria andIdCardTypeGreaterThan(Byte value) { + addCriterion("id_card_type >", value, "idCardType"); + return (Criteria) this; + } + + public Criteria andIdCardTypeGreaterThanOrEqualTo(Byte value) { + addCriterion("id_card_type >=", value, "idCardType"); + return (Criteria) this; + } + + public Criteria andIdCardTypeLessThan(Byte value) { + addCriterion("id_card_type <", value, "idCardType"); + return (Criteria) this; + } + + public Criteria andIdCardTypeLessThanOrEqualTo(Byte value) { + addCriterion("id_card_type <=", value, "idCardType"); + return (Criteria) this; + } + + public Criteria andIdCardTypeIn(List values) { + addCriterion("id_card_type in", values, "idCardType"); + return (Criteria) this; + } + + public Criteria andIdCardTypeNotIn(List values) { + addCriterion("id_card_type not in", values, "idCardType"); + return (Criteria) this; + } + + public Criteria andIdCardTypeBetween(Byte value1, Byte value2) { + addCriterion("id_card_type between", value1, value2, "idCardType"); + return (Criteria) this; + } + + public Criteria andIdCardTypeNotBetween(Byte value1, Byte value2) { + addCriterion("id_card_type not between", value1, value2, "idCardType"); + return (Criteria) this; + } + + public Criteria andIdCardIsNull() { + addCriterion("id_card is null"); + return (Criteria) this; + } + + public Criteria andIdCardIsNotNull() { + addCriterion("id_card is not null"); + return (Criteria) this; + } + + public Criteria andIdCardEqualTo(String value) { + addCriterion("id_card =", value, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardNotEqualTo(String value) { + addCriterion("id_card <>", value, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardGreaterThan(String value) { + addCriterion("id_card >", value, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardGreaterThanOrEqualTo(String value) { + addCriterion("id_card >=", value, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardLessThan(String value) { + addCriterion("id_card <", value, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardLessThanOrEqualTo(String value) { + addCriterion("id_card <=", value, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardLike(String value) { + addCriterion("id_card like", value, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardNotLike(String value) { + addCriterion("id_card not like", value, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardIn(List values) { + addCriterion("id_card in", values, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardNotIn(List values) { + addCriterion("id_card not in", values, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardBetween(String value1, String value2) { + addCriterion("id_card between", value1, value2, "idCard"); + return (Criteria) this; + } + + public Criteria andIdCardNotBetween(String value1, String value2) { + addCriterion("id_card not between", value1, value2, "idCard"); + return (Criteria) this; + } + + public Criteria andSourceIsNull() { + addCriterion("source is null"); + return (Criteria) this; + } + + public Criteria andSourceIsNotNull() { + addCriterion("source is not null"); + return (Criteria) this; + } + + public Criteria andSourceEqualTo(Byte value) { + addCriterion("source =", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceNotEqualTo(Byte value) { + addCriterion("source <>", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceGreaterThan(Byte value) { + addCriterion("source >", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceGreaterThanOrEqualTo(Byte value) { + addCriterion("source >=", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceLessThan(Byte value) { + addCriterion("source <", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceLessThanOrEqualTo(Byte value) { + addCriterion("source <=", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceIn(List values) { + addCriterion("source in", values, "source"); + return (Criteria) this; + } + + public Criteria andSourceNotIn(List values) { + addCriterion("source not in", values, "source"); + return (Criteria) this; + } + + public Criteria andSourceBetween(Byte value1, Byte value2) { + addCriterion("source between", value1, value2, "source"); + return (Criteria) this; + } + + public Criteria andSourceNotBetween(Byte value1, Byte value2) { + addCriterion("source not between", value1, value2, "source"); + return (Criteria) this; + } + + public Criteria andCurrentIllnessHistoryIsNull() { + addCriterion("current_illness_history is null"); + return (Criteria) this; + } + + public Criteria andCurrentIllnessHistoryIsNotNull() { + addCriterion("current_illness_history is not null"); + return (Criteria) this; + } + + public Criteria andCurrentIllnessHistoryEqualTo(String value) { + addCriterion("current_illness_history =", value, "currentIllnessHistory"); + return (Criteria) this; + } + + public Criteria andCurrentIllnessHistoryNotEqualTo(String value) { + addCriterion("current_illness_history <>", value, "currentIllnessHistory"); + return (Criteria) this; + } + + public Criteria andCurrentIllnessHistoryGreaterThan(String value) { + addCriterion("current_illness_history >", value, "currentIllnessHistory"); + return (Criteria) this; + } + + public Criteria andCurrentIllnessHistoryGreaterThanOrEqualTo(String value) { + addCriterion("current_illness_history >=", value, "currentIllnessHistory"); + return (Criteria) this; + } + + public Criteria andCurrentIllnessHistoryLessThan(String value) { + addCriterion("current_illness_history <", value, "currentIllnessHistory"); + return (Criteria) this; + } + + public Criteria andCurrentIllnessHistoryLessThanOrEqualTo(String value) { + addCriterion("current_illness_history <=", value, "currentIllnessHistory"); + return (Criteria) this; + } + + public Criteria andCurrentIllnessHistoryLike(String value) { + addCriterion("current_illness_history like", value, "currentIllnessHistory"); + return (Criteria) this; + } + + public Criteria andCurrentIllnessHistoryNotLike(String value) { + addCriterion("current_illness_history not like", value, "currentIllnessHistory"); + return (Criteria) this; + } + + public Criteria andCurrentIllnessHistoryIn(List values) { + addCriterion("current_illness_history in", values, "currentIllnessHistory"); + return (Criteria) this; + } + + public Criteria andCurrentIllnessHistoryNotIn(List values) { + addCriterion("current_illness_history not in", values, "currentIllnessHistory"); + return (Criteria) this; + } + + public Criteria andCurrentIllnessHistoryBetween(String value1, String value2) { + addCriterion("current_illness_history between", value1, value2, "currentIllnessHistory"); + return (Criteria) this; + } + + public Criteria andCurrentIllnessHistoryNotBetween(String value1, String value2) { + addCriterion("current_illness_history not between", value1, value2, "currentIllnessHistory"); + return (Criteria) this; + } + + public Criteria andDelFlagIsNull() { + addCriterion("del_flag is null"); + return (Criteria) this; + } + + public Criteria andDelFlagIsNotNull() { + addCriterion("del_flag is not null"); + return (Criteria) this; + } + + public Criteria andDelFlagEqualTo(Byte value) { + addCriterion("del_flag =", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagNotEqualTo(Byte value) { + addCriterion("del_flag <>", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagGreaterThan(Byte value) { + addCriterion("del_flag >", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagGreaterThanOrEqualTo(Byte value) { + addCriterion("del_flag >=", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagLessThan(Byte value) { + addCriterion("del_flag <", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagLessThanOrEqualTo(Byte value) { + addCriterion("del_flag <=", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagIn(List values) { + addCriterion("del_flag in", values, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagNotIn(List values) { + addCriterion("del_flag not in", values, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagBetween(Byte value1, Byte value2) { + addCriterion("del_flag between", value1, value2, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagNotBetween(Byte value1, Byte value2) { + addCriterion("del_flag not between", value1, value2, "delFlag"); + return (Criteria) this; + } + + public Criteria andTenantIdIsNull() { + addCriterion("tenant_id is null"); + return (Criteria) this; + } + + public Criteria andTenantIdIsNotNull() { + addCriterion("tenant_id is not null"); + return (Criteria) this; + } + + public Criteria andTenantIdEqualTo(Long value) { + addCriterion("tenant_id =", value, "tenantId"); + return (Criteria) this; + } + + public Criteria andTenantIdNotEqualTo(Long value) { + addCriterion("tenant_id <>", value, "tenantId"); + return (Criteria) this; + } + + public Criteria andTenantIdGreaterThan(Long value) { + addCriterion("tenant_id >", value, "tenantId"); + return (Criteria) this; + } + + public Criteria andTenantIdGreaterThanOrEqualTo(Long value) { + addCriterion("tenant_id >=", value, "tenantId"); + return (Criteria) this; + } + + public Criteria andTenantIdLessThan(Long value) { + addCriterion("tenant_id <", value, "tenantId"); + return (Criteria) this; + } + + public Criteria andTenantIdLessThanOrEqualTo(Long value) { + addCriterion("tenant_id <=", value, "tenantId"); + return (Criteria) this; + } + + public Criteria andTenantIdIn(List values) { + addCriterion("tenant_id in", values, "tenantId"); + return (Criteria) this; + } + + public Criteria andTenantIdNotIn(List values) { + addCriterion("tenant_id not in", values, "tenantId"); + return (Criteria) this; + } + + public Criteria andTenantIdBetween(Long value1, Long value2) { + addCriterion("tenant_id between", value1, value2, "tenantId"); + return (Criteria) this; + } + + public Criteria andTenantIdNotBetween(Long value1, Long value2) { + addCriterion("tenant_id not between", value1, value2, "tenantId"); + return (Criteria) this; + } + + public Criteria andCreateByIsNull() { + addCriterion("create_by is null"); + return (Criteria) this; + } + + public Criteria andCreateByIsNotNull() { + addCriterion("create_by is not null"); + return (Criteria) this; + } + + public Criteria andCreateByEqualTo(String value) { + addCriterion("create_by =", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByNotEqualTo(String value) { + addCriterion("create_by <>", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByGreaterThan(String value) { + addCriterion("create_by >", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByGreaterThanOrEqualTo(String value) { + addCriterion("create_by >=", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByLessThan(String value) { + addCriterion("create_by <", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByLessThanOrEqualTo(String value) { + addCriterion("create_by <=", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByLike(String value) { + addCriterion("create_by like", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByNotLike(String value) { + addCriterion("create_by not like", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByIn(List values) { + addCriterion("create_by in", values, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByNotIn(List values) { + addCriterion("create_by not in", values, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByBetween(String value1, String value2) { + addCriterion("create_by between", value1, value2, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByNotBetween(String value1, String value2) { + addCriterion("create_by not between", value1, value2, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Date value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Date value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Date value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Date value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Date value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Date value1, Date value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Date value1, Date value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateByIsNull() { + addCriterion("update_by is null"); + return (Criteria) this; + } + + public Criteria andUpdateByIsNotNull() { + addCriterion("update_by is not null"); + return (Criteria) this; + } + + public Criteria andUpdateByEqualTo(String value) { + addCriterion("update_by =", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByNotEqualTo(String value) { + addCriterion("update_by <>", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByGreaterThan(String value) { + addCriterion("update_by >", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByGreaterThanOrEqualTo(String value) { + addCriterion("update_by >=", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByLessThan(String value) { + addCriterion("update_by <", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByLessThanOrEqualTo(String value) { + addCriterion("update_by <=", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByLike(String value) { + addCriterion("update_by like", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByNotLike(String value) { + addCriterion("update_by not like", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByIn(List values) { + addCriterion("update_by in", values, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByNotIn(List values) { + addCriterion("update_by not in", values, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByBetween(String value1, String value2) { + addCriterion("update_by between", value1, value2, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByNotBetween(String value1, String value2) { + addCriterion("update_by not between", value1, value2, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Date value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Date value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Date value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Date value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Date value1, Date value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andRemarkIsNull() { + addCriterion("remark is null"); + return (Criteria) this; + } + + public Criteria andRemarkIsNotNull() { + addCriterion("remark is not null"); + return (Criteria) this; + } + + public Criteria andRemarkEqualTo(String value) { + addCriterion("remark =", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotEqualTo(String value) { + addCriterion("remark <>", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkGreaterThan(String value) { + addCriterion("remark >", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkGreaterThanOrEqualTo(String value) { + addCriterion("remark >=", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLessThan(String value) { + addCriterion("remark <", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLessThanOrEqualTo(String value) { + addCriterion("remark <=", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLike(String value) { + addCriterion("remark like", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotLike(String value) { + addCriterion("remark not like", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkIn(List values) { + addCriterion("remark in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotIn(List values) { + addCriterion("remark not in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkBetween(String value1, String value2) { + addCriterion("remark between", value1, value2, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotBetween(String value1, String value2) { + addCriterion("remark not between", value1, value2, "remark"); + return (Criteria) this; + } + } + + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/acupuncture-system/src/main/java/com/acupuncture/system/domain/vo/PmsPatientVo.java b/acupuncture-system/src/main/java/com/acupuncture/system/domain/vo/PmsPatientVo.java new file mode 100644 index 00000000..ef943c21 --- /dev/null +++ b/acupuncture-system/src/main/java/com/acupuncture/system/domain/vo/PmsPatientVo.java @@ -0,0 +1,54 @@ +package com.acupuncture.system.domain.vo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; +import java.util.List; + +/** + * @Author zzc + * @Package com.acupuncture.system.domain.vo + * @Date 2025/2/10 17:22 + * @description: + */ +public class PmsPatientVo { + + @Data + public static class PatientResult { + @ApiModelProperty("") + private Long id; + @ApiModelProperty("患者姓名") + private String name; + @ApiModelProperty("性别(0男, 1女)") + private Integer gender; + + @ApiModelProperty("出生日期") + @JsonFormat(pattern = "yyyy-MM-dd") + private Date birthDate; + @ApiModelProperty("民族") + private String ethnicity; + @ApiModelProperty("受教育年限") + private Integer educationYears; + @ApiModelProperty("手机号码") + private String phone; + @ApiModelProperty("证件类型(0身份证;1护照或外国人永居证; 2港澳居民来往内地通行; 3台湾居民来往大陆通行证; 4其他;)") + private Integer idCardType; + @ApiModelProperty("证件号码") + private String idCard; + @ApiModelProperty("数据来源(0筛查, 1录入, 2HIS)") + private Integer source; + @ApiModelProperty("现病史,存储格式:[\"高血压\",\"脑血管病\"]") + private String currentIllnessHistory; + @ApiModelProperty("建档组织(当前登录账号医院ID)") + private Long organizationId; + @ApiModelProperty("创建者") + private String createBy; + @ApiModelProperty("创建时间") + private Date createTime; + @ApiModelProperty("备注") + private String remark; + } + +} diff --git a/acupuncture-system/src/main/java/com/acupuncture/system/mapper/SysUserMapper.java b/acupuncture-system/src/main/java/com/acupuncture/system/mapper/SysUserMapper.java index 064bfb77..4710e16c 100644 --- a/acupuncture-system/src/main/java/com/acupuncture/system/mapper/SysUserMapper.java +++ b/acupuncture-system/src/main/java/com/acupuncture/system/mapper/SysUserMapper.java @@ -51,6 +51,13 @@ public interface SysUserMapper */ public SysUser selectUserById(Long userId); + /** + * 通过租户ID和用户名查询用户 + * + * @param userId 用户ID + * @return 用户对象信息 + */ + SysUser selectUserByTenantId(@Param("tenantId") Long tenantId, @Param("userName") String userName); /** * 新增用户信息 * diff --git a/acupuncture-system/src/main/java/com/acupuncture/system/persist/dao/DmsUserDao.java b/acupuncture-system/src/main/java/com/acupuncture/system/persist/dao/DmsUserDao.java index 556ffbd5..d99b6086 100644 --- a/acupuncture-system/src/main/java/com/acupuncture/system/persist/dao/DmsUserDao.java +++ b/acupuncture-system/src/main/java/com/acupuncture/system/persist/dao/DmsUserDao.java @@ -20,7 +20,6 @@ public interface DmsUserDao { * @param userName 用户名 * @return 用户对象信息 */ - @DataSource(DataSourceType.MASTER) DmsLoginUserVo.DmsUserVo selectUserByUserName(@Param("userName") String userName); /** @@ -28,7 +27,6 @@ public interface DmsUserDao { * @param userName * @return */ - @DataSource(DataSourceType.MASTER) DmsLoginUserVo.DataScoreVo queryLoginUserDataScore(@Param("userName") String userName); /** diff --git a/acupuncture-system/src/main/java/com/acupuncture/system/persist/dao/PmsPatientDao.java b/acupuncture-system/src/main/java/com/acupuncture/system/persist/dao/PmsPatientDao.java new file mode 100644 index 00000000..a5ef1f96 --- /dev/null +++ b/acupuncture-system/src/main/java/com/acupuncture/system/persist/dao/PmsPatientDao.java @@ -0,0 +1,18 @@ +package com.acupuncture.system.persist.dao; + +import com.acupuncture.system.domain.dto.PmsPatientDto; +import com.acupuncture.system.domain.vo.PmsPatientVo; + +import java.util.List; + +/** + * @Author zzc + * @Package com.acupuncture.system.persist.dao + * @Date 2025/2/10 17:55 + * @description: + */ +public interface PmsPatientDao { + + List query(PmsPatientDto.PatientQuery dto); + +} diff --git a/acupuncture-system/src/main/java/com/acupuncture/system/persist/mapper/PmsPatientMapper.java b/acupuncture-system/src/main/java/com/acupuncture/system/persist/mapper/PmsPatientMapper.java new file mode 100644 index 00000000..487cb581 --- /dev/null +++ b/acupuncture-system/src/main/java/com/acupuncture/system/persist/mapper/PmsPatientMapper.java @@ -0,0 +1,28 @@ +package com.acupuncture.system.persist.mapper; + +import com.acupuncture.system.domain.po.PmsPatient; +import com.acupuncture.system.domain.po.PmsPatientExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface PmsPatientMapper { + long countByExample(PmsPatientExample example); + + int deleteByPrimaryKey(Long id); + + int insert(PmsPatient record); + + int insertSelective(PmsPatient record); + + List selectByExample(PmsPatientExample example); + + PmsPatient selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") PmsPatient record, @Param("example") PmsPatientExample example); + + int updateByExample(@Param("record") PmsPatient record, @Param("example") PmsPatientExample example); + + int updateByPrimaryKeySelective(PmsPatient record); + + int updateByPrimaryKey(PmsPatient record); +} \ No newline at end of file diff --git a/acupuncture-system/src/main/java/com/acupuncture/system/service/DmsLoginService.java b/acupuncture-system/src/main/java/com/acupuncture/system/service/DmsLoginService.java index cc5e7a8d..6ec0f225 100644 --- a/acupuncture-system/src/main/java/com/acupuncture/system/service/DmsLoginService.java +++ b/acupuncture-system/src/main/java/com/acupuncture/system/service/DmsLoginService.java @@ -2,6 +2,7 @@ package com.acupuncture.system.service; import com.acupuncture.common.core.domain.entity.SysUser; import com.acupuncture.system.domain.po.DmsUser; +import com.acupuncture.system.domain.po.UmsDataSource; import com.acupuncture.system.domain.vo.DmsLoginUserVo; /** @@ -27,4 +28,11 @@ public interface DmsLoginService { * @return 结果 */ public int resetPwd(DmsLoginUserVo.DmsUserVo user); + + /** + * 根据租户ID获取数据源 + * @param tenantId + * @return + */ + UmsDataSource getDataSourceByTenantId(Long tenantId); } diff --git a/acupuncture-system/src/main/java/com/acupuncture/system/service/ISysUserService.java b/acupuncture-system/src/main/java/com/acupuncture/system/service/ISysUserService.java index ffa85491..3152f59c 100644 --- a/acupuncture-system/src/main/java/com/acupuncture/system/service/ISysUserService.java +++ b/acupuncture-system/src/main/java/com/acupuncture/system/service/ISysUserService.java @@ -50,6 +50,14 @@ public interface ISysUserService */ public SysUser selectUserById(Long userId); + /** + * 通过用户ID查询用户 + * + * @param userId 用户ID + * @return 用户对象信息 + */ + public SysUser selectUserByTenantId(Long tenantId, String username); + /** * 根据用户ID查询用户所属角色组 * diff --git a/acupuncture-system/src/main/java/com/acupuncture/system/service/PmsPatientService.java b/acupuncture-system/src/main/java/com/acupuncture/system/service/PmsPatientService.java new file mode 100644 index 00000000..beea39b1 --- /dev/null +++ b/acupuncture-system/src/main/java/com/acupuncture/system/service/PmsPatientService.java @@ -0,0 +1,47 @@ +package com.acupuncture.system.service; + +import com.acupuncture.common.annotation.DataSource; +import com.acupuncture.common.enums.DataSourceType; +import com.acupuncture.system.domain.dto.PmsPatientDto; +import com.acupuncture.system.domain.vo.PmsPatientVo; + +import java.util.List; + +/** + * @Author zzc + * @Package com.acupuncture.system.service + * @Date 2025/2/10 17:29 + * @description: + */ +public interface PmsPatientService { + + /** + * 添加患者信息 + * @param dto + * @return + */ + int add(PmsPatientDto.PatientAdd dto); + + /** + * 修改患者信息 + * @param dto + * @return + */ + int upd(PmsPatientDto.PatientUpd dto); + + /** + * 删除患者信息 + * @param idList + * @return + */ + int del(List idList); + + /** + * 查询患者信息 + * @param dto + * @return + */ + List query(PmsPatientDto.PatientQuery dto); + + +} diff --git a/acupuncture-system/src/main/java/com/acupuncture/system/service/impl/DmsLoginServiceImpl.java b/acupuncture-system/src/main/java/com/acupuncture/system/service/impl/DmsLoginServiceImpl.java index 929b978a..3d5ce1ec 100644 --- a/acupuncture-system/src/main/java/com/acupuncture/system/service/impl/DmsLoginServiceImpl.java +++ b/acupuncture-system/src/main/java/com/acupuncture/system/service/impl/DmsLoginServiceImpl.java @@ -1,8 +1,12 @@ package com.acupuncture.system.service.impl; +import com.acupuncture.system.domain.po.DmsTenant; import com.acupuncture.system.domain.po.DmsUser; +import com.acupuncture.system.domain.po.UmsDataSource; import com.acupuncture.system.domain.vo.DmsLoginUserVo; import com.acupuncture.system.persist.dao.DmsUserDao; +import com.acupuncture.system.persist.mapper.DmsTenantMapper; +import com.acupuncture.system.persist.mapper.UmsDataSourceMapper; import com.acupuncture.system.service.DmsLoginService; import org.springframework.stereotype.Service; @@ -20,6 +24,12 @@ public class DmsLoginServiceImpl implements DmsLoginService { @Resource private DmsUserDao dmsUserDao; + @Resource + private DmsTenantMapper dmsTenantMapper; + + @Resource + private UmsDataSourceMapper umsDataSourceMapper; + @Override public DmsLoginUserVo.DataScoreVo selectUserByUserName(String userName) { return dmsUserDao.queryLoginUserDataScore(userName); @@ -29,4 +39,20 @@ public class DmsLoginServiceImpl implements DmsLoginService { public int resetPwd(DmsLoginUserVo.DmsUserVo user) { return dmsUserDao.updateUser(user); } + + @Override + public UmsDataSource getDataSourceByTenantId(Long tenantId) { + DmsTenant dmsTenant = dmsTenantMapper.selectByPrimaryKey(tenantId); + if (dmsTenant == null || dmsTenant.getDelFlag() == 1) { + return null; + } + if (dmsTenant.getDataSourceId() != null) { + UmsDataSource umsDataSource = umsDataSourceMapper.selectByPrimaryKey(dmsTenant.getDataSourceId()); + if (umsDataSource == null || umsDataSource.getDelFlag() == 1) { + return null; + } + return umsDataSource; + } + return null; + } } diff --git a/acupuncture-system/src/main/java/com/acupuncture/system/service/impl/PmsPatientServiceImpl.java b/acupuncture-system/src/main/java/com/acupuncture/system/service/impl/PmsPatientServiceImpl.java new file mode 100644 index 00000000..94580e08 --- /dev/null +++ b/acupuncture-system/src/main/java/com/acupuncture/system/service/impl/PmsPatientServiceImpl.java @@ -0,0 +1,68 @@ +package com.acupuncture.system.service.impl; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.util.IdUtil; +import com.acupuncture.common.utils.SecurityUtils; +import com.acupuncture.system.domain.dto.PmsPatientDto; +import com.acupuncture.system.domain.po.PmsPatient; +import com.acupuncture.system.domain.po.PmsPatientExample; +import com.acupuncture.system.domain.vo.PmsPatientVo; +import com.acupuncture.system.persist.dao.PmsPatientDao; +import com.acupuncture.system.persist.mapper.PmsPatientMapper; +import com.acupuncture.system.service.PmsPatientService; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.Date; +import java.util.List; + +/** + * @Author zzc + * @Package com.acupuncture.system.service + * @Date 2025/2/10 17:29 + * @description: + */ +@Service +@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) +public class PmsPatientServiceImpl implements PmsPatientService { + + @Resource + private PmsPatientMapper pmsPatientMapper; + @Resource + private PmsPatientDao pmsPatientDao; + + @Override + public int add(PmsPatientDto.PatientAdd dto) { + PmsPatient pmsPatient = BeanUtil.copyProperties(dto, PmsPatient.class); + pmsPatient.setId(IdUtil.getSnowflakeNextId()); + pmsPatient.setCreateBy(SecurityUtils.getUsername()); + pmsPatient.setDelFlag((byte) 0); + pmsPatient.setCreateTime(new Date()); + pmsPatient.setTenantId(SecurityUtils.getTenantId()); + return pmsPatientMapper.insertSelective(pmsPatient); + } + + @Override + public int upd(PmsPatientDto.PatientUpd dto) { + PmsPatient pmsPatient = BeanUtil.copyProperties(dto, PmsPatient.class); + pmsPatient.setUpdateBy(SecurityUtils.getUsername()); + pmsPatient.setUpdateTime(new Date()); + return pmsPatientMapper.updateByPrimaryKeySelective(pmsPatient); + } + + @Override + public int del(List idList) { + PmsPatientExample pmsPatientExample = new PmsPatientExample(); + pmsPatientExample.createCriteria().andIdIn(idList).andDelFlagEqualTo((byte) 0); + PmsPatient pmsPatient = new PmsPatient(); + pmsPatient.setDelFlag((byte) 1); + return pmsPatientMapper.updateByExampleSelective(pmsPatient, pmsPatientExample); + } + + @Override + public List query(PmsPatientDto.PatientQuery dto) { + return pmsPatientDao.query(dto); + } +} diff --git a/acupuncture-system/src/main/java/com/acupuncture/system/service/impl/SysUserServiceImpl.java b/acupuncture-system/src/main/java/com/acupuncture/system/service/impl/SysUserServiceImpl.java index d387030f..0a046b65 100644 --- a/acupuncture-system/src/main/java/com/acupuncture/system/service/impl/SysUserServiceImpl.java +++ b/acupuncture-system/src/main/java/com/acupuncture/system/service/impl/SysUserServiceImpl.java @@ -128,6 +128,11 @@ public class SysUserServiceImpl implements ISysUserService return userMapper.selectUserById(userId); } + @Override + public SysUser selectUserByTenantId(Long tenantId, String username) { + return userMapper.selectUserByTenantId(tenantId, username); + } + /** * 查询用户所属角色组 * diff --git a/acupuncture-system/src/main/resources/mapper/dao/PmsPatientDao.xml b/acupuncture-system/src/main/resources/mapper/dao/PmsPatientDao.xml new file mode 100644 index 00000000..59b6245f --- /dev/null +++ b/acupuncture-system/src/main/resources/mapper/dao/PmsPatientDao.xml @@ -0,0 +1,55 @@ + + + + + + diff --git a/acupuncture-system/src/main/resources/mapper/dao/SysPowerDao.xml b/acupuncture-system/src/main/resources/mapper/dao/SysPowerDao.xml index 8870ce62..1710fcdc 100644 --- a/acupuncture-system/src/main/resources/mapper/dao/SysPowerDao.xml +++ b/acupuncture-system/src/main/resources/mapper/dao/SysPowerDao.xml @@ -23,7 +23,7 @@ select d.id as dmsUserId, d.nick_name as dmsUserNickName, - d.user_name, + d.user_name as username, d.password, s.id as scoreId, s.data_source_key as dataSourceKey, @@ -42,7 +42,7 @@ left join ums_data_source s on - d.tenant_id = t.id + t.data_source_id = s.id and d.user_name = #{userName} @@ -50,6 +50,7 @@ and s.del_flag = 0 and t.del_flag = 0 + group by d.id diff --git a/acupuncture-system/src/main/resources/mapper/system/PmsPatientMapper.xml b/acupuncture-system/src/main/resources/mapper/system/PmsPatientMapper.xml new file mode 100644 index 00000000..7f4d2a8a --- /dev/null +++ b/acupuncture-system/src/main/resources/mapper/system/PmsPatientMapper.xml @@ -0,0 +1,442 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, name, pinyin_full, pinyin_simple, gender, birth_date, ethnicity, education_years, + phone, id_card_type, id_card, source, current_illness_history, del_flag, tenant_id, + create_by, create_time, update_by, update_time, remark + + + + + delete from pms_patient + where id = #{id,jdbcType=BIGINT} + + + insert into pms_patient (id, name, pinyin_full, + pinyin_simple, gender, birth_date, + ethnicity, education_years, phone, + id_card_type, id_card, source, + current_illness_history, del_flag, tenant_id, + create_by, create_time, update_by, + update_time, remark) + values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{pinyinFull,jdbcType=VARCHAR}, + #{pinyinSimple,jdbcType=VARCHAR}, #{gender,jdbcType=TINYINT}, #{birthDate,jdbcType=DATE}, + #{ethnicity,jdbcType=VARCHAR}, #{educationYears,jdbcType=INTEGER}, #{phone,jdbcType=VARCHAR}, + #{idCardType,jdbcType=TINYINT}, #{idCard,jdbcType=VARCHAR}, #{source,jdbcType=TINYINT}, + #{currentIllnessHistory,jdbcType=VARCHAR}, #{delFlag,jdbcType=TINYINT}, #{tenantId,jdbcType=BIGINT}, + #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, + #{updateTime,jdbcType=TIMESTAMP}, #{remark,jdbcType=VARCHAR}) + + + insert into pms_patient + + + id, + + + name, + + + pinyin_full, + + + pinyin_simple, + + + gender, + + + birth_date, + + + ethnicity, + + + education_years, + + + phone, + + + id_card_type, + + + id_card, + + + source, + + + current_illness_history, + + + del_flag, + + + tenant_id, + + + create_by, + + + create_time, + + + update_by, + + + update_time, + + + remark, + + + + + #{id,jdbcType=BIGINT}, + + + #{name,jdbcType=VARCHAR}, + + + #{pinyinFull,jdbcType=VARCHAR}, + + + #{pinyinSimple,jdbcType=VARCHAR}, + + + #{gender,jdbcType=TINYINT}, + + + #{birthDate,jdbcType=DATE}, + + + #{ethnicity,jdbcType=VARCHAR}, + + + #{educationYears,jdbcType=INTEGER}, + + + #{phone,jdbcType=VARCHAR}, + + + #{idCardType,jdbcType=TINYINT}, + + + #{idCard,jdbcType=VARCHAR}, + + + #{source,jdbcType=TINYINT}, + + + #{currentIllnessHistory,jdbcType=VARCHAR}, + + + #{delFlag,jdbcType=TINYINT}, + + + #{tenantId,jdbcType=BIGINT}, + + + #{createBy,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{updateBy,jdbcType=VARCHAR}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + #{remark,jdbcType=VARCHAR}, + + + + + + update pms_patient + + + id = #{record.id,jdbcType=BIGINT}, + + + name = #{record.name,jdbcType=VARCHAR}, + + + pinyin_full = #{record.pinyinFull,jdbcType=VARCHAR}, + + + pinyin_simple = #{record.pinyinSimple,jdbcType=VARCHAR}, + + + gender = #{record.gender,jdbcType=TINYINT}, + + + birth_date = #{record.birthDate,jdbcType=DATE}, + + + ethnicity = #{record.ethnicity,jdbcType=VARCHAR}, + + + education_years = #{record.educationYears,jdbcType=INTEGER}, + + + phone = #{record.phone,jdbcType=VARCHAR}, + + + id_card_type = #{record.idCardType,jdbcType=TINYINT}, + + + id_card = #{record.idCard,jdbcType=VARCHAR}, + + + source = #{record.source,jdbcType=TINYINT}, + + + current_illness_history = #{record.currentIllnessHistory,jdbcType=VARCHAR}, + + + del_flag = #{record.delFlag,jdbcType=TINYINT}, + + + tenant_id = #{record.tenantId,jdbcType=BIGINT}, + + + create_by = #{record.createBy,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + + update_by = #{record.updateBy,jdbcType=VARCHAR}, + + + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + + + remark = #{record.remark,jdbcType=VARCHAR}, + + + + + + + + update pms_patient + set id = #{record.id,jdbcType=BIGINT}, + name = #{record.name,jdbcType=VARCHAR}, + pinyin_full = #{record.pinyinFull,jdbcType=VARCHAR}, + pinyin_simple = #{record.pinyinSimple,jdbcType=VARCHAR}, + gender = #{record.gender,jdbcType=TINYINT}, + birth_date = #{record.birthDate,jdbcType=DATE}, + ethnicity = #{record.ethnicity,jdbcType=VARCHAR}, + education_years = #{record.educationYears,jdbcType=INTEGER}, + phone = #{record.phone,jdbcType=VARCHAR}, + id_card_type = #{record.idCardType,jdbcType=TINYINT}, + id_card = #{record.idCard,jdbcType=VARCHAR}, + source = #{record.source,jdbcType=TINYINT}, + current_illness_history = #{record.currentIllnessHistory,jdbcType=VARCHAR}, + del_flag = #{record.delFlag,jdbcType=TINYINT}, + tenant_id = #{record.tenantId,jdbcType=BIGINT}, + create_by = #{record.createBy,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + update_by = #{record.updateBy,jdbcType=VARCHAR}, + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + remark = #{record.remark,jdbcType=VARCHAR} + + + + + + update pms_patient + + + name = #{name,jdbcType=VARCHAR}, + + + pinyin_full = #{pinyinFull,jdbcType=VARCHAR}, + + + pinyin_simple = #{pinyinSimple,jdbcType=VARCHAR}, + + + gender = #{gender,jdbcType=TINYINT}, + + + birth_date = #{birthDate,jdbcType=DATE}, + + + ethnicity = #{ethnicity,jdbcType=VARCHAR}, + + + education_years = #{educationYears,jdbcType=INTEGER}, + + + phone = #{phone,jdbcType=VARCHAR}, + + + id_card_type = #{idCardType,jdbcType=TINYINT}, + + + id_card = #{idCard,jdbcType=VARCHAR}, + + + source = #{source,jdbcType=TINYINT}, + + + current_illness_history = #{currentIllnessHistory,jdbcType=VARCHAR}, + + + del_flag = #{delFlag,jdbcType=TINYINT}, + + + tenant_id = #{tenantId,jdbcType=BIGINT}, + + + create_by = #{createBy,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + update_by = #{updateBy,jdbcType=VARCHAR}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + remark = #{remark,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=BIGINT} + + + update pms_patient + set name = #{name,jdbcType=VARCHAR}, + pinyin_full = #{pinyinFull,jdbcType=VARCHAR}, + pinyin_simple = #{pinyinSimple,jdbcType=VARCHAR}, + gender = #{gender,jdbcType=TINYINT}, + birth_date = #{birthDate,jdbcType=DATE}, + ethnicity = #{ethnicity,jdbcType=VARCHAR}, + education_years = #{educationYears,jdbcType=INTEGER}, + phone = #{phone,jdbcType=VARCHAR}, + id_card_type = #{idCardType,jdbcType=TINYINT}, + id_card = #{idCard,jdbcType=VARCHAR}, + source = #{source,jdbcType=TINYINT}, + current_illness_history = #{currentIllnessHistory,jdbcType=VARCHAR}, + del_flag = #{delFlag,jdbcType=TINYINT}, + tenant_id = #{tenantId,jdbcType=BIGINT}, + create_by = #{createBy,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + update_by = #{updateBy,jdbcType=VARCHAR}, + update_time = #{updateTime,jdbcType=TIMESTAMP}, + remark = #{remark,jdbcType=VARCHAR} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/acupuncture-system/src/main/resources/mapper/system/SysUserMapper.xml b/acupuncture-system/src/main/resources/mapper/system/SysUserMapper.xml index 3efcfb6f..d6f20285 100644 --- a/acupuncture-system/src/main/resources/mapper/system/SysUserMapper.xml +++ b/acupuncture-system/src/main/resources/mapper/system/SysUserMapper.xml @@ -6,6 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + @@ -47,7 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, + select u.user_id, u.tenant_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status, r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status from sys_user u @@ -129,7 +130,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where u.user_id = #{userId} - + + +