liding
20 小时以前 1e8ccfec6ebcf7787def13165d9932b0cccefc49
1.文件上传格式调整 2.表格调整
已修改15个文件
186 ■■■■■ 文件已修改
basic-server/src/main/resources/db/migration/postgresql/V20250603102701__create_table_coal_info.sql 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
basic-server/src/main/resources/db/migration/postgresql/V20250606163300__create_table_coal_field.sql 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
basic-server/src/main/resources/db/migration/postgresql/V20250606170900__create_table_coal_plan.sql 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
basic-server/src/main/resources/db/migration/postgresql/V20250606171000__create_table_coal_value.sql 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
main-business/src/main/resources/db/migration/postgresql/V20250604101800__create_table_production.sql 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
main-business/src/main/resources/db/migration/postgresql/V20250604104500__create_table_pending_inventory.sql 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
main-business/src/main/resources/db/migration/postgresql/V20250604111200__create_table_official_inventory.sql 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
main-business/src/main/resources/db/migration/postgresql/V20250610161312__create_table_tree.sql 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
main-business/src/main/resources/db/migration/postgresql/V20250610161313__create_table_archive.sql 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
main-business/src/main/resources/db/migration/postgresql/V20250613093400__create_table_production_master.sql 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
main-business/src/main/resources/db/migration/postgresql/V20250613112800__create_table_production_inventory.sql 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-common/src/main/java/com/ruoyi/basic/service/impl/StorageBlobServiceImpl.java 66 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUploadUtils.java 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-common/src/main/java/com/ruoyi/common/utils/file/MimeTypeUtils.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
basic-server/src/main/resources/db/migration/postgresql/V20250603102701__create_table_coal_info.sql
@@ -6,7 +6,6 @@
    maintainer_id    int4         NOT NULL    DEFAULT 0,                 -- 维护人,不允许为空
    maintenance_date DATE         NOT NULL,                              -- 维护日期,不允许为空
    -- 新增字段
    deleted          int4         NOT NULL    DEFAULT 0,                 -- 是否删除(软删除标志)
    create_by        VARCHAR(255),                                       -- 创建人
    create_time      TIMESTAMP WITHOUT TIME ZONE, -- 创建时间,默认当前时间
