``` refactor(db): 移除SQL语句中的public schema前缀
This commit is contained in:
@@ -1,23 +0,0 @@
|
|||||||
/**
|
|
||||||
* 取消汇总
|
|
||||||
*
|
|
||||||
* @param summaryNo 汇总单号
|
|
||||||
* @return 处理结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public R<?> cancelSummary(String summaryNo) {
|
|
||||||
// 取消汇总申请(软删除)
|
|
||||||
List<Long> requestIdList = supplyRequestService.cancelSummarySupplyRequest(List.of(summaryNo));
|
|
||||||
if (requestIdList.isEmpty()) {
|
|
||||||
return R.fail("取消汇总申请失败");
|
|
||||||
}
|
|
||||||
// 软删除汇总发放
|
|
||||||
supplyDeliveryService.deleteSupplyDeliveryByReqId(requestIdList);
|
|
||||||
// 取消药品汇总
|
|
||||||
boolean result = medicationDispenseService.cancelMedicationSummary(List.of(summaryNo));
|
|
||||||
if (!result) {
|
|
||||||
return R.fail("取消汇总申请失败");
|
|
||||||
}
|
|
||||||
return R.ok(MessageUtils.createMessage(PromptMsgConstant.Common.M00004, new Object[]{"取消"}));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
@Resource
|
|
||||||
private IMedicationDispenseService medicationDispenseService;
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private ReturnMedicineMapper returnMedicineMapper;
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private ISupplyRequestService supplyRequestService;
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private ISupplyDeliveryService supplyDeliveryService;
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private ITraceNoManageService traceNoManageService;
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private IInventoryItemService inventoryItemService;
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private IMedicationDefinitionService medicationDefinitionService;
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private ReceiptApprovalAppServiceImpl receiptApprovalAppService;
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private WesternMedicineDispenseAppServiceImpl westernMedicineDispenseAppService;
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private WesternMedicineDispenseMapper westernMedicineDispenseMapper;
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private IOrganizationService organizationService;
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private AdviceProcessAppMapper adviceProcessAppMapper;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private MedicationRequestServiceImpl medicationRequestService;
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.openhis</groupId>
|
<groupId>com.openhis</groupId>
|
||||||
<artifactId>openhis-server</artifactId>
|
<artifactId>openhis-server</artifactId>
|
||||||
@@ -41,7 +41,6 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.swagger</groupId>
|
<groupId>io.swagger</groupId>
|
||||||
<artifactId>swagger-models</artifactId>
|
<artifactId>swagger-models</artifactId>
|
||||||
<version>1.6.2</version>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- Mysql驱动包 -->
|
<!-- Mysql驱动包 -->
|
||||||
@@ -77,9 +76,8 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.core</groupId>
|
<groupId>com.core</groupId>
|
||||||
<artifactId>core-common</artifactId>
|
<artifactId>core-common</artifactId>
|
||||||
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
@@ -1,18 +1,5 @@
|
|||||||
package com.core.web.controller.common;
|
package com.core.web.controller.common;
|
||||||
|
|
||||||
import java.awt.image.BufferedImage;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.concurrent.TimeUnit;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import javax.imageio.ImageIO;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.util.FastByteArrayOutputStream;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import com.core.common.config.CoreConfig;
|
import com.core.common.config.CoreConfig;
|
||||||
import com.core.common.constant.CacheConstants;
|
import com.core.common.constant.CacheConstants;
|
||||||
import com.core.common.constant.Constants;
|
import com.core.common.constant.Constants;
|
||||||
@@ -22,6 +9,17 @@ import com.core.common.utils.sign.Base64;
|
|||||||
import com.core.common.utils.uuid.IdUtils;
|
import com.core.common.utils.uuid.IdUtils;
|
||||||
import com.core.system.service.ISysConfigService;
|
import com.core.system.service.ISysConfigService;
|
||||||
import com.google.code.kaptcha.Producer;
|
import com.google.code.kaptcha.Producer;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.util.FastByteArrayOutputStream;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.imageio.ImageIO;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.awt.image.BufferedImage;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 验证码操作处理
|
* 验证码操作处理
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
package com.core.web.controller.common;
|
package com.core.web.controller.common;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import com.core.common.config.CoreConfig;
|
||||||
import java.util.List;
|
import com.core.common.constant.Constants;
|
||||||
|
import com.core.common.core.domain.AjaxResult;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import com.core.common.utils.StringUtils;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import com.core.common.utils.file.FileUploadUtils;
|
||||||
|
import com.core.common.utils.file.FileUtils;
|
||||||
|
import com.core.framework.config.ServerConfig;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -16,13 +17,10 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import com.core.common.config.CoreConfig;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import com.core.common.constant.Constants;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import com.core.common.core.domain.AjaxResult;
|
import java.util.ArrayList;
|
||||||
import com.core.common.utils.StringUtils;
|
import java.util.List;
|
||||||
import com.core.common.utils.file.FileUploadUtils;
|
|
||||||
import com.core.common.utils.file.FileUtils;
|
|
||||||
import com.core.framework.config.ServerConfig;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通用请求处理
|
* 通用请求处理
|
||||||
|
|||||||
@@ -1,13 +1,5 @@
|
|||||||
package com.core.web.controller.common;
|
package com.core.web.controller.common;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
|
||||||
|
|
||||||
import com.core.common.annotation.Anonymous;
|
import com.core.common.annotation.Anonymous;
|
||||||
import com.core.common.config.CoreConfig;
|
import com.core.common.config.CoreConfig;
|
||||||
import com.core.common.core.domain.AjaxResult;
|
import com.core.common.core.domain.AjaxResult;
|
||||||
@@ -16,6 +8,13 @@ import com.core.common.utils.StringUtils;
|
|||||||
import com.core.common.utils.file.FileUploadUtils;
|
import com.core.common.utils.file.FileUploadUtils;
|
||||||
import com.core.common.utils.file.FileUtils;
|
import com.core.common.utils.file.FileUtils;
|
||||||
import com.core.framework.config.ServerConfig;
|
import com.core.framework.config.ServerConfig;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/file")
|
@RequestMapping("/file")
|
||||||
|
|||||||
@@ -1,17 +1,16 @@
|
|||||||
package com.core.web.controller.monitor;
|
package com.core.web.controller.monitor;
|
||||||
|
|
||||||
import java.util.*;
|
import com.core.common.constant.CacheConstants;
|
||||||
|
import com.core.common.core.domain.AjaxResult;
|
||||||
|
import com.core.common.utils.StringUtils;
|
||||||
|
import com.core.system.domain.SysCache;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.data.redis.core.RedisCallback;
|
import org.springframework.data.redis.core.RedisCallback;
|
||||||
import org.springframework.data.redis.core.RedisTemplate;
|
import org.springframework.data.redis.core.RedisTemplate;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import com.core.common.constant.CacheConstants;
|
import java.util.*;
|
||||||
import com.core.common.core.domain.AjaxResult;
|
|
||||||
import com.core.common.utils.StringUtils;
|
|
||||||
import com.core.system.domain.SysCache;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 缓存监控
|
* 缓存监控
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
package com.core.web.controller.monitor;
|
package com.core.web.controller.monitor;
|
||||||
|
|
||||||
|
import com.core.common.core.domain.AjaxResult;
|
||||||
|
import com.core.framework.web.domain.Server;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import com.core.common.core.domain.AjaxResult;
|
|
||||||
import com.core.framework.web.domain.Server;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 服务器监控
|
* 服务器监控
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,13 +1,5 @@
|
|||||||
package com.core.web.controller.monitor;
|
package com.core.web.controller.monitor;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import com.core.common.annotation.Log;
|
import com.core.common.annotation.Log;
|
||||||
import com.core.common.core.controller.BaseController;
|
import com.core.common.core.controller.BaseController;
|
||||||
import com.core.common.core.domain.AjaxResult;
|
import com.core.common.core.domain.AjaxResult;
|
||||||
@@ -17,15 +9,23 @@ import com.core.common.utils.poi.ExcelUtil;
|
|||||||
import com.core.framework.web.service.SysPasswordService;
|
import com.core.framework.web.service.SysPasswordService;
|
||||||
import com.core.system.domain.SysLogininfor;
|
import com.core.system.domain.SysLogininfor;
|
||||||
import com.core.system.service.ISysLogininforService;
|
import com.core.system.service.ISysLogininforService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 系统访问记录
|
*
|
||||||
*
|
*
|
||||||
* @author system
|
* @author system
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/monitor/logininfor")
|
@RequestMapping("/monitor/logininfor")
|
||||||
|
|
||||||
public class SysLogininforController extends BaseController {
|
public class SysLogininforController extends BaseController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISysLogininforService logininforService;
|
private ISysLogininforService logininforService;
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,5 @@
|
|||||||
package com.core.web.controller.monitor;
|
package com.core.web.controller.monitor;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import com.core.common.annotation.Log;
|
import com.core.common.annotation.Log;
|
||||||
import com.core.common.core.controller.BaseController;
|
import com.core.common.core.controller.BaseController;
|
||||||
import com.core.common.core.domain.AjaxResult;
|
import com.core.common.core.domain.AjaxResult;
|
||||||
@@ -16,6 +8,12 @@ import com.core.common.enums.BusinessType;
|
|||||||
import com.core.common.utils.poi.ExcelUtil;
|
import com.core.common.utils.poi.ExcelUtil;
|
||||||
import com.core.system.domain.SysOperLog;
|
import com.core.system.domain.SysOperLog;
|
||||||
import com.core.system.service.ISysOperLogService;
|
import com.core.system.service.ISysOperLogService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 操作日志记录
|
* 操作日志记录
|
||||||
|
|||||||
@@ -1,14 +1,5 @@
|
|||||||
package com.core.web.controller.monitor;
|
package com.core.web.controller.monitor;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import com.core.common.annotation.Log;
|
import com.core.common.annotation.Log;
|
||||||
import com.core.common.constant.CacheConstants;
|
import com.core.common.constant.CacheConstants;
|
||||||
import com.core.common.core.controller.BaseController;
|
import com.core.common.core.controller.BaseController;
|
||||||
@@ -20,6 +11,14 @@ import com.core.common.enums.BusinessType;
|
|||||||
import com.core.common.utils.StringUtils;
|
import com.core.common.utils.StringUtils;
|
||||||
import com.core.system.domain.SysUserOnline;
|
import com.core.system.domain.SysUserOnline;
|
||||||
import com.core.system.service.ISysUserOnlineService;
|
import com.core.system.service.ISysUserOnlineService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 在线用户监控
|
* 在线用户监控
|
||||||
|
|||||||
@@ -1,14 +1,5 @@
|
|||||||
package com.core.web.controller.system;
|
package com.core.web.controller.system;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import com.core.common.annotation.Log;
|
import com.core.common.annotation.Log;
|
||||||
import com.core.common.core.controller.BaseController;
|
import com.core.common.core.controller.BaseController;
|
||||||
import com.core.common.core.domain.AjaxResult;
|
import com.core.common.core.domain.AjaxResult;
|
||||||
@@ -17,6 +8,13 @@ import com.core.common.enums.BusinessType;
|
|||||||
import com.core.common.utils.poi.ExcelUtil;
|
import com.core.common.utils.poi.ExcelUtil;
|
||||||
import com.core.system.domain.SysConfig;
|
import com.core.system.domain.SysConfig;
|
||||||
import com.core.system.service.ISysConfigService;
|
import com.core.system.service.ISysConfigService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 参数配置 信息操作处理
|
* 参数配置 信息操作处理
|
||||||
|
|||||||
@@ -1,13 +1,5 @@
|
|||||||
package com.core.web.controller.system;
|
package com.core.web.controller.system;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.ArrayUtils;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import com.core.common.annotation.Log;
|
import com.core.common.annotation.Log;
|
||||||
import com.core.common.constant.UserConstants;
|
import com.core.common.constant.UserConstants;
|
||||||
import com.core.common.core.controller.BaseController;
|
import com.core.common.core.controller.BaseController;
|
||||||
@@ -16,6 +8,13 @@ import com.core.common.core.domain.entity.SysDept;
|
|||||||
import com.core.common.enums.BusinessType;
|
import com.core.common.enums.BusinessType;
|
||||||
import com.core.common.utils.StringUtils;
|
import com.core.common.utils.StringUtils;
|
||||||
import com.core.system.service.ISysDeptService;
|
import com.core.system.service.ISysDeptService;
|
||||||
|
import org.apache.commons.lang3.ArrayUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 部门信息
|
* 部门信息
|
||||||
|
|||||||
@@ -1,15 +1,5 @@
|
|||||||
package com.core.web.controller.system;
|
package com.core.web.controller.system;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import com.core.common.annotation.Log;
|
import com.core.common.annotation.Log;
|
||||||
import com.core.common.core.controller.BaseController;
|
import com.core.common.core.controller.BaseController;
|
||||||
import com.core.common.core.domain.AjaxResult;
|
import com.core.common.core.domain.AjaxResult;
|
||||||
@@ -20,6 +10,14 @@ import com.core.common.utils.StringUtils;
|
|||||||
import com.core.common.utils.poi.ExcelUtil;
|
import com.core.common.utils.poi.ExcelUtil;
|
||||||
import com.core.system.service.ISysDictDataService;
|
import com.core.system.service.ISysDictDataService;
|
||||||
import com.core.system.service.ISysDictTypeService;
|
import com.core.system.service.ISysDictTypeService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数据字典信息
|
* 数据字典信息
|
||||||
|
|||||||
@@ -1,14 +1,5 @@
|
|||||||
package com.core.web.controller.system;
|
package com.core.web.controller.system;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import com.core.common.annotation.Log;
|
import com.core.common.annotation.Log;
|
||||||
import com.core.common.core.controller.BaseController;
|
import com.core.common.core.controller.BaseController;
|
||||||
import com.core.common.core.domain.AjaxResult;
|
import com.core.common.core.domain.AjaxResult;
|
||||||
@@ -17,6 +8,13 @@ import com.core.common.core.page.TableDataInfo;
|
|||||||
import com.core.common.enums.BusinessType;
|
import com.core.common.enums.BusinessType;
|
||||||
import com.core.common.utils.poi.ExcelUtil;
|
import com.core.common.utils.poi.ExcelUtil;
|
||||||
import com.core.system.service.ISysDictTypeService;
|
import com.core.system.service.ISysDictTypeService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数据字典信息
|
* 数据字典信息
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
package com.core.web.controller.system;
|
package com.core.web.controller.system;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import com.core.common.config.CoreConfig;
|
import com.core.common.config.CoreConfig;
|
||||||
import com.core.common.utils.StringUtils;
|
import com.core.common.utils.StringUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 首页
|
* 首页
|
||||||
|
|||||||
@@ -1,14 +1,5 @@
|
|||||||
package com.core.web.controller.system;
|
package com.core.web.controller.system;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import com.core.common.constant.Constants;
|
import com.core.common.constant.Constants;
|
||||||
import com.core.common.core.domain.AjaxResult;
|
import com.core.common.core.domain.AjaxResult;
|
||||||
import com.core.common.core.domain.entity.SysMenu;
|
import com.core.common.core.domain.entity.SysMenu;
|
||||||
@@ -20,6 +11,14 @@ import com.core.framework.web.service.SysLoginService;
|
|||||||
import com.core.framework.web.service.SysPermissionService;
|
import com.core.framework.web.service.SysPermissionService;
|
||||||
import com.core.framework.web.service.TokenService;
|
import com.core.framework.web.service.TokenService;
|
||||||
import com.core.system.service.ISysMenuService;
|
import com.core.system.service.ISysMenuService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
/**已评审
|
/**已评审
|
||||||
* 登录验证
|
* 登录验证
|
||||||
|
|||||||
@@ -1,12 +1,5 @@
|
|||||||
package com.core.web.controller.system;
|
package com.core.web.controller.system;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import com.core.common.annotation.Log;
|
import com.core.common.annotation.Log;
|
||||||
import com.core.common.constant.UserConstants;
|
import com.core.common.constant.UserConstants;
|
||||||
import com.core.common.core.controller.BaseController;
|
import com.core.common.core.controller.BaseController;
|
||||||
@@ -15,6 +8,12 @@ import com.core.common.core.domain.entity.SysMenu;
|
|||||||
import com.core.common.enums.BusinessType;
|
import com.core.common.enums.BusinessType;
|
||||||
import com.core.common.utils.StringUtils;
|
import com.core.common.utils.StringUtils;
|
||||||
import com.core.system.service.ISysMenuService;
|
import com.core.system.service.ISysMenuService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 菜单信息
|
* 菜单信息
|
||||||
|
|||||||
@@ -1,12 +1,5 @@
|
|||||||
package com.core.web.controller.system;
|
package com.core.web.controller.system;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import com.core.common.annotation.Log;
|
import com.core.common.annotation.Log;
|
||||||
import com.core.common.core.controller.BaseController;
|
import com.core.common.core.controller.BaseController;
|
||||||
import com.core.common.core.domain.AjaxResult;
|
import com.core.common.core.domain.AjaxResult;
|
||||||
@@ -14,6 +7,12 @@ import com.core.common.core.page.TableDataInfo;
|
|||||||
import com.core.common.enums.BusinessType;
|
import com.core.common.enums.BusinessType;
|
||||||
import com.core.system.domain.SysNotice;
|
import com.core.system.domain.SysNotice;
|
||||||
import com.core.system.service.ISysNoticeService;
|
import com.core.system.service.ISysNoticeService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 公告 信息操作处理
|
* 公告 信息操作处理
|
||||||
|
|||||||
@@ -1,14 +1,5 @@
|
|||||||
package com.core.web.controller.system;
|
package com.core.web.controller.system;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import com.core.common.annotation.Log;
|
import com.core.common.annotation.Log;
|
||||||
import com.core.common.core.controller.BaseController;
|
import com.core.common.core.controller.BaseController;
|
||||||
import com.core.common.core.domain.AjaxResult;
|
import com.core.common.core.domain.AjaxResult;
|
||||||
@@ -17,6 +8,13 @@ import com.core.common.enums.BusinessType;
|
|||||||
import com.core.common.utils.poi.ExcelUtil;
|
import com.core.common.utils.poi.ExcelUtil;
|
||||||
import com.core.system.domain.SysPost;
|
import com.core.system.domain.SysPost;
|
||||||
import com.core.system.service.ISysPostService;
|
import com.core.system.service.ISysPostService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 岗位信息操作处理
|
* 岗位信息操作处理
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
package com.core.web.controller.system;
|
package com.core.web.controller.system;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
|
||||||
|
|
||||||
import com.core.common.annotation.Log;
|
import com.core.common.annotation.Log;
|
||||||
import com.core.common.config.CoreConfig;
|
import com.core.common.config.CoreConfig;
|
||||||
import com.core.common.core.controller.BaseController;
|
import com.core.common.core.controller.BaseController;
|
||||||
@@ -17,6 +13,9 @@ import com.core.common.utils.file.FileUploadUtils;
|
|||||||
import com.core.common.utils.file.MimeTypeUtils;
|
import com.core.common.utils.file.MimeTypeUtils;
|
||||||
import com.core.framework.web.service.TokenService;
|
import com.core.framework.web.service.TokenService;
|
||||||
import com.core.system.service.ISysUserService;
|
import com.core.system.service.ISysUserService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 个人信息 业务处理
|
* 个人信息 业务处理
|
||||||
|
|||||||
@@ -1,16 +1,15 @@
|
|||||||
package com.core.web.controller.system;
|
package com.core.web.controller.system;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import com.core.common.core.controller.BaseController;
|
import com.core.common.core.controller.BaseController;
|
||||||
import com.core.common.core.domain.AjaxResult;
|
import com.core.common.core.domain.AjaxResult;
|
||||||
import com.core.common.core.domain.model.RegisterBody;
|
import com.core.common.core.domain.model.RegisterBody;
|
||||||
import com.core.common.utils.StringUtils;
|
import com.core.common.utils.StringUtils;
|
||||||
import com.core.framework.web.service.SysRegisterService;
|
import com.core.framework.web.service.SysRegisterService;
|
||||||
import com.core.system.service.ISysConfigService;
|
import com.core.system.service.ISysConfigService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 注册验证
|
* 注册验证
|
||||||
|
|||||||
@@ -1,14 +1,5 @@
|
|||||||
package com.core.web.controller.system;
|
package com.core.web.controller.system;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import com.core.common.annotation.Log;
|
import com.core.common.annotation.Log;
|
||||||
import com.core.common.core.controller.BaseController;
|
import com.core.common.core.controller.BaseController;
|
||||||
import com.core.common.core.domain.AjaxResult;
|
import com.core.common.core.domain.AjaxResult;
|
||||||
@@ -26,6 +17,13 @@ import com.core.system.domain.SysUserRole;
|
|||||||
import com.core.system.service.ISysDeptService;
|
import com.core.system.service.ISysDeptService;
|
||||||
import com.core.system.service.ISysRoleService;
|
import com.core.system.service.ISysRoleService;
|
||||||
import com.core.system.service.ISysUserService;
|
import com.core.system.service.ISysUserService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 角色信息
|
* 角色信息
|
||||||
|
|||||||
@@ -1,11 +1,5 @@
|
|||||||
package com.core.web.controller.system;
|
package com.core.web.controller.system;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.core.common.annotation.Anonymous;
|
import com.core.common.annotation.Anonymous;
|
||||||
import com.core.common.core.controller.BaseController;
|
import com.core.common.core.controller.BaseController;
|
||||||
@@ -13,6 +7,11 @@ import com.core.common.core.domain.R;
|
|||||||
import com.core.common.core.domain.entity.SysUser;
|
import com.core.common.core.domain.entity.SysUser;
|
||||||
import com.core.system.domain.SysTenant;
|
import com.core.system.domain.SysTenant;
|
||||||
import com.core.system.service.ISysTenantService;
|
import com.core.system.service.ISysTenantService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 租户信息controller
|
* 租户信息controller
|
||||||
|
|||||||
@@ -1,16 +1,15 @@
|
|||||||
package com.core.web.controller.system;
|
package com.core.web.controller.system;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import com.core.common.core.controller.BaseController;
|
import com.core.common.core.controller.BaseController;
|
||||||
import com.core.common.core.domain.R;
|
import com.core.common.core.domain.R;
|
||||||
import com.core.system.domain.dto.SaveTenantOptionDetailDto;
|
import com.core.system.domain.dto.SaveTenantOptionDetailDto;
|
||||||
import com.core.system.domain.dto.TenantOptionDto;
|
import com.core.system.domain.dto.TenantOptionDto;
|
||||||
import com.core.system.service.ISysTenantOptionService;
|
import com.core.system.service.ISysTenantOptionService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 租户配置项信息controller
|
* 租户配置项信息controller
|
||||||
|
|||||||
@@ -1,17 +1,5 @@
|
|||||||
package com.core.web.controller.system;
|
package com.core.web.controller.system;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.ArrayUtils;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
|
||||||
|
|
||||||
import com.core.common.annotation.Log;
|
import com.core.common.annotation.Log;
|
||||||
import com.core.common.core.controller.BaseController;
|
import com.core.common.core.controller.BaseController;
|
||||||
import com.core.common.core.domain.AjaxResult;
|
import com.core.common.core.domain.AjaxResult;
|
||||||
@@ -27,6 +15,16 @@ import com.core.system.service.ISysDeptService;
|
|||||||
import com.core.system.service.ISysPostService;
|
import com.core.system.service.ISysPostService;
|
||||||
import com.core.system.service.ISysRoleService;
|
import com.core.system.service.ISysRoleService;
|
||||||
import com.core.system.service.ISysUserService;
|
import com.core.system.service.ISysUserService;
|
||||||
|
import org.apache.commons.lang3.ArrayUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户信息
|
* 用户信息
|
||||||
|
|||||||
@@ -1,18 +1,16 @@
|
|||||||
package com.core.web.controller.tool;
|
package com.core.web.controller.tool;
|
||||||
|
|
||||||
|
import com.core.common.core.controller.BaseController;
|
||||||
|
import com.core.common.core.domain.R;
|
||||||
|
import com.core.common.utils.StringUtils;
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import com.core.common.core.controller.BaseController;
|
|
||||||
import com.core.common.core.domain.R;
|
|
||||||
import com.core.common.utils.StringUtils;
|
|
||||||
|
|
||||||
import io.swagger.annotations.*;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* swagger 用户测试方法
|
* swagger 用户测试方法
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,17 +1,12 @@
|
|||||||
package com.core.web.core.config;
|
package com.core.web.core.config;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import com.core.common.config.CoreConfig;
|
||||||
import java.util.List;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import io.swagger.models.auth.In;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
import com.core.common.config.CoreConfig;
|
|
||||||
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
import io.swagger.models.auth.In;
|
|
||||||
import springfox.documentation.builders.ApiInfoBuilder;
|
import springfox.documentation.builders.ApiInfoBuilder;
|
||||||
import springfox.documentation.builders.PathSelectors;
|
import springfox.documentation.builders.PathSelectors;
|
||||||
import springfox.documentation.builders.RequestHandlerSelectors;
|
import springfox.documentation.builders.RequestHandlerSelectors;
|
||||||
@@ -20,6 +15,9 @@ import springfox.documentation.spi.DocumentationType;
|
|||||||
import springfox.documentation.spi.service.contexts.SecurityContext;
|
import springfox.documentation.spi.service.contexts.SecurityContext;
|
||||||
import springfox.documentation.spring.web.plugins.Docket;
|
import springfox.documentation.spring.web.plugins.Docket;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Swagger2的接口配置
|
* Swagger2的接口配置
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -16,6 +16,31 @@
|
|||||||
common通用工具
|
common通用工具
|
||||||
</description>
|
</description>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>3.8.1</version>
|
||||||
|
<configuration>
|
||||||
|
<source>17</source>
|
||||||
|
<target>17</target>
|
||||||
|
<encoding>UTF-8</encoding>
|
||||||
|
<compilerArgs>
|
||||||
|
<arg>-parameters</arg>
|
||||||
|
</compilerArgs>
|
||||||
|
<annotationProcessorPaths>
|
||||||
|
<path>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
<version>1.18.34</version>
|
||||||
|
</path>
|
||||||
|
</annotationProcessorPaths>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
||||||
<!-- mybatis-plus 增强CRUD -->
|
<!-- mybatis-plus 增强CRUD -->
|
||||||
@@ -54,6 +79,12 @@
|
|||||||
<artifactId>pagehelper-spring-boot-starter</artifactId>
|
<artifactId>pagehelper-spring-boot-starter</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- jsr250 annotations -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.annotation</groupId>
|
||||||
|
<artifactId>javax.annotation-api</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- 自定义验证注解 -->
|
<!-- 自定义验证注解 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
@@ -144,11 +175,6 @@
|
|||||||
<artifactId>gson</artifactId>
|
<artifactId>gson</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.google.code.gson</groupId>
|
|
||||||
<artifactId>gson</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
package com.core.common.annotation;
|
package com.core.common.annotation;
|
||||||
|
|
||||||
import java.lang.annotation.*;
|
|
||||||
|
|
||||||
import com.core.common.enums.DataSourceType;
|
import com.core.common.enums.DataSourceType;
|
||||||
|
|
||||||
|
import java.lang.annotation.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 自定义多数据源切换注解
|
* 自定义多数据源切换注解
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,16 +1,15 @@
|
|||||||
package com.core.common.annotation;
|
package com.core.common.annotation;
|
||||||
|
|
||||||
|
import com.core.common.utils.poi.ExcelHandlerAdapter;
|
||||||
|
import org.apache.poi.ss.usermodel.HorizontalAlignment;
|
||||||
|
import org.apache.poi.ss.usermodel.IndexedColors;
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
import java.lang.annotation.ElementType;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
||||||
import java.lang.annotation.RetentionPolicy;
|
import java.lang.annotation.RetentionPolicy;
|
||||||
import java.lang.annotation.Target;
|
import java.lang.annotation.Target;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
import org.apache.poi.ss.usermodel.HorizontalAlignment;
|
|
||||||
import org.apache.poi.ss.usermodel.IndexedColors;
|
|
||||||
|
|
||||||
import com.core.common.utils.poi.ExcelHandlerAdapter;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 自定义导出Excel数据注解
|
* 自定义导出Excel数据注解
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package com.core.common.annotation;
|
package com.core.common.annotation;
|
||||||
|
|
||||||
import java.lang.annotation.*;
|
|
||||||
|
|
||||||
import com.core.common.enums.BusinessType;
|
import com.core.common.enums.BusinessType;
|
||||||
import com.core.common.enums.OperatorType;
|
import com.core.common.enums.OperatorType;
|
||||||
|
|
||||||
|
import java.lang.annotation.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 自定义操作日志记录注解
|
* 自定义操作日志记录注解
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package com.core.common.annotation;
|
package com.core.common.annotation;
|
||||||
|
|
||||||
import java.lang.annotation.*;
|
|
||||||
|
|
||||||
import com.core.common.constant.CacheConstants;
|
import com.core.common.constant.CacheConstants;
|
||||||
import com.core.common.enums.LimitType;
|
import com.core.common.enums.LimitType;
|
||||||
|
|
||||||
|
import java.lang.annotation.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 限流注解
|
* 限流注解
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
package com.core.common.annotation;
|
package com.core.common.annotation;
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
|
||||||
import java.lang.annotation.Retention;
|
|
||||||
import java.lang.annotation.RetentionPolicy;
|
|
||||||
import java.lang.annotation.Target;
|
|
||||||
|
|
||||||
import com.core.common.config.serializer.SensitiveJsonSerializer;
|
import com.core.common.config.serializer.SensitiveJsonSerializer;
|
||||||
import com.core.common.enums.DesensitizedType;
|
import com.core.common.enums.DesensitizedType;
|
||||||
import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
|
import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
|
||||||
|
import java.lang.annotation.ElementType;
|
||||||
|
import java.lang.annotation.Retention;
|
||||||
|
import java.lang.annotation.RetentionPolicy;
|
||||||
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数据脱敏注解
|
* 数据脱敏注解
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
package com.core.common.config.serializer;
|
package com.core.common.config.serializer;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
import com.core.common.annotation.Sensitive;
|
import com.core.common.annotation.Sensitive;
|
||||||
import com.core.common.core.domain.model.LoginUser;
|
import com.core.common.core.domain.model.LoginUser;
|
||||||
import com.core.common.enums.DesensitizedType;
|
import com.core.common.enums.DesensitizedType;
|
||||||
@@ -14,6 +11,9 @@ import com.fasterxml.jackson.databind.JsonSerializer;
|
|||||||
import com.fasterxml.jackson.databind.SerializerProvider;
|
import com.fasterxml.jackson.databind.SerializerProvider;
|
||||||
import com.fasterxml.jackson.databind.ser.ContextualSerializer;
|
import com.fasterxml.jackson.databind.ser.ContextualSerializer;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数据脱敏序列化过滤
|
* 数据脱敏序列化过滤
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package com.core.common.constant;
|
package com.core.common.constant;
|
||||||
|
|
||||||
import java.util.Locale;
|
|
||||||
|
|
||||||
import io.jsonwebtoken.Claims;
|
import io.jsonwebtoken.Claims;
|
||||||
|
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通用常量信息
|
* 通用常量信息
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,14 +1,5 @@
|
|||||||
package com.core.common.core.controller;
|
package com.core.common.core.controller;
|
||||||
|
|
||||||
import java.beans.PropertyEditorSupport;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
import org.springframework.web.bind.WebDataBinder;
|
|
||||||
import org.springframework.web.bind.annotation.InitBinder;
|
|
||||||
|
|
||||||
import com.core.common.constant.HttpStatus;
|
import com.core.common.constant.HttpStatus;
|
||||||
import com.core.common.core.domain.AjaxResult;
|
import com.core.common.core.domain.AjaxResult;
|
||||||
import com.core.common.core.domain.model.LoginUser;
|
import com.core.common.core.domain.model.LoginUser;
|
||||||
@@ -22,6 +13,14 @@ import com.core.common.utils.StringUtils;
|
|||||||
import com.core.common.utils.sql.SqlUtil;
|
import com.core.common.utils.sql.SqlUtil;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.web.bind.WebDataBinder;
|
||||||
|
import org.springframework.web.bind.annotation.InitBinder;
|
||||||
|
|
||||||
|
import java.beans.PropertyEditorSupport;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* web层通用数据处理
|
* web层通用数据处理
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
package com.core.common.core.domain;
|
package com.core.common.core.domain;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
import com.core.common.constant.HttpStatus;
|
import com.core.common.constant.HttpStatus;
|
||||||
import com.core.common.utils.StringUtils;
|
import com.core.common.utils.StringUtils;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 操作消息提醒
|
* 操作消息提醒
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
package com.core.common.core.domain;
|
package com.core.common.core.domain;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Entity基类
|
* Entity基类
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,16 +1,15 @@
|
|||||||
package com.core.common.core.domain;
|
package com.core.common.core.domain;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Entity基类
|
* Entity基类
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package com.core.common.core.domain;
|
package com.core.common.core.domain;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
import com.core.common.constant.HttpStatus;
|
import com.core.common.constant.HttpStatus;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 响应信息主体
|
* 响应信息主体
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
package com.core.common.core.domain;
|
package com.core.common.core.domain;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
import com.core.common.core.domain.entity.SysDept;
|
import com.core.common.core.domain.entity.SysDept;
|
||||||
import com.core.common.core.domain.entity.SysMenu;
|
import com.core.common.core.domain.entity.SysMenu;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Treeselect树结构实体类
|
* Treeselect树结构实体类
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,17 +1,15 @@
|
|||||||
package com.core.common.core.domain.entity;
|
package com.core.common.core.domain.entity;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import com.core.common.core.domain.BaseEntity;
|
||||||
import java.util.List;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
import javax.validation.constraints.Email;
|
import javax.validation.constraints.Email;
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
import javax.validation.constraints.Size;
|
import javax.validation.constraints.Size;
|
||||||
|
import java.util.ArrayList;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import java.util.List;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
|
||||||
|
|
||||||
import com.core.common.core.domain.BaseEntity;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 部门表 sys_dept
|
* 部门表 sys_dept
|
||||||
|
|||||||
@@ -1,15 +1,14 @@
|
|||||||
package com.core.common.core.domain.entity;
|
package com.core.common.core.domain.entity;
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
|
||||||
import javax.validation.constraints.Size;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
|
||||||
|
|
||||||
import com.core.common.annotation.Excel;
|
import com.core.common.annotation.Excel;
|
||||||
import com.core.common.annotation.Excel.ColumnType;
|
import com.core.common.annotation.Excel.ColumnType;
|
||||||
import com.core.common.constant.UserConstants;
|
import com.core.common.constant.UserConstants;
|
||||||
import com.core.common.core.domain.BaseEntity;
|
import com.core.common.core.domain.BaseEntity;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.Size;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 字典数据表 sys_dict_data
|
* 字典数据表 sys_dict_data
|
||||||
|
|||||||
@@ -1,15 +1,14 @@
|
|||||||
package com.core.common.core.domain.entity;
|
package com.core.common.core.domain.entity;
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
|
||||||
import javax.validation.constraints.Pattern;
|
|
||||||
import javax.validation.constraints.Size;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
|
||||||
|
|
||||||
import com.core.common.annotation.Excel;
|
import com.core.common.annotation.Excel;
|
||||||
import com.core.common.annotation.Excel.ColumnType;
|
import com.core.common.annotation.Excel.ColumnType;
|
||||||
import com.core.common.core.domain.BaseEntity;
|
import com.core.common.core.domain.BaseEntity;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.Pattern;
|
||||||
|
import javax.validation.constraints.Size;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 字典类型表 sys_dict_type
|
* 字典类型表 sys_dict_type
|
||||||
|
|||||||
@@ -1,16 +1,14 @@
|
|||||||
package com.core.common.core.domain.entity;
|
package com.core.common.core.domain.entity;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import com.core.common.core.domain.BaseEntity;
|
||||||
import java.util.List;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
import javax.validation.constraints.Size;
|
import javax.validation.constraints.Size;
|
||||||
|
import java.util.ArrayList;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import java.util.List;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
|
||||||
|
|
||||||
import com.core.common.core.domain.BaseEntity;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 菜单权限表 sys_menu
|
* 菜单权限表 sys_menu
|
||||||
|
|||||||
@@ -1,17 +1,15 @@
|
|||||||
package com.core.common.core.domain.entity;
|
package com.core.common.core.domain.entity;
|
||||||
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
|
||||||
import javax.validation.constraints.NotNull;
|
|
||||||
import javax.validation.constraints.Size;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
|
||||||
|
|
||||||
import com.core.common.annotation.Excel;
|
import com.core.common.annotation.Excel;
|
||||||
import com.core.common.annotation.Excel.ColumnType;
|
import com.core.common.annotation.Excel.ColumnType;
|
||||||
import com.core.common.core.domain.BaseEntity;
|
import com.core.common.core.domain.BaseEntity;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import javax.validation.constraints.Size;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 角色表 sys_role
|
* 角色表 sys_role
|
||||||
|
|||||||
@@ -1,16 +1,8 @@
|
|||||||
package com.core.common.core.domain.entity;
|
package com.core.common.core.domain.entity;
|
||||||
|
|
||||||
import java.util.Date;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import javax.validation.constraints.Email;
|
|
||||||
import javax.validation.constraints.NotBlank;
|
|
||||||
import javax.validation.constraints.Size;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.core.common.annotation.Excel;
|
import com.core.common.annotation.Excel;
|
||||||
import com.core.common.annotation.Excel.ColumnType;
|
import com.core.common.annotation.Excel.ColumnType;
|
||||||
import com.core.common.annotation.Excel.Type;
|
import com.core.common.annotation.Excel.Type;
|
||||||
@@ -19,8 +11,15 @@ import com.core.common.core.domain.BaseEntity;
|
|||||||
import com.core.common.xss.Xss;
|
import com.core.common.xss.Xss;
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
|
import javax.validation.constraints.Email;
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
import javax.validation.constraints.Size;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户对象 sys_user
|
* 用户对象 sys_user
|
||||||
@@ -32,6 +31,7 @@ public class SysUser extends BaseEntity {
|
|||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/** 用户ID */
|
/** 用户ID */
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
@Excel(name = "用户序号", type = Type.EXPORT, cellType = ColumnType.NUMERIC, prompt = "用户编号")
|
@Excel(name = "用户序号", type = Type.EXPORT, cellType = ColumnType.NUMERIC, prompt = "用户编号")
|
||||||
private Long userId;
|
private Long userId;
|
||||||
|
|
||||||
|
|||||||
@@ -1,20 +1,18 @@
|
|||||||
package com.core.common.core.domain.model;
|
package com.core.common.core.domain.model;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
|
import com.alibaba.fastjson2.annotation.JSONField;
|
||||||
|
import com.core.common.core.domain.entity.SysRole;
|
||||||
|
import com.core.common.core.domain.entity.SysUser;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.security.core.GrantedAuthority;
|
||||||
|
import org.springframework.security.core.userdetails.UserDetails;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import com.core.common.core.domain.entity.SysRole;
|
|
||||||
import org.springframework.security.core.GrantedAuthority;
|
|
||||||
import org.springframework.security.core.userdetails.UserDetails;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
|
||||||
import com.alibaba.fastjson2.annotation.JSONField;
|
|
||||||
import com.core.common.core.domain.entity.SysUser;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 登录用户身份权限
|
* 登录用户身份权限
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,13 +1,16 @@
|
|||||||
package com.core.common.core.redis;
|
package com.core.common.core.redis;
|
||||||
|
|
||||||
import java.util.*;
|
|
||||||
import java.util.concurrent.TimeUnit;
|
|
||||||
|
|
||||||
import com.core.common.exception.UtilException;
|
import com.core.common.exception.UtilException;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.data.redis.core.*;
|
import org.springframework.data.redis.core.BoundSetOperations;
|
||||||
|
import org.springframework.data.redis.core.HashOperations;
|
||||||
|
import org.springframework.data.redis.core.RedisTemplate;
|
||||||
|
import org.springframework.data.redis.core.ValueOperations;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* spring redis 工具类
|
* spring redis 工具类
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package com.core.common.core.text;
|
package com.core.common.core.text;
|
||||||
|
|
||||||
|
import com.core.common.utils.StringUtils;
|
||||||
|
|
||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
|
|
||||||
import com.core.common.utils.StringUtils;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 字符集工具类
|
* 字符集工具类
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
package com.core.common.core.text;
|
package com.core.common.core.text;
|
||||||
|
|
||||||
|
import com.core.common.utils.StringUtils;
|
||||||
|
import org.apache.commons.lang3.ArrayUtils;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
import java.math.RoundingMode;
|
import java.math.RoundingMode;
|
||||||
@@ -8,10 +11,6 @@ import java.nio.charset.Charset;
|
|||||||
import java.text.NumberFormat;
|
import java.text.NumberFormat;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.apache.commons.lang3.ArrayUtils;
|
|
||||||
|
|
||||||
import com.core.common.utils.StringUtils;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 类型转换器
|
* 类型转换器
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -39,4 +39,17 @@ public enum DelFlag {
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 手动添加 getter 方法以解决 Lombok 兼容性问题
|
||||||
|
public Integer getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getInfo() {
|
||||||
|
return info;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package com.core.common.enums;
|
package com.core.common.enums;
|
||||||
|
|
||||||
import java.util.function.Function;
|
|
||||||
|
|
||||||
import com.core.common.utils.DesensitizedUtil;
|
import com.core.common.utils.DesensitizedUtil;
|
||||||
|
|
||||||
|
import java.util.function.Function;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 脱敏类型
|
* 脱敏类型
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package com.core.common.enums;
|
package com.core.common.enums;
|
||||||
|
|
||||||
|
import org.springframework.lang.Nullable;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.springframework.lang.Nullable;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 请求方式
|
* 请求方式
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,13 +1,11 @@
|
|||||||
package com.core.common.filter;
|
package com.core.common.filter;
|
||||||
|
|
||||||
import java.io.IOException;
|
import com.core.common.utils.StringUtils;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
|
|
||||||
import javax.servlet.*;
|
import javax.servlet.*;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import java.io.IOException;
|
||||||
import org.springframework.http.MediaType;
|
|
||||||
|
|
||||||
import com.core.common.utils.StringUtils;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Repeatable 过滤器
|
* Repeatable 过滤器
|
||||||
|
|||||||
@@ -1,18 +1,17 @@
|
|||||||
package com.core.common.filter;
|
package com.core.common.filter;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import com.core.common.constant.Constants;
|
||||||
import java.io.ByteArrayInputStream;
|
import com.core.common.utils.http.HttpHelper;
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.InputStreamReader;
|
|
||||||
|
|
||||||
import javax.servlet.ReadListener;
|
import javax.servlet.ReadListener;
|
||||||
import javax.servlet.ServletInputStream;
|
import javax.servlet.ServletInputStream;
|
||||||
import javax.servlet.ServletResponse;
|
import javax.servlet.ServletResponse;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletRequestWrapper;
|
import javax.servlet.http.HttpServletRequestWrapper;
|
||||||
|
import java.io.BufferedReader;
|
||||||
import com.core.common.constant.Constants;
|
import java.io.ByteArrayInputStream;
|
||||||
import com.core.common.utils.http.HttpHelper;
|
import java.io.IOException;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 构建可重复读取inputStream的request
|
* 构建可重复读取inputStream的request
|
||||||
|
|||||||
@@ -1,15 +1,14 @@
|
|||||||
package com.core.common.filter;
|
package com.core.common.filter;
|
||||||
|
|
||||||
import java.io.IOException;
|
import com.core.common.enums.HttpMethod;
|
||||||
import java.util.ArrayList;
|
import com.core.common.utils.StringUtils;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import javax.servlet.*;
|
import javax.servlet.*;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
import com.core.common.enums.HttpMethod;
|
import java.util.ArrayList;
|
||||||
import com.core.common.utils.StringUtils;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 防止XSS攻击的过滤器
|
* 防止XSS攻击的过滤器
|
||||||
|
|||||||
@@ -1,19 +1,17 @@
|
|||||||
package com.core.common.filter;
|
package com.core.common.filter;
|
||||||
|
|
||||||
import java.io.ByteArrayInputStream;
|
import com.core.common.utils.StringUtils;
|
||||||
import java.io.IOException;
|
import com.core.common.utils.html.EscapeUtil;
|
||||||
|
import org.apache.commons.io.IOUtils;
|
||||||
|
import org.springframework.http.HttpHeaders;
|
||||||
|
import org.springframework.http.MediaType;
|
||||||
|
|
||||||
import javax.servlet.ReadListener;
|
import javax.servlet.ReadListener;
|
||||||
import javax.servlet.ServletInputStream;
|
import javax.servlet.ServletInputStream;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletRequestWrapper;
|
import javax.servlet.http.HttpServletRequestWrapper;
|
||||||
|
import java.io.ByteArrayInputStream;
|
||||||
import org.apache.commons.io.IOUtils;
|
import java.io.IOException;
|
||||||
import org.springframework.http.HttpHeaders;
|
|
||||||
import org.springframework.http.MediaType;
|
|
||||||
|
|
||||||
import com.core.common.utils.StringUtils;
|
|
||||||
import com.core.common.utils.html.EscapeUtil;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* XSS过滤处理
|
* XSS过滤处理
|
||||||
|
|||||||
@@ -3,16 +3,15 @@
|
|||||||
*/
|
*/
|
||||||
package com.core.common.utils;
|
package com.core.common.utils;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import com.core.common.constant.CacheConstants;
|
||||||
import java.util.List;
|
import com.core.common.core.redis.RedisCache;
|
||||||
|
import com.core.common.exception.UtilException;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import com.core.common.constant.CacheConstants;
|
import java.util.ArrayList;
|
||||||
import com.core.common.core.redis.RedisCache;
|
import java.util.List;
|
||||||
import com.core.common.exception.UtilException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 排番组件
|
* 排番组件
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package com.core.common.utils;
|
package com.core.common.utils;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.time.DateFormatUtils;
|
||||||
|
|
||||||
import java.lang.management.ManagementFactory;
|
import java.lang.management.ManagementFactory;
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
@@ -9,8 +11,6 @@ import java.time.format.DateTimeParseException;
|
|||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import org.apache.commons.lang3.time.DateFormatUtils;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 时间工具类
|
* 时间工具类
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
package com.core.common.utils;
|
package com.core.common.utils;
|
||||||
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSONArray;
|
import com.alibaba.fastjson2.JSONArray;
|
||||||
import com.core.common.constant.CacheConstants;
|
import com.core.common.constant.CacheConstants;
|
||||||
import com.core.common.core.domain.entity.SysDictData;
|
import com.core.common.core.domain.entity.SysDictData;
|
||||||
import com.core.common.core.redis.RedisCache;
|
import com.core.common.core.redis.RedisCache;
|
||||||
import com.core.common.utils.spring.SpringUtils;
|
import com.core.common.utils.spring.SpringUtils;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 字典工具类
|
* 字典工具类
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package com.core.common.utils;
|
package com.core.common.utils;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.exception.ExceptionUtils;
|
||||||
|
|
||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
import java.io.StringWriter;
|
import java.io.StringWriter;
|
||||||
|
|
||||||
import org.apache.commons.lang3.exception.ExceptionUtils;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 错误信息处理类。
|
* 错误信息处理类。
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
package com.core.common.utils;
|
package com.core.common.utils;
|
||||||
|
|
||||||
|
import com.core.common.utils.spring.SpringUtils;
|
||||||
import org.springframework.context.MessageSource;
|
import org.springframework.context.MessageSource;
|
||||||
import org.springframework.context.i18n.LocaleContextHolder;
|
import org.springframework.context.i18n.LocaleContextHolder;
|
||||||
|
|
||||||
import com.core.common.utils.spring.SpringUtils;
|
|
||||||
import org.springframework.lang.Nullable;
|
import org.springframework.lang.Nullable;
|
||||||
|
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|||||||
@@ -1,18 +1,19 @@
|
|||||||
package com.core.common.utils;
|
package com.core.common.utils;
|
||||||
|
|
||||||
import java.io.*;
|
import com.core.common.annotation.Excel;
|
||||||
import java.lang.reflect.Field;
|
import com.core.common.annotation.Excel.ColumnType;
|
||||||
import java.lang.reflect.Method;
|
import com.core.common.annotation.Excel.Type;
|
||||||
import java.lang.reflect.ParameterizedType;
|
import com.core.common.annotation.ExcelExtra;
|
||||||
import java.math.BigDecimal;
|
import com.core.common.annotation.Excels;
|
||||||
import java.text.DecimalFormat;
|
import com.core.common.config.CoreConfig;
|
||||||
import java.time.LocalDate;
|
import com.core.common.core.domain.AjaxResult;
|
||||||
import java.time.LocalDateTime;
|
import com.core.common.core.text.Convert;
|
||||||
import java.util.*;
|
import com.core.common.exception.UtilException;
|
||||||
import java.util.stream.Collectors;
|
import com.core.common.utils.file.FileTypeUtils;
|
||||||
|
import com.core.common.utils.file.FileUtils;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import com.core.common.utils.file.ImageUtils;
|
||||||
|
import com.core.common.utils.poi.ExcelHandlerAdapter;
|
||||||
|
import com.core.common.utils.reflect.ReflectUtils;
|
||||||
import org.apache.commons.lang3.ArrayUtils;
|
import org.apache.commons.lang3.ArrayUtils;
|
||||||
import org.apache.commons.lang3.RegExUtils;
|
import org.apache.commons.lang3.RegExUtils;
|
||||||
import org.apache.commons.lang3.reflect.FieldUtils;
|
import org.apache.commons.lang3.reflect.FieldUtils;
|
||||||
@@ -29,20 +30,17 @@ import org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTMarker;
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import com.core.common.annotation.Excel;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import com.core.common.annotation.Excel.ColumnType;
|
import java.io.*;
|
||||||
import com.core.common.annotation.Excel.Type;
|
import java.lang.reflect.Field;
|
||||||
import com.core.common.annotation.ExcelExtra;
|
import java.lang.reflect.Method;
|
||||||
import com.core.common.annotation.Excels;
|
import java.lang.reflect.ParameterizedType;
|
||||||
import com.core.common.config.CoreConfig;
|
import java.math.BigDecimal;
|
||||||
import com.core.common.core.domain.AjaxResult;
|
import java.text.DecimalFormat;
|
||||||
import com.core.common.core.text.Convert;
|
import java.time.LocalDate;
|
||||||
import com.core.common.exception.UtilException;
|
import java.time.LocalDateTime;
|
||||||
import com.core.common.utils.file.FileTypeUtils;
|
import java.util.*;
|
||||||
import com.core.common.utils.file.FileUtils;
|
import java.util.stream.Collectors;
|
||||||
import com.core.common.utils.file.ImageUtils;
|
|
||||||
import com.core.common.utils.poi.ExcelHandlerAdapter;
|
|
||||||
import com.core.common.utils.reflect.ReflectUtils;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Excel相关处理
|
* Excel相关处理
|
||||||
|
|||||||
@@ -1,19 +1,18 @@
|
|||||||
package com.core.common.utils;
|
package com.core.common.utils;
|
||||||
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
import org.springframework.security.core.Authentication;
|
|
||||||
import org.springframework.security.core.context.SecurityContextHolder;
|
|
||||||
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
|
||||||
import org.springframework.util.PatternMatchUtils;
|
|
||||||
|
|
||||||
import com.core.common.constant.Constants;
|
import com.core.common.constant.Constants;
|
||||||
import com.core.common.constant.HttpStatus;
|
import com.core.common.constant.HttpStatus;
|
||||||
import com.core.common.core.domain.entity.SysRole;
|
import com.core.common.core.domain.entity.SysRole;
|
||||||
import com.core.common.core.domain.model.LoginUser;
|
import com.core.common.core.domain.model.LoginUser;
|
||||||
import com.core.common.exception.ServiceException;
|
import com.core.common.exception.ServiceException;
|
||||||
|
import org.springframework.security.core.Authentication;
|
||||||
|
import org.springframework.security.core.context.SecurityContextHolder;
|
||||||
|
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
||||||
|
import org.springframework.util.PatternMatchUtils;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 安全服务工具类
|
* 安全服务工具类
|
||||||
|
|||||||
@@ -1,5 +1,15 @@
|
|||||||
package com.core.common.utils;
|
package com.core.common.utils;
|
||||||
|
|
||||||
|
import com.core.common.constant.Constants;
|
||||||
|
import com.core.common.core.text.Convert;
|
||||||
|
import org.springframework.web.context.request.RequestAttributes;
|
||||||
|
import org.springframework.web.context.request.RequestContextHolder;
|
||||||
|
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||||
|
|
||||||
|
import javax.servlet.ServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import javax.servlet.http.HttpSession;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.net.URLDecoder;
|
import java.net.URLDecoder;
|
||||||
@@ -8,18 +18,6 @@ import java.util.Collections;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import javax.servlet.ServletRequest;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
import javax.servlet.http.HttpSession;
|
|
||||||
|
|
||||||
import org.springframework.web.context.request.RequestAttributes;
|
|
||||||
import org.springframework.web.context.request.RequestContextHolder;
|
|
||||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
|
||||||
|
|
||||||
import com.core.common.constant.Constants;
|
|
||||||
import com.core.common.core.text.Convert;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 客户端工具类
|
* 客户端工具类
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
package com.core.common.utils;
|
package com.core.common.utils;
|
||||||
|
|
||||||
import java.util.*;
|
|
||||||
|
|
||||||
import org.springframework.util.AntPathMatcher;
|
|
||||||
|
|
||||||
import com.core.common.constant.Constants;
|
import com.core.common.constant.Constants;
|
||||||
import com.core.common.core.text.StrFormatter;
|
import com.core.common.core.text.StrFormatter;
|
||||||
|
import org.springframework.util.AntPathMatcher;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 字符串工具类
|
* 字符串工具类
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package com.core.common.utils;
|
package com.core.common.utils;
|
||||||
|
|
||||||
import java.util.concurrent.*;
|
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import java.util.concurrent.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 线程相关工具类.
|
* 线程相关工具类.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,14 +1,10 @@
|
|||||||
package com.core.common.utils;
|
package com.core.common.utils;
|
||||||
|
|
||||||
import org.apache.commons.lang3.time.DateFormatUtils;
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import java.lang.management.ManagementFactory;
|
import java.time.LocalTime;
|
||||||
import java.text.ParseException;
|
import java.time.ZoneId;
|
||||||
import java.text.SimpleDateFormat;
|
|
||||||
import java.time.*;
|
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.time.format.DateTimeParseException;
|
|
||||||
import java.util.Calendar;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
package com.core.common.utils.bean;
|
package com.core.common.utils.bean;
|
||||||
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import javax.validation.ConstraintViolation;
|
import javax.validation.ConstraintViolation;
|
||||||
import javax.validation.ConstraintViolationException;
|
import javax.validation.ConstraintViolationException;
|
||||||
import javax.validation.Validator;
|
import javax.validation.Validator;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* bean对象属性验证
|
* bean对象属性验证
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package com.core.common.utils.file;
|
package com.core.common.utils.file;
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文件类型工具类
|
* 文件类型工具类
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,13 +1,5 @@
|
|||||||
package com.core.common.utils.file;
|
package com.core.common.utils.file;
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.nio.file.Paths;
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
import org.apache.commons.io.FilenameUtils;
|
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
|
||||||
|
|
||||||
import com.core.common.config.CoreConfig;
|
import com.core.common.config.CoreConfig;
|
||||||
import com.core.common.constant.Constants;
|
import com.core.common.constant.Constants;
|
||||||
import com.core.common.exception.file.FileNameLengthLimitExceededException;
|
import com.core.common.exception.file.FileNameLengthLimitExceededException;
|
||||||
@@ -16,6 +8,13 @@ import com.core.common.exception.file.InvalidExtensionException;
|
|||||||
import com.core.common.utils.DateUtils;
|
import com.core.common.utils.DateUtils;
|
||||||
import com.core.common.utils.StringUtils;
|
import com.core.common.utils.StringUtils;
|
||||||
import com.core.common.utils.uuid.Seq;
|
import com.core.common.utils.uuid.Seq;
|
||||||
|
import org.apache.commons.io.FilenameUtils;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.nio.file.Paths;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文件上传工具类
|
* 文件上传工具类
|
||||||
|
|||||||
@@ -1,20 +1,18 @@
|
|||||||
package com.core.common.utils.file;
|
package com.core.common.utils.file;
|
||||||
|
|
||||||
import java.io.*;
|
|
||||||
import java.net.URLEncoder;
|
|
||||||
import java.nio.charset.StandardCharsets;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
import org.apache.commons.io.FilenameUtils;
|
|
||||||
import org.apache.commons.io.IOUtils;
|
|
||||||
import org.apache.commons.lang3.ArrayUtils;
|
|
||||||
|
|
||||||
import com.core.common.config.CoreConfig;
|
import com.core.common.config.CoreConfig;
|
||||||
import com.core.common.utils.DateUtils;
|
import com.core.common.utils.DateUtils;
|
||||||
import com.core.common.utils.StringUtils;
|
import com.core.common.utils.StringUtils;
|
||||||
import com.core.common.utils.uuid.IdUtils;
|
import com.core.common.utils.uuid.IdUtils;
|
||||||
|
import org.apache.commons.io.FilenameUtils;
|
||||||
|
import org.apache.commons.io.IOUtils;
|
||||||
|
import org.apache.commons.lang3.ArrayUtils;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.*;
|
||||||
|
import java.net.URLEncoder;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文件处理工具类
|
* 文件处理工具类
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
package com.core.common.utils.file;
|
package com.core.common.utils.file;
|
||||||
|
|
||||||
|
import com.core.common.config.CoreConfig;
|
||||||
|
import com.core.common.constant.Constants;
|
||||||
|
import com.core.common.utils.StringUtils;
|
||||||
|
import org.apache.poi.util.IOUtils;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import java.io.ByteArrayInputStream;
|
import java.io.ByteArrayInputStream;
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
@@ -7,14 +14,6 @@ import java.net.URL;
|
|||||||
import java.net.URLConnection;
|
import java.net.URLConnection;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
import org.apache.poi.util.IOUtils;
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import com.core.common.config.CoreConfig;
|
|
||||||
import com.core.common.constant.Constants;
|
|
||||||
import com.core.common.utils.StringUtils;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 图片处理工具类
|
* 图片处理工具类
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,17 +1,16 @@
|
|||||||
package com.core.common.utils.http;
|
package com.core.common.utils.http;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.exception.ExceptionUtils;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import javax.servlet.ServletRequest;
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
|
|
||||||
import javax.servlet.ServletRequest;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.exception.ExceptionUtils;
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通用http工具封装
|
* 通用http工具封装
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
package com.core.common.utils.http;
|
package com.core.common.utils.http;
|
||||||
|
|
||||||
|
import com.core.common.constant.Constants;
|
||||||
|
import com.core.common.utils.StringUtils;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import javax.net.ssl.*;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.net.ConnectException;
|
import java.net.ConnectException;
|
||||||
import java.net.SocketTimeoutException;
|
import java.net.SocketTimeoutException;
|
||||||
@@ -8,14 +14,6 @@ import java.net.URLConnection;
|
|||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.security.cert.X509Certificate;
|
import java.security.cert.X509Certificate;
|
||||||
|
|
||||||
import javax.net.ssl.*;
|
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import com.core.common.constant.Constants;
|
|
||||||
import com.core.common.utils.StringUtils;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通用http发送方法
|
* 通用http发送方法
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,14 +1,13 @@
|
|||||||
package com.core.common.utils.ip;
|
package com.core.common.utils.ip;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSON;
|
import com.alibaba.fastjson2.JSON;
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
import com.core.common.config.CoreConfig;
|
import com.core.common.config.CoreConfig;
|
||||||
import com.core.common.constant.Constants;
|
import com.core.common.constant.Constants;
|
||||||
import com.core.common.utils.StringUtils;
|
import com.core.common.utils.StringUtils;
|
||||||
import com.core.common.utils.http.HttpUtils;
|
import com.core.common.utils.http.HttpUtils;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取地址类
|
* 获取地址类
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
package com.core.common.utils.ip;
|
package com.core.common.utils.ip;
|
||||||
|
|
||||||
import java.net.InetAddress;
|
|
||||||
import java.net.UnknownHostException;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
|
|
||||||
import com.core.common.utils.ServletUtils;
|
import com.core.common.utils.ServletUtils;
|
||||||
import com.core.common.utils.StringUtils;
|
import com.core.common.utils.StringUtils;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import java.net.InetAddress;
|
||||||
|
import java.net.UnknownHostException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取IP方法
|
* 获取IP方法
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,33 +1,5 @@
|
|||||||
package com.core.common.utils.poi;
|
package com.core.common.utils.poi;
|
||||||
|
|
||||||
import java.io.*;
|
|
||||||
import java.lang.reflect.Field;
|
|
||||||
import java.lang.reflect.Method;
|
|
||||||
import java.lang.reflect.ParameterizedType;
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.text.DecimalFormat;
|
|
||||||
import java.time.LocalDate;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.util.*;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.ArrayUtils;
|
|
||||||
import org.apache.commons.lang3.RegExUtils;
|
|
||||||
import org.apache.commons.lang3.reflect.FieldUtils;
|
|
||||||
import org.apache.poi.hssf.usermodel.*;
|
|
||||||
import org.apache.poi.ooxml.POIXMLDocumentPart;
|
|
||||||
import org.apache.poi.ss.usermodel.*;
|
|
||||||
import org.apache.poi.ss.util.CellRangeAddress;
|
|
||||||
import org.apache.poi.ss.util.CellRangeAddressList;
|
|
||||||
import org.apache.poi.util.IOUtils;
|
|
||||||
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
|
|
||||||
import org.apache.poi.xssf.usermodel.*;
|
|
||||||
import org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTMarker;
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import com.core.common.annotation.Excel;
|
import com.core.common.annotation.Excel;
|
||||||
import com.core.common.annotation.Excel.ColumnType;
|
import com.core.common.annotation.Excel.ColumnType;
|
||||||
import com.core.common.annotation.Excel.Type;
|
import com.core.common.annotation.Excel.Type;
|
||||||
@@ -43,6 +15,32 @@ import com.core.common.utils.file.FileTypeUtils;
|
|||||||
import com.core.common.utils.file.FileUtils;
|
import com.core.common.utils.file.FileUtils;
|
||||||
import com.core.common.utils.file.ImageUtils;
|
import com.core.common.utils.file.ImageUtils;
|
||||||
import com.core.common.utils.reflect.ReflectUtils;
|
import com.core.common.utils.reflect.ReflectUtils;
|
||||||
|
import org.apache.commons.lang3.ArrayUtils;
|
||||||
|
import org.apache.commons.lang3.RegExUtils;
|
||||||
|
import org.apache.commons.lang3.reflect.FieldUtils;
|
||||||
|
import org.apache.poi.hssf.usermodel.*;
|
||||||
|
import org.apache.poi.ooxml.POIXMLDocumentPart;
|
||||||
|
import org.apache.poi.ss.usermodel.*;
|
||||||
|
import org.apache.poi.ss.util.CellRangeAddress;
|
||||||
|
import org.apache.poi.ss.util.CellRangeAddressList;
|
||||||
|
import org.apache.poi.util.IOUtils;
|
||||||
|
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
|
||||||
|
import org.apache.poi.xssf.usermodel.*;
|
||||||
|
import org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTMarker;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.*;
|
||||||
|
import java.lang.reflect.Field;
|
||||||
|
import java.lang.reflect.Method;
|
||||||
|
import java.lang.reflect.ParameterizedType;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.text.DecimalFormat;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Excel相关处理
|
* Excel相关处理
|
||||||
|
|||||||
@@ -1,16 +1,15 @@
|
|||||||
package com.core.common.utils.reflect;
|
package com.core.common.utils.reflect;
|
||||||
|
|
||||||
import java.lang.reflect.*;
|
import com.core.common.core.text.Convert;
|
||||||
import java.util.Date;
|
import com.core.common.utils.DateUtils;
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.commons.lang3.Validate;
|
import org.apache.commons.lang3.Validate;
|
||||||
import org.apache.poi.ss.usermodel.DateUtil;
|
import org.apache.poi.ss.usermodel.DateUtil;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import com.core.common.core.text.Convert;
|
import java.lang.reflect.*;
|
||||||
import com.core.common.utils.DateUtils;
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 反射工具类. 提供调用getter/setter方法, 访问私有变量, 调用私有方法, 获取泛型类型Class, 被AOP过的真实类等工具函数.
|
* 反射工具类. 提供调用getter/setter方法, 访问私有变量, 调用私有方法, 获取泛型类型Class, 被AOP过的真实类等工具函数.
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
package com.core.common.utils.sign;
|
package com.core.common.utils.sign;
|
||||||
|
|
||||||
import java.nio.charset.StandardCharsets;
|
|
||||||
import java.security.MessageDigest;
|
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.security.MessageDigest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Md5加密方法
|
* Md5加密方法
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.core.common.utils.spring;
|
package com.core.common.utils.spring;
|
||||||
|
|
||||||
|
import com.core.common.utils.StringUtils;
|
||||||
import org.springframework.aop.framework.AopContext;
|
import org.springframework.aop.framework.AopContext;
|
||||||
import org.springframework.beans.BeansException;
|
import org.springframework.beans.BeansException;
|
||||||
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
|
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
|
||||||
@@ -9,8 +10,6 @@ import org.springframework.context.ApplicationContext;
|
|||||||
import org.springframework.context.ApplicationContextAware;
|
import org.springframework.context.ApplicationContextAware;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import com.core.common.utils.StringUtils;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* spring工具类 方便在非spring管理环境中获取bean
|
* spring工具类 方便在非spring管理环境中获取bean
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package com.core.common.utils.uuid;
|
package com.core.common.utils.uuid;
|
||||||
|
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
|
||||||
|
|
||||||
import com.core.common.utils.DateUtils;
|
import com.core.common.utils.DateUtils;
|
||||||
import com.core.common.utils.StringUtils;
|
import com.core.common.utils.StringUtils;
|
||||||
|
|
||||||
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author system 序列生成类
|
* @author system 序列生成类
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
package com.core.common.utils.uuid;
|
package com.core.common.utils.uuid;
|
||||||
|
|
||||||
|
import com.core.common.exception.UtilException;
|
||||||
|
|
||||||
import java.security.MessageDigest;
|
import java.security.MessageDigest;
|
||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.NoSuchAlgorithmException;
|
||||||
import java.security.SecureRandom;
|
import java.security.SecureRandom;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import java.util.concurrent.ThreadLocalRandom;
|
import java.util.concurrent.ThreadLocalRandom;
|
||||||
|
|
||||||
import com.core.common.exception.UtilException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 提供通用唯一识别码(universally unique identifier)(UUID)实现
|
* 提供通用唯一识别码(universally unique identifier)(UUID)实现
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
package com.core.common.xss;
|
package com.core.common.xss;
|
||||||
|
|
||||||
|
import javax.validation.Constraint;
|
||||||
|
import javax.validation.Payload;
|
||||||
import java.lang.annotation.ElementType;
|
import java.lang.annotation.ElementType;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
||||||
import java.lang.annotation.RetentionPolicy;
|
import java.lang.annotation.RetentionPolicy;
|
||||||
import java.lang.annotation.Target;
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
import javax.validation.Constraint;
|
|
||||||
import javax.validation.Payload;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 自定义xss校验注解
|
* 自定义xss校验注解
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
package com.core.common.xss;
|
package com.core.common.xss;
|
||||||
|
|
||||||
import java.util.regex.Matcher;
|
import com.core.common.utils.StringUtils;
|
||||||
import java.util.regex.Pattern;
|
|
||||||
|
|
||||||
import javax.validation.ConstraintValidator;
|
import javax.validation.ConstraintValidator;
|
||||||
import javax.validation.ConstraintValidatorContext;
|
import javax.validation.ConstraintValidatorContext;
|
||||||
|
import java.util.regex.Matcher;
|
||||||
import com.core.common.utils.StringUtils;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 自定义xss校验注解实现
|
* 自定义xss校验注解实现
|
||||||
|
|||||||
@@ -116,37 +116,40 @@ public class MybatisPlusConfig {
|
|||||||
* 获取当前租户 ID
|
* 获取当前租户 ID
|
||||||
*/
|
*/
|
||||||
private Integer getCurrentTenantId() {
|
private Integer getCurrentTenantId() {
|
||||||
|
Integer result = null;
|
||||||
|
|
||||||
// 首先尝试从线程局部变量中获取租户ID(适用于定时任务等场景)
|
// 首先尝试从线程局部变量中获取租户ID(适用于定时任务等场景)
|
||||||
Integer threadLocalTenantId = TenantContext.getCurrentTenant();
|
Integer threadLocalTenantId = TenantContext.getCurrentTenant();
|
||||||
if (threadLocalTenantId != null) {
|
if (threadLocalTenantId != null) {
|
||||||
return threadLocalTenantId;
|
result = threadLocalTenantId;
|
||||||
}
|
} else {
|
||||||
|
// 获取当前登录用户的租户ID(优先使用SecurityUtils中储存的LoginUser的租户ID)
|
||||||
// 获取当前登录用户的租户ID(优先使用SecurityUtils中储存的LoginUser的租户ID)
|
try {
|
||||||
try {
|
if (SecurityUtils.getAuthentication() != null) {
|
||||||
if (SecurityUtils.getAuthentication() != null) {
|
result = SecurityUtils.getLoginUser().getTenantId();
|
||||||
return SecurityUtils.getLoginUser().getTenantId();
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
result = 1; // 默认租户ID
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
|
||||||
return 1; // 默认租户ID
|
|
||||||
}
|
|
||||||
|
|
||||||
// 尝试从请求头中获取租户ID
|
if (result == null) {
|
||||||
ServletRequestAttributes attributes = (ServletRequestAttributes)RequestContextHolder.getRequestAttributes();
|
// 尝试从请求头中获取租户ID
|
||||||
if (attributes != null) {
|
ServletRequestAttributes attributes = (ServletRequestAttributes)RequestContextHolder.getRequestAttributes();
|
||||||
HttpServletRequest request = attributes.getRequest();
|
if (attributes != null) {
|
||||||
// 从请求头获取租户ID,假设header名称为"X-Tenant-ID" ; 登录接口前端把租户id放到请求头里
|
HttpServletRequest request = attributes.getRequest();
|
||||||
String tenantIdHeader = request.getHeader("X-Tenant-ID");
|
// 从请求头获取租户ID,假设header名称为"X-Tenant-ID" ; 登录接口前端把租户id放到请求头里
|
||||||
String requestMethodName = request.getHeader("Request-Method-Name");
|
String tenantIdHeader = request.getHeader("X-Tenant-ID");
|
||||||
// 登录
|
String requestMethodName = request.getHeader("Request-Method-Name");
|
||||||
if ("login".equals(requestMethodName)) {
|
// 登录
|
||||||
if (tenantIdHeader != null && !tenantIdHeader.isEmpty()) {
|
if ("login".equals(requestMethodName)) {
|
||||||
return Integer.parseInt(tenantIdHeader);
|
if (tenantIdHeader != null && !tenantIdHeader.isEmpty()) {
|
||||||
|
result = Integer.parseInt(tenantIdHeader);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1; // 默认租户ID
|
return result != null ? result : 1; // 默认租户ID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,12 +2,17 @@ package com.core.framework.handler;
|
|||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
import org.apache.ibatis.reflection.MetaObject;
|
import org.apache.ibatis.reflection.MetaObject;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.springframework.web.context.request.RequestContextHolder;
|
||||||
|
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
|
import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
|
||||||
import com.core.common.core.domain.model.LoginUser;
|
import com.core.common.core.domain.model.LoginUser;
|
||||||
import com.core.common.utils.SecurityUtils;
|
import com.core.common.utils.SecurityUtils;
|
||||||
|
import com.core.framework.config.TenantContext;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
public class MybastisColumnsHandler implements MetaObjectHandler {
|
public class MybastisColumnsHandler implements MetaObjectHandler {
|
||||||
@@ -47,10 +52,40 @@ public class MybastisColumnsHandler implements MetaObjectHandler {
|
|||||||
* 获取当前租户 ID
|
* 获取当前租户 ID
|
||||||
*/
|
*/
|
||||||
private Integer getCurrentTenantId() {
|
private Integer getCurrentTenantId() {
|
||||||
// 获取当前登录用户的租户 ID
|
Integer result = null;
|
||||||
if (SecurityUtils.getAuthentication() != null) {
|
|
||||||
return SecurityUtils.getLoginUser().getTenantId();
|
// 首先尝试从线程局部变量中获取租户ID(适用于定时任务等场景)
|
||||||
|
Integer threadLocalTenantId = TenantContext.getCurrentTenant();
|
||||||
|
if (threadLocalTenantId != null) {
|
||||||
|
result = threadLocalTenantId;
|
||||||
|
} else {
|
||||||
|
// 获取当前登录用户的租户ID(优先使用SecurityUtils中储存的LoginUser的租户ID)
|
||||||
|
try {
|
||||||
|
if (SecurityUtils.getAuthentication() != null) {
|
||||||
|
result = SecurityUtils.getLoginUser().getTenantId();
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
result = 1; // 默认租户ID
|
||||||
|
}
|
||||||
|
|
||||||
|
if (result == null) {
|
||||||
|
// 尝试从请求头中获取租户ID
|
||||||
|
ServletRequestAttributes attributes = (ServletRequestAttributes)RequestContextHolder.getRequestAttributes();
|
||||||
|
if (attributes != null) {
|
||||||
|
HttpServletRequest request = attributes.getRequest();
|
||||||
|
// 从请求头获取租户ID,假设header名称为"X-Tenant-ID" ; 登录接口前端把租户id放到请求头里
|
||||||
|
String tenantIdHeader = request.getHeader("X-Tenant-ID");
|
||||||
|
String requestMethodName = request.getHeader("Request-Method-Name");
|
||||||
|
// 登录
|
||||||
|
if ("login".equals(requestMethodName)) {
|
||||||
|
if (tenantIdHeader != null && !tenantIdHeader.isEmpty()) {
|
||||||
|
result = Integer.parseInt(tenantIdHeader);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
|
||||||
|
return result != null ? result : 1; // 默认租户ID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package com.core.quartz.util;
|
package com.core.quartz.util;
|
||||||
|
|
||||||
|
import org.quartz.CronExpression;
|
||||||
|
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import org.quartz.CronExpression;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* cron表达式工具类
|
* cron表达式工具类
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -76,4 +76,12 @@ public class SysTenant implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
// 手动添加 getter 方法以解决 Lombok 兼容性问题
|
||||||
|
public String getDeleteFlag() {
|
||||||
|
return deleteFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeleteFlag(String deleteFlag) {
|
||||||
|
this.deleteFlag = deleteFlag;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import org.springframework.core.env.Environment;
|
|||||||
import org.springframework.scheduling.annotation.EnableAsync;
|
import org.springframework.scheduling.annotation.EnableAsync;
|
||||||
|
|
||||||
import com.openhis.web.ybmanage.config.YbServiceConfig;
|
import com.openhis.web.ybmanage.config.YbServiceConfig;
|
||||||
|
import com.openhis.administration.domain.Instrument;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 启动程序
|
* 启动程序
|
||||||
@@ -25,6 +26,14 @@ import com.openhis.web.ybmanage.config.YbServiceConfig;
|
|||||||
public class OpenHisApplication {
|
public class OpenHisApplication {
|
||||||
public static void main(String[] args) throws UnknownHostException {
|
public static void main(String[] args) throws UnknownHostException {
|
||||||
// System.setProperty("spring.devtools.restart.enabled", "false");
|
// System.setProperty("spring.devtools.restart.enabled", "false");
|
||||||
|
// 测试 Instrument 类加载
|
||||||
|
// try {
|
||||||
|
// Class.forName("com.openhis.administration.domain.Instrument");
|
||||||
|
// System.out.println("Instrument class loaded successfully");
|
||||||
|
// } catch (ClassNotFoundException e) {
|
||||||
|
// System.err.println("Failed to load Instrument class: " + e.getMessage());
|
||||||
|
// }
|
||||||
|
|
||||||
ConfigurableApplicationContext application = SpringApplication.run(OpenHisApplication.class, args);
|
ConfigurableApplicationContext application = SpringApplication.run(OpenHisApplication.class, args);
|
||||||
Environment env = application.getEnvironment();
|
Environment env = application.getEnvironment();
|
||||||
String ip = InetAddress.getLocalHost().getHostAddress();
|
String ip = InetAddress.getLocalHost().getHostAddress();
|
||||||
|
|||||||
@@ -4,8 +4,6 @@
|
|||||||
package com.openhis.web.ybmanage.config;
|
package com.openhis.web.ybmanage.config;
|
||||||
|
|
||||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
import org.springframework.boot.context.properties.ConstructorBinding;
|
|
||||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.context.annotation.PropertySource;
|
import org.springframework.context.annotation.PropertySource;
|
||||||
|
|
||||||
@@ -16,10 +14,8 @@ import org.springframework.context.annotation.PropertySource;
|
|||||||
* @date 2025-04-11
|
* @date 2025-04-11
|
||||||
*/
|
*/
|
||||||
@Configuration
|
@Configuration
|
||||||
@ConstructorBinding
|
|
||||||
@PropertySource("classpath:properties/yb.properties")
|
@PropertySource("classpath:properties/yb.properties")
|
||||||
@ConfigurationProperties(prefix = "ybapp.config")
|
@ConfigurationProperties(prefix = "ybapp.config")
|
||||||
@EnableConfigurationProperties
|
|
||||||
public class YbServiceConfig {
|
public class YbServiceConfig {
|
||||||
|
|
||||||
private String url;
|
private String url;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# 项目相关配置
|
# 项目相关配置
|
||||||
core:
|
core:
|
||||||
# 名称
|
# 名称
|
||||||
name: OpenHis
|
name: HEALTHLINK-HIS
|
||||||
# 版本
|
# 版本
|
||||||
version: 0.0.1
|
version: 0.0.1
|
||||||
# 版权年份
|
# 版权年份
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
|
_ _ ______ _ _______ _ _ _ _____ _ _ _ __ _ _ _____ _____
|
||||||
|
| | | | ____| /\ | | |__ __| | | | | |_ _| \ | | |/ / | | | |_ _|/ ____|
|
||||||
|
| |__| | |__ / \ | | | | | |__| | | | | | \| | ' /_____| |__| | | | | (___
|
||||||
|
| __ | __| / /\ \ | | | | | __ | | | | | . ` | <______| __ | | | \___ \
|
||||||
|
| | | | |____ / ____ \| |____| | | | | | |____ _| |_| |\ | . \ | | | |_| |_ ____) |
|
||||||
|
|_| |_|______/_/ \_\______|_| |_| |_|______|_____|_| \_|_|\_\ |_| |_|_____|_____/
|
||||||
|
|
||||||
|
|
||||||
:::::::: ::::::::: :::::::::: :::: ::: ::: ::: ::::::::::: ::::::::
|
|
||||||
:+: :+: :+: :+: :+: :+:+: :+: :+: :+: :+: :+: :+:
|
|
||||||
+:+ +:+ +:+ +:+ +:+ :+:+:+ +:+ +:+ +:+ +:+ +:+
|
|
||||||
+#+ +:+ +#++:++#+ +#++:++# +#+ +:+ +#+ +#++:++#++ +#+ +#++:++#++
|
|
||||||
+#+ +#+ +#+ +#+ +#+ +#+#+# +#+ +#+ +#+ +#+
|
|
||||||
#+# #+# #+# #+# #+# #+#+# #+# #+# #+# #+# #+#
|
|
||||||
######## ### ########## ### #### ### ### ########### ########
|
|
||||||
|
|
||||||
Application Version: ${core.version}
|
Application Version: ${core.version}
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ package com.openhis.administration.domain;
|
|||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.core.common.core.domain.HisBaseEntity;
|
import com.core.common.core.domain.HisBaseEntity;
|
||||||
|
|
||||||
@@ -22,7 +24,7 @@ import lombok.experimental.Accessors;
|
|||||||
public class BizUser extends HisBaseEntity {
|
public class BizUser extends HisBaseEntity {
|
||||||
|
|
||||||
/** 用户ID */
|
/** 用户ID */
|
||||||
// @TableId(type = IdType.ASSIGN_ID)
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
private Long userId;
|
private Long userId;
|
||||||
|
|
||||||
/** 部门ID */
|
/** 部门ID */
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package com.openhis.administration.domain;
|
package com.openhis.administration.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -19,6 +21,7 @@ import lombok.experimental.Accessors;
|
|||||||
public class BizUserRole {
|
public class BizUserRole {
|
||||||
|
|
||||||
/** 用户ID */
|
/** 用户ID */
|
||||||
|
@TableId(type = IdType.INPUT)
|
||||||
private Long userId;
|
private Long userId;
|
||||||
|
|
||||||
/** 角色ID */
|
/** 角色ID */
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
|||||||
|
|
||||||
import com.core.common.core.domain.HisBaseEntity;
|
import com.core.common.core.domain.HisBaseEntity;
|
||||||
import com.openhis.common.enums.InvoiceStatus;
|
import com.openhis.common.enums.InvoiceStatus;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
@@ -25,58 +26,100 @@ import lombok.experimental.Accessors;
|
|||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
public class Invoice extends HisBaseEntity {
|
public class Invoice extends HisBaseEntity {
|
||||||
|
|
||||||
/** ID */
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
@TableId(type = IdType.ASSIGN_ID)
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/** 患者ID */
|
/**
|
||||||
|
* 患者ID
|
||||||
|
*/
|
||||||
private Long patientId;
|
private Long patientId;
|
||||||
|
|
||||||
/** 付款ID */
|
/**
|
||||||
|
* 付款ID
|
||||||
|
*/
|
||||||
private Long reconciliationId;
|
private Long reconciliationId;
|
||||||
|
|
||||||
/** 状态 */
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
private InvoiceStatus statusEnum;
|
private InvoiceStatus statusEnum;
|
||||||
|
|
||||||
/** 类别 */
|
/**
|
||||||
|
* 类别
|
||||||
|
*/
|
||||||
private String typeCode;
|
private String typeCode;
|
||||||
|
|
||||||
/** 取消原因 */
|
/**
|
||||||
|
* 取消原因
|
||||||
|
*/
|
||||||
private String cancelledReason;
|
private String cancelledReason;
|
||||||
|
|
||||||
/** 收费项 */
|
/**
|
||||||
|
* 收费项
|
||||||
|
*/
|
||||||
private String chargeItemIds;
|
private String chargeItemIds;
|
||||||
|
|
||||||
/** 发票净额总记 */
|
/**
|
||||||
|
* 发票净额总记
|
||||||
|
*/
|
||||||
private BigDecimal totalNet;
|
private BigDecimal totalNet;
|
||||||
|
|
||||||
/** 发票总计金额 */
|
/**
|
||||||
|
* 发票总计金额
|
||||||
|
*/
|
||||||
private BigDecimal totalGross;
|
private BigDecimal totalGross;
|
||||||
|
|
||||||
/** 付款详情 */
|
/**
|
||||||
|
* 付款详情
|
||||||
|
*/
|
||||||
private String paymentTerms;
|
private String paymentTerms;
|
||||||
|
|
||||||
/** 发票编号 */
|
/**
|
||||||
|
* 发票编号
|
||||||
|
*/
|
||||||
private String busNo;
|
private String busNo;
|
||||||
|
|
||||||
/** 开票员 */
|
/**
|
||||||
|
* 开票员
|
||||||
|
*/
|
||||||
private Long invoicingStaffId;
|
private Long invoicingStaffId;
|
||||||
/** 电子票据代码 */
|
/**
|
||||||
|
* 电子票据代码
|
||||||
|
*/
|
||||||
private String billBatchCode;
|
private String billBatchCode;
|
||||||
/** 电子票据号码 */
|
/**
|
||||||
|
* 电子票据号码
|
||||||
|
*/
|
||||||
private String billNo;
|
private String billNo;
|
||||||
/** 电子校验码 */
|
/**
|
||||||
|
* 电子校验码
|
||||||
|
*/
|
||||||
private String random;
|
private String random;
|
||||||
/** 电子票据生成时间 */
|
/**
|
||||||
|
* 电子票据生成时间
|
||||||
|
*/
|
||||||
private String billCreateTime;
|
private String billCreateTime;
|
||||||
/** 电子票据二维码图片数据 */
|
/**
|
||||||
|
* 电子票据二维码图片数据
|
||||||
|
*/
|
||||||
private String billQrCode;
|
private String billQrCode;
|
||||||
/** 电子票据H5页面URL */
|
/**
|
||||||
|
* 电子票据H5页面URL
|
||||||
|
*/
|
||||||
private String pictureUrl;
|
private String pictureUrl;
|
||||||
/** 电子票据外网H5页面URL */
|
/**
|
||||||
|
* 电子票据外网H5页面URL
|
||||||
|
*/
|
||||||
private String pictureNetUrl;
|
private String pictureNetUrl;
|
||||||
/** 微信插卡URL */
|
/**
|
||||||
|
* 微信插卡URL
|
||||||
|
*/
|
||||||
private String wxCardUrl;
|
private String wxCardUrl;
|
||||||
/** 票据营业日期 */
|
/**
|
||||||
|
* 票据营业日期
|
||||||
|
*/
|
||||||
private Date billBusDate;
|
private Date billBusDate;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,15 +1,10 @@
|
|||||||
package com.openhis.administration.domain;
|
package com.openhis.administration.domain;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
|
||||||
import com.core.common.core.domain.HisBaseEntity;
|
import com.core.common.core.domain.HisBaseEntity;
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import lombok.experimental.Accessors;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发票段管理Entity实体
|
* 发票段管理Entity实体
|
||||||
@@ -17,43 +12,217 @@ import lombok.experimental.Accessors;
|
|||||||
* @author system
|
* @author system
|
||||||
* @date 2025-11-18
|
* @date 2025-11-18
|
||||||
*/
|
*/
|
||||||
@Data
|
|
||||||
@TableName("adm_invoice_segment")
|
@TableName("adm_invoice_segment")
|
||||||
@Accessors(chain = true)
|
|
||||||
@EqualsAndHashCode(callSuper = false)
|
|
||||||
public class InvoiceSegment extends HisBaseEntity {
|
public class InvoiceSegment extends HisBaseEntity {
|
||||||
|
|
||||||
/** ID */
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
@TableId(type = IdType.ASSIGN_ID)
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/** 段ID */
|
/**
|
||||||
|
* 段ID
|
||||||
|
*/
|
||||||
private Long segmentId;
|
private Long segmentId;
|
||||||
|
|
||||||
/** 开始号码 */
|
/**
|
||||||
|
* 开始号码
|
||||||
|
*/
|
||||||
private String beginNumber;
|
private String beginNumber;
|
||||||
|
|
||||||
/** 结束号码 */
|
/**
|
||||||
|
* 结束号码
|
||||||
|
*/
|
||||||
private String endNumber;
|
private String endNumber;
|
||||||
|
|
||||||
/** 员工ID */
|
/**
|
||||||
|
* 员工ID
|
||||||
|
*/
|
||||||
private Long employeeId;
|
private Long employeeId;
|
||||||
|
|
||||||
/** 员工姓名 */
|
/**
|
||||||
|
* 员工姓名
|
||||||
|
*/
|
||||||
private String employeeName;
|
private String employeeName;
|
||||||
|
|
||||||
/** 开票员ID */
|
/**
|
||||||
|
* 开票员ID
|
||||||
|
*/
|
||||||
private Long invoicingStaffId;
|
private Long invoicingStaffId;
|
||||||
|
|
||||||
/** 开票员姓名 */
|
/**
|
||||||
|
* 开票员姓名
|
||||||
|
*/
|
||||||
private String invoicingStaffName;
|
private String invoicingStaffName;
|
||||||
|
|
||||||
/** 创建日期 */
|
/**
|
||||||
|
* 创建日期
|
||||||
|
*/
|
||||||
private Date createDate;
|
private Date createDate;
|
||||||
|
|
||||||
/** 状态 */
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
/** 备注 */
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
private String remark;
|
private String remark;
|
||||||
}
|
|
||||||
|
// ===== 标准getter/setter方法 =====
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getSegmentId() {
|
||||||
|
return segmentId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSegmentId(Long segmentId) {
|
||||||
|
this.segmentId = segmentId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBeginNumber() {
|
||||||
|
return beginNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBeginNumber(String beginNumber) {
|
||||||
|
this.beginNumber = beginNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEndNumber() {
|
||||||
|
return endNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEndNumber(String endNumber) {
|
||||||
|
this.endNumber = endNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getEmployeeId() {
|
||||||
|
return employeeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEmployeeId(Long employeeId) {
|
||||||
|
this.employeeId = employeeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEmployeeName() {
|
||||||
|
return employeeName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEmployeeName(String employeeName) {
|
||||||
|
this.employeeName = employeeName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getInvoicingStaffId() {
|
||||||
|
return invoicingStaffId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInvoicingStaffId(Long invoicingStaffId) {
|
||||||
|
this.invoicingStaffId = invoicingStaffId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getInvoicingStaffName() {
|
||||||
|
return invoicingStaffName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInvoicingStaffName(String invoicingStaffName) {
|
||||||
|
this.invoicingStaffName = invoicingStaffName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getCreateDate() {
|
||||||
|
return createDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateDate(Date createDate) {
|
||||||
|
this.createDate = createDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(String status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRemark() {
|
||||||
|
return remark;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRemark(String remark) {
|
||||||
|
this.remark = remark;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ===== 业务验证方法 =====
|
||||||
|
/**
|
||||||
|
* 验证发票段数据完整性
|
||||||
|
*
|
||||||
|
* @return 验证结果,true表示通过
|
||||||
|
*/
|
||||||
|
public boolean isValidInvoiceSegment() {
|
||||||
|
return id != null
|
||||||
|
&& segmentId != null
|
||||||
|
&& beginNumber != null && !beginNumber.trim().isEmpty()
|
||||||
|
&& endNumber != null && !endNumber.trim().isEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检查号码范围是否有效
|
||||||
|
*
|
||||||
|
* @return true如果开始号码不大于结束号码
|
||||||
|
*/
|
||||||
|
public boolean isNumberRangeValid() {
|
||||||
|
if (beginNumber == null || endNumber == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
long begin = Long.parseLong(beginNumber.trim());
|
||||||
|
long end = Long.parseLong(endNumber.trim());
|
||||||
|
return begin <= end;
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ===== 重写equals和hashCode方法 =====
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object obj) {
|
||||||
|
if (this == obj) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (obj == null || getClass() != obj.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
InvoiceSegment that = (InvoiceSegment) obj;
|
||||||
|
|
||||||
|
return id != null ? id.equals(that.id) : that.id == null
|
||||||
|
&& segmentId != null ? segmentId.equals(that.segmentId) : that.segmentId == null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
int result = id != null ? id.hashCode() : 0;
|
||||||
|
result = 31 * result + (segmentId != null ? segmentId.hashCode() : 0);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "InvoiceSegment{"
|
||||||
|
+ "id=" + id
|
||||||
|
+ ", segmentId=" + segmentId
|
||||||
|
+ ", beginNumber='" + beginNumber + '\''
|
||||||
|
+ ", endNumber='" + endNumber + '\''
|
||||||
|
+ ", employeeName='" + employeeName + '\''
|
||||||
|
+ ", status='" + status + '\''
|
||||||
|
+ '}';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package com.openhis.administration.service.impl;
|
package com.openhis.administration.service.impl;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user