basic-server/src/main/resources/db/migration/postgresql/V20250606163300__create_table_coal_field.sql
@@ -2,7 +2,6 @@
CREATE TABLE coal_field
(
    id                BIGSERIAL PRIMARY KEY,                              -- 主键ID,自动递增
    fields            VARCHAR(255) NOT NULL,                              --煤质字段
    field_name        VARCHAR(255) NOT NULL,                              -- 煤质描述
    field_description VARCHAR(255) NOT NULL,                              -- 煤质描述
basic-server/src/main/resources/db/migration/postgresql/V20250606170900__create_table_coal_plan.sql
@@ -2,10 +2,10 @@
CREATE TABLE coal_plan
(
    id          BIGSERIAL PRIMARY KEY,                              -- 主键ID,自动递增
    plan        VARCHAR(255) NOT NULL,                              --煤质方案
    field_ids        VARCHAR(255) NOT NULL,                              --煤质方案字段id
    coal_fields BIGINT       NOT NULL,                              -- 煤质方案字段
    scheme_desc VARCHAR(255),                    -- 字段描述
    deleted     INT          NOT NULL    DEFAULT 0,                 -- 软删除标志:0=未删除,1=已删除
    create_by   VARCHAR(255),                                       -- 创建人用户名
@@ -22,6 +22,7 @@
COMMENT ON COLUMN coal_plan.plan IS '煤质方案';
COMMENT ON COLUMN coal_plan.coal_fields IS '煤质方案字段';
COMMENT ON COLUMN coal_plan.field_ids IS '煤质方案字段id';
COMMENT ON COLUMN coal_plan.scheme_desc IS '字段描述';
COMMENT ON COLUMN coal_plan.deleted IS '软删除标志,0=未删除,1=已删除';
COMMENT ON COLUMN coal_plan.create_by IS '创建该记录的用户';
COMMENT ON COLUMN coal_plan.create_time IS '记录创建时间';
basic-server/src/main/resources/db/migration/postgresql/V20250606171000__create_table_coal_value.sql
@@ -2,7 +2,6 @@
CREATE TABLE coal_value
(
    id          BIGSERIAL PRIMARY KEY,           -- 主键ID,自动递增
    plan_id     VARCHAR(255) NOT NULL,           --关联煤质方案主键ID
    coal_value  VARCHAR(255) NOT NULL,           -- 字段值
    fields      VARCHAR(255) NOT NULL,           -- 字段
main-business/src/main/resources/db/migration/postgresql/V20250604101800__create_table_production.sql
@@ -4,7 +4,6 @@
    id                      BIGSERIAL PRIMARY KEY,             -- 主键ID
    production_master_id    BIGINT         NOT NULL DEFAULT 0, -- 生产主表ID
    coal_id                 BIGINT         NOT NULL DEFAULT 0, -- 煤种ID
    coal                    VARCHAR(50)    NOT NULL,           -- 煤种
    production_quantity     INT            NOT NULL,           -- 生产数量
    labor_cost              DECIMAL(10, 2) NOT NULL,           -- 人工成本
    energy_consumption_cost DECIMAL(10, 2) NOT NULL,           -- 能耗成本
@@ -28,7 +27,6 @@
-- 添加字段注释
COMMENT ON COLUMN production.id IS '主键ID';
COMMENT ON COLUMN production.coal_id IS '煤种ID';
COMMENT ON COLUMN production.coal IS '煤种';
COMMENT ON COLUMN production.production_quantity IS '生产数量';
COMMENT ON COLUMN production.labor_cost IS '人工成本';
COMMENT ON COLUMN production.energy_consumption_cost IS '能耗成本';
main-business/src/main/resources/db/migration/postgresql/V20250604104500__create_table_pending_inventory.sql
@@ -5,23 +5,29 @@
    supplier_name             VARCHAR(255)   NOT NULL,                           -- 供货商名称
    coal                      VARCHAR(50)    NOT NULL,                           -- 煤种
    unit                      VARCHAR(50)    NOT NULL,                           -- 单位
    inventory_quantity        DECIMAL(10, 2) NOT NULL,                           -- 库存数量
    price_including_tax       DECIMAL(10, 2) NOT NULL,                           -- 单价(含税)
    total_price_including_tax DECIMAL(10, 2) NOT NULL,                           -- 总价(含税)
    registrant                VARCHAR(50)    NOT NULL,                           -- 登记人
    registration_time         TIMESTAMP      NOT NULL DEFAULT CURRENT_TIMESTAMP, -- 登记时间
    inventory_quantity         NUMERIC(10,2)              NOT NULL,              -- 库存数量
    price_including_tax        NUMERIC(10,2)              NOT NULL,              -- 单价(含税)
    total_price_including_tax  NUMERIC(10,2)              NOT NULL,              -- 总价(含税)
    registrant                 VARCHAR(50),                                      -- 登记人
    registration_time          TIMESTAMP(6) DEFAULT CURRENT_TIMESTAMP,          -- 登记时间
    price_excluding_tax        VARCHAR(255),                                     -- 单价(不含税)
    total_price_excluding_tax  VARCHAR(255),                                     -- 总价(不含税)
    registrant_id              VARCHAR(32),                                      -- 登记人ID
    registration_date          DATE,                                             -- 登记日期
    supplier_id                BIGINT,                                           -- 供货商ID
    coal_id                    BIGINT,                                            -- 煤种ID
    deleted                   INT            NOT NULL DEFAULT 0,                 -- 软删除标志:0=未删除,1=已删除
    create_by                 VARCHAR(255),                                      -- 创建人用户名
    create_time               TIMESTAMP WITHOUT TIME ZONE,                       -- 创建时间,默认当前时间
    update_by                 VARCHAR(255),                                      -- 最后更新人用户名
    update_time               TIMESTAMP WITHOUT TIME ZONE                        -- 最后更新时间,默认当前时间
    deleted                    INTEGER         DEFAULT 0,                        -- 软删除标志,0=未删除,1=已删除
    create_by                  VARCHAR(255),                                     -- 创建该记录的用户
    create_time                TIMESTAMP(6),                                     -- 记录创建时间
    update_by                  VARCHAR(255),                                     -- 最后修改该记录的用户
    update_time                TIMESTAMP(6)                                     -- 记录最后更新时间
);
-- 添加表注释
COMMENT ON TABLE pending_inventory IS '待入库表';
-- 添加字段注释
-- 字段注释
COMMENT ON COLUMN pending_inventory.id IS '主键ID';
COMMENT ON COLUMN pending_inventory.supplier_name IS '供货商名称';
COMMENT ON COLUMN pending_inventory.coal IS '煤种';
@@ -31,9 +37,16 @@
COMMENT ON COLUMN pending_inventory.total_price_including_tax IS '总价(含税)';
COMMENT ON COLUMN pending_inventory.registrant IS '登记人';
COMMENT ON COLUMN pending_inventory.registration_time IS '登记时间';
COMMENT ON COLUMN pending_inventory.price_excluding_tax IS '单价(不含税)';
COMMENT ON COLUMN pending_inventory.total_price_excluding_tax IS '总价(不含税)';
COMMENT ON COLUMN pending_inventory.registrant_id IS '登记人ID';
COMMENT ON COLUMN pending_inventory.registration_date IS '登记日期';
COMMENT ON COLUMN pending_inventory.supplier_id IS '供货商ID';
COMMENT ON COLUMN pending_inventory.coal_id IS '煤种ID';
COMMENT ON COLUMN pending_inventory.deleted IS '软删除标志,0=未删除,1=已删除';
COMMENT ON COLUMN pending_inventory.create_by IS '创建该记录的用户';
COMMENT ON COLUMN pending_inventory.create_time IS '记录创建时间';
COMMENT ON COLUMN pending_inventory.update_by IS '最后修改该记录的用户';
COMMENT ON COLUMN pending_inventory.update_time IS '记录最后更新时间';
main-business/src/main/resources/db/migration/postgresql/V20250604111200__create_table_official_inventory.sql
@@ -14,6 +14,7 @@
    registrant_id             VARCHAR(50)    NOT NULL,           -- 登记人id
    type             VARCHAR(50)    NOT NULL,           -- 登记人id
    pending_id                BIGINT,                            -- 待入库id
    merge_id                BIGINT,                            -- 合并id
    registration_date         TIMESTAMP WITHOUT TIME ZONE,
    deleted                   INT            NOT NULL DEFAULT 0, -- 软删除标志:0=未删除,1=已删除
@@ -37,6 +38,7 @@
COMMENT ON COLUMN official_inventory.pending_replenishment IS '待补库';
COMMENT ON COLUMN official_inventory.registrant_id IS '登记人id';
COMMENT ON COLUMN official_inventory.registration_date IS '登记日期';
COMMENT ON COLUMN official_inventory.merge_id IS '合并id';
COMMENT ON COLUMN official_inventory.deleted IS '软删除标志,0=未删除,1=已删除';
COMMENT ON COLUMN official_inventory.create_by IS '创建该记录的用户';
main-business/src/main/resources/db/migration/postgresql/V20250610161312__create_table_tree.sql
@@ -2,7 +2,6 @@
CREATE TABLE tree
(
    id          BIGSERIAL PRIMARY KEY,                              -- 主键ID,自动递增
    name        VARCHAR(255) NOT NULL,                              -- 名称
    parent_id   BIGINT,                                             -- 父id
main-business/src/main/resources/db/migration/postgresql/V20250610161313__create_table_archive.sql
@@ -1,21 +1,20 @@
-- 创建档案表
CREATE TABLE archive
(
    id          BIGSERIAL PRIMARY KEY,                              -- 主键ID,自动递增
    id          BIGSERIAL PRIMARY KEY,                                 -- 主键ID
    name        VARCHAR(255) NOT NULL,                              -- 档案名称
    type        VARCHAR(255) NOT NULL,                              -- 档案类型(如:合同、报告、证件等)
    status      VARCHAR(50)  NOT NULL,                              -- 状态(如:有效、过期、作废)
    type        VARCHAR(255)                          NOT NULL,        -- 档案类型,例如:合同、报告、证件等
    status      VARCHAR(50)                           NOT NULL,        -- 档案状态,例如:有效、过期、作废
    deleted     INT          NOT NULL    DEFAULT 0,                 -- 软删除标志:0=未删除,1=已删除
    create_by   VARCHAR(255),                                       -- 创建人用户名
    create_time TIMESTAMP WITHOUT TIME ZONE, -- 创建时间,默认当前时间
    update_by   VARCHAR(255),                                       -- 最后更新人用户名
    update_time TIMESTAMP WITHOUT TIME ZONE  -- 最后更新时间,默认当前时间-- 登记日期
    deleted     INTEGER                     DEFAULT 0 NOT NULL,        -- 软删除标志,0=未删除,1=已删除
    create_by   VARCHAR(255),                                          -- 创建该记录的用户
    create_time TIMESTAMP(6),                                          -- 记录创建时间,默认当前时间
    update_by   VARCHAR(255),                                          -- 最后修改该记录的用户
    update_time TIMESTAMP WITHOUT TIME ZONE DEFAULT CURRENT_TIMESTAMP, -- 最后更新时间,默认当前时间
    tree_id     BIGINT                                                 -- 树节点ID
);
-- 表注释
COMMENT ON TABLE archive IS '档案信息表,记录系统中各类档案的基本信息';
COMMENT ON TABLE archive IS '档案信息表';
-- 字段注释
COMMENT ON COLUMN archive.id IS '主键ID';
@@ -27,3 +26,4 @@
COMMENT ON COLUMN archive.create_time IS '记录创建时间';
COMMENT ON COLUMN archive.update_by IS '最后修改该记录的用户';
COMMENT ON COLUMN archive.update_time IS '记录最后更新时间';
COMMENT ON COLUMN archive.tree_id IS '树节点ID';
main-business/src/main/resources/db/migration/postgresql/V20250613093400__create_table_production_master.sql
@@ -2,7 +2,7 @@
CREATE TABLE production_master
(
    id                      BIGSERIAL PRIMARY KEY,             -- 主键ID
    coal                    VARCHAR(50)    NOT NULL,           -- 煤种
    coal_id                 BIGINT,                            -- 煤种ID
    production_quantity     INT            NOT NULL,           -- 生产数量
    labor_cost              DECIMAL(10, 2) NOT NULL,           -- 人工成本
    energy_consumption_cost DECIMAL(10, 2) NOT NULL,           -- 能耗成本
@@ -24,7 +24,7 @@
-- 添加字段注释
COMMENT ON COLUMN production_master.id IS '主键ID';
COMMENT ON COLUMN production_master.coal IS '煤种';
COMMENT ON COLUMN production_master.coal_id IS '煤种ID';
COMMENT ON COLUMN production_master.production_quantity IS '生产数量';
COMMENT ON COLUMN production_master.labor_cost IS '人工成本';
COMMENT ON COLUMN production_master.energy_consumption_cost IS '能耗成本';
main-business/src/main/resources/db/migration/postgresql/V20250613112800__create_table_production_inventory.sql
@@ -4,10 +4,9 @@
    id                   BIGSERIAL PRIMARY KEY,          -- 主键ID
    production_master_id BIGINT      NOT NULL DEFAULT 0, -- 生产主表ID
    coal_id              BIGINT      NOT NULL DEFAULT 0, -- 煤种ID
    coal                 VARCHAR(50) NOT NULL,           -- 煤种
    official_id              BIGINT      NOT NULL DEFAULT 0, -- 库存ID
    inventory_quantity   INT         NOT NULL,           -- 库存数量
    used_quantity        INT         NOT NULL,           -- 使用数量
    deleted              INT         NOT NULL DEFAULT 0, -- 软删除标志:0=未删除,1=已删除
    create_by            VARCHAR(255),                   -- 创建人用户名
@@ -23,7 +22,7 @@
COMMENT ON COLUMN production_inventory.id IS '主键ID';
COMMENT ON COLUMN production_inventory.production_master_id IS '生产主表ID';
COMMENT ON COLUMN production_inventory.coal_id IS '煤种ID';
COMMENT ON COLUMN production_inventory.coal IS '煤种';
COMMENT ON COLUMN production_inventory.official_id IS '库存ID';
COMMENT ON COLUMN production_inventory.inventory_quantity IS '库存数量';
COMMENT ON COLUMN production_inventory.used_quantity IS '使用数量';
ruoyi-common/src/main/java/com/ruoyi/basic/service/impl/StorageBlobServiceImpl.java
@@ -10,16 +10,19 @@
import com.ruoyi.basic.mapper.StorageBlobMapper;
import com.ruoyi.basic.service.StorageBlobService;
import com.ruoyi.common.core.domain.MinioResult;
import com.ruoyi.common.exception.base.BaseException;
import com.ruoyi.common.exception.file.InvalidExtensionException;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.file.MinioUtils;
import com.ruoyi.common.utils.uuid.IdUtils;
import lombok.RequiredArgsConstructor;
import org.apache.commons.io.FilenameUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
@@ -53,7 +56,59 @@
        List<StorageBlobDTO> storageBlobDTOs = new ArrayList<>();
        for (MultipartFile file : files) {
            try {
                validateFileExtension(file);
                MinioResult res = minioUtils.upload(bucketName, file, false);
                StorageBlobDTO dto = buildStorageBlobDTO(file, res, bucketName, type);
                storageBlobMapper.insert(dto);
                storageBlobDTOs.add(dto);
            } catch (InvalidExtensionException e) {
                throw new RuntimeException("不支持的文件类型:" + file.getOriginalFilename(), e);
            } catch (Exception e) {
                throw new RuntimeException("上传文件失败:" + file.getOriginalFilename(), e);
            }
        }
        return storageBlobDTOs;
    }
    private void validateFileExtension(MultipartFile file) throws InvalidExtensionException {
        String filename = file.getOriginalFilename();
        String extension = FilenameUtils.getExtension(filename).toLowerCase();
        List<String> allowedExtensions = Arrays.asList(
                // 图片
                "jpg", "jpeg", "png", "gif", "bmp", "webp", "tiff", "ico", "svg",
                // 文档
                "pdf", "doc", "docx", "xls", "xlsx", "ppt", "pptx", "txt", "rtf", "md", "csv", "odt",
                // 视频
                "mp4", "mov", "avi", "wmv", "flv", "mkv", "webm", "mpeg", "3gp","MOV",
                // 音频
                "mp3", "wav", "ogg", "aac", "flac", "m4a", "wma", "amr",
                // 压缩包
                "zip", "rar", "7z", "tar", "gz", "bz2", "xz",
                // 编程代码文件
                "java", "py", "js", "ts", "html", "css", "cpp", "c", "cs", "json", "xml", "sql", "yaml", "yml", "sh", "bat",
                // 安装程序 & 二进制
                "exe", "apk", "dmg", "msi", "bin", "iso",
                // 设计类
                "psd", "ai", "xd", "sketch", "fig"
        );
        if (!allowedExtensions.contains(extension)) {
            throw new BaseException("文件类型不被允许:" + extension);
        }
    }
    private StorageBlobDTO buildStorageBlobDTO(MultipartFile file, MinioResult res, String bucketName, Long type) {
                StorageBlobDTO dto = new StorageBlobDTO();
                dto.setContentType(file.getContentType());
                dto.setBucketFilename(res.getBucketFileName());
@@ -63,17 +118,12 @@
                dto.setBucketName(bucketName);
                dto.setUrl(minioUtils.getPreviewUrl(res.getBucketFileName(), bucketName, false));
                dto.setDownloadUrl(minioUtils.getDownloadUrl(res.getBucketFileName(), bucketName));
                if (type != null){
                    dto.setType(type);
                }
                // 插入数据库
                storageBlobMapper.insert(dto);
                storageBlobDTOs.add(dto);
            } catch (InvalidExtensionException e) {
                throw new RuntimeException("minio文件上传异常:" + e);
            }
        }
        return storageBlobDTOs;
        return dto;
    }
    @Override
ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUploadUtils.java
@@ -1,11 +1,5 @@
package com.ruoyi.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.ruoyi.common.config.RuoYiConfig;
import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.exception.file.FileNameLengthLimitExceededException;
@@ -14,6 +8,13 @@
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.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;
/**
 * 文件上传工具类
@@ -25,7 +26,7 @@
    /**
     * 默认大小 50M
     */
    public static final long DEFAULT_MAX_SIZE = 50 * 1024 * 1024L;
    public static final long DEFAULT_MAX_SIZE = 1000 * 1024 * 1024L;
    /**
     * 默认的文件名最大长度 100
ruoyi-common/src/main/java/com/ruoyi/common/utils/file/MimeTypeUtils.java
@@ -22,9 +22,9 @@
    public static final String[] FLASH_EXTENSION = { "swf", "flv" };
    public static final String[] MEDIA_EXTENSION = { "swf", "flv", "mp3", "wav", "wma", "wmv", "mid", "avi", "mpg",
            "asf", "rm", "rmvb" };
            "asf", "rm", "rmvb","mov","MOV" };
    public static final String[] VIDEO_EXTENSION = { "mp4", "avi", "rmvb" };
    public static final String[] VIDEO_EXTENSION = { "mp4", "avi", "rmvb","mov","MOV" };
    public static final String[] DEFAULT_ALLOWED_EXTENSION = {
            // 图片
@@ -34,7 +34,7 @@
            // 压缩文件
            "rar", "zip", "gz", "bz2",
            // 视频格式
            "mp4", "avi", "rmvb",
            "mp4", "avi", "rmvb","mov","MOV",
            // pdf
            "pdf" };
ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java
@@ -1,12 +1,5 @@
package com.ruoyi.framework.web.service;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.authentication.BadCredentialsException;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.Authentication;
import org.springframework.stereotype.Component;
import com.ruoyi.common.constant.CacheConstants;
import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.constant.UserConstants;
@@ -14,11 +7,7 @@
import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.exception.user.BlackListException;
import com.ruoyi.common.exception.user.CaptchaException;
import com.ruoyi.common.exception.user.CaptchaExpireException;
import com.ruoyi.common.exception.user.UserNotExistsException;
import com.ruoyi.common.exception.user.UserPasswordNotMatchException;
import com.ruoyi.common.exception.user.*;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.MessageUtils;
import com.ruoyi.common.utils.StringUtils;
@@ -28,6 +17,13 @@
import com.ruoyi.framework.security.context.AuthenticationContextHolder;
import com.ruoyi.system.service.ISysConfigService;
import com.ruoyi.system.service.ISysUserService;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.authentication.BadCredentialsException;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.Authentication;
import org.springframework.stereotype.Component;
/**
 * 登录校验方法