chore: top.charles7c.continew => top.continew
1.groupId 及基础包名调整,更短的包名,优化品牌形象 2.全局代码格式化
This commit is contained in:
parent
da3a4e0756
commit
08eeabc47d
@ -1,10 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
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"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>top.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-admin</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.common.config;
|
||||
package top.continew.admin.common.config;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.context.annotation.Configuration;
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.common.config.jackson;
|
||||
package top.continew.admin.common.config.jackson;
|
||||
|
||||
import cn.hutool.core.util.ClassUtil;
|
||||
import cn.hutool.core.util.ReflectUtil;
|
||||
@ -30,14 +30,16 @@ import java.lang.reflect.Field;
|
||||
/**
|
||||
* 通用枚举接口 IBaseEnum 反序列化器
|
||||
*
|
||||
* @see IBaseEnum
|
||||
* @author Charles7c
|
||||
* @see IBaseEnum
|
||||
* @since 2023/1/8 13:56
|
||||
*/
|
||||
@JacksonStdImpl
|
||||
public class BaseEnumDeserializer extends JsonDeserializer<IBaseEnum> {
|
||||
|
||||
/** 静态实例 */
|
||||
/**
|
||||
* 静态实例
|
||||
*/
|
||||
public static final BaseEnumDeserializer SERIALIZER_INSTANCE = new BaseEnumDeserializer();
|
||||
|
||||
@Override
|
@ -14,28 +14,29 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.common.config.jackson;
|
||||
|
||||
import java.io.IOException;
|
||||
package top.continew.admin.common.config.jackson;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonGenerator;
|
||||
import com.fasterxml.jackson.databind.JsonSerializer;
|
||||
import com.fasterxml.jackson.databind.SerializerProvider;
|
||||
import com.fasterxml.jackson.databind.annotation.JacksonStdImpl;
|
||||
|
||||
import top.continew.starter.data.mybatis.plus.base.IBaseEnum;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* 通用枚举接口 IBaseEnum 序列化器
|
||||
*
|
||||
* @see IBaseEnum
|
||||
* @author Charles7c
|
||||
* @see IBaseEnum
|
||||
* @since 2023/1/8 13:56
|
||||
*/
|
||||
@JacksonStdImpl
|
||||
public class BaseEnumSerializer extends JsonSerializer<IBaseEnum> {
|
||||
|
||||
/** 静态实例 */
|
||||
/**
|
||||
* 静态实例
|
||||
*/
|
||||
public static final BaseEnumSerializer SERIALIZER_INSTANCE = new BaseEnumSerializer();
|
||||
|
||||
@Override
|
@ -14,24 +14,21 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.common.config.jackson;
|
||||
package top.continew.admin.common.config.jackson;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.module.SimpleModule;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
|
||||
|
||||
import com.fasterxml.jackson.databind.*;
|
||||
import com.fasterxml.jackson.databind.module.SimpleModule;
|
||||
|
||||
import top.continew.starter.data.mybatis.plus.base.IBaseEnum;
|
||||
|
||||
/**
|
||||
* Jackson 配置
|
||||
*
|
||||
* @see IBaseEnum
|
||||
* @author Charles7c
|
||||
* @see IBaseEnum
|
||||
* @since 2022/12/11 13:23
|
||||
*/
|
||||
@Slf4j
|
@ -14,9 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.common.config.jackson;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
package top.continew.admin.common.config.jackson;
|
||||
|
||||
import com.fasterxml.jackson.databind.BeanDescription;
|
||||
import com.fasterxml.jackson.databind.DeserializationConfig;
|
||||
@ -24,6 +22,7 @@ import com.fasterxml.jackson.databind.JsonDeserializer;
|
||||
import com.fasterxml.jackson.databind.JsonMappingException;
|
||||
import com.fasterxml.jackson.databind.module.SimpleDeserializers;
|
||||
import com.fasterxml.jackson.databind.type.ClassKey;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* 反序列化器包装类(重写 Jackson 反序列化枚举方法,参阅:FasterXML/jackson-databind#2842)
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.common.config.mybatis;
|
||||
package top.continew.admin.common.config.mybatis;
|
||||
|
||||
import org.springframework.security.crypto.password.PasswordEncoder;
|
||||
import top.continew.starter.security.crypto.encryptor.IEncryptor;
|
@ -14,11 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.common.config.mybatis;
|
||||
package top.continew.admin.common.config.mybatis;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import top.charles7c.continew.admin.common.model.dto.LoginUser;
|
||||
import top.charles7c.continew.admin.common.util.helper.LoginHelper;
|
||||
import top.continew.admin.common.model.dto.LoginUser;
|
||||
import top.continew.admin.common.util.helper.LoginHelper;
|
||||
import top.continew.starter.data.mybatis.plus.datapermission.DataPermissionCurrentUser;
|
||||
import top.continew.starter.data.mybatis.plus.datapermission.DataPermissionFilter;
|
||||
import top.continew.starter.data.mybatis.plus.datapermission.DataScope;
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.common.config.mybatis;
|
||||
package top.continew.admin.common.config.mybatis;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@ -28,8 +28,7 @@ import java.util.List;
|
||||
/**
|
||||
* 数据权限 Mapper 基类
|
||||
*
|
||||
* @param <T>
|
||||
* 实体类
|
||||
* @param <T> 实体类
|
||||
* @author Charles7c
|
||||
* @since 2023/9/3 21:50
|
||||
*/
|
||||
@ -47,7 +46,7 @@ public interface DataPermissionMapper<T> extends BaseMapper<T> {
|
||||
|
||||
/**
|
||||
* 根据 entity 条件,查询全部记录(并翻页)
|
||||
*
|
||||
*
|
||||
* @param page 分页查询条件
|
||||
* @param queryWrapper 实体对象封装操作类(可以为 null)
|
||||
* @return 全部记录(并翻页)
|
@ -14,12 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.common.config.mybatis;
|
||||
package top.continew.admin.common.config.mybatis;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
|
||||
import org.apache.ibatis.reflection.MetaObject;
|
||||
import top.charles7c.continew.admin.common.util.helper.LoginHelper;
|
||||
import top.continew.admin.common.util.helper.LoginHelper;
|
||||
import top.continew.starter.core.exception.BusinessException;
|
||||
import top.continew.starter.extension.crud.model.entity.BaseDO;
|
||||
|
||||
@ -33,13 +33,21 @@ import java.time.LocalDateTime;
|
||||
*/
|
||||
public class MyBatisPlusMetaObjectHandler implements MetaObjectHandler {
|
||||
|
||||
/** 创建人 */
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private static final String CREATE_USER = "createUser";
|
||||
/** 创建时间 */
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private static final String CREATE_TIME = "createTime";
|
||||
/** 修改人 */
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
private static final String UPDATE_USER = "updateUser";
|
||||
/** 修改时间 */
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private static final String UPDATE_TIME = "updateTime";
|
||||
|
||||
/**
|
@ -14,13 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.common.config.mybatis;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
package top.continew.admin.common.config.mybatis;
|
||||
|
||||
import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.security.crypto.password.PasswordEncoder;
|
||||
import top.continew.starter.data.mybatis.plus.datapermission.DataPermissionFilter;
|
||||
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.common.config.properties;
|
||||
package top.continew.admin.common.config.properties;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.common.config.properties;
|
||||
package top.continew.admin.common.config.properties;
|
||||
|
||||
import cn.hutool.extra.spring.SpringUtil;
|
||||
|
||||
@ -27,7 +27,9 @@ import cn.hutool.extra.spring.SpringUtil;
|
||||
*/
|
||||
public class RsaProperties {
|
||||
|
||||
/** 私钥 */
|
||||
/**
|
||||
* 私钥
|
||||
*/
|
||||
public static final String PRIVATE_KEY;
|
||||
|
||||
static {
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.common.constant;
|
||||
package top.continew.admin.common.constant;
|
||||
|
||||
import top.continew.starter.core.constant.StringConstants;
|
||||
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.common.constant;
|
||||
package top.continew.admin.common.constant;
|
||||
|
||||
import top.continew.starter.extension.crud.constant.ContainerPool;
|
||||
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.common.constant;
|
||||
package top.continew.admin.common.constant;
|
||||
|
||||
/**
|
||||
* 正则相关常量
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.common.constant;
|
||||
package top.continew.admin.common.constant;
|
||||
|
||||
/**
|
||||
* 系统相关常量
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.common.constant;
|
||||
package top.continew.admin.common.constant;
|
||||
|
||||
/**
|
||||
* UI 相关常量
|
@ -14,11 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.common.enums;
|
||||
package top.continew.admin.common.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
import top.continew.starter.data.mybatis.plus.base.IBaseEnum;
|
||||
|
||||
/**
|
||||
@ -31,19 +30,29 @@ import top.continew.starter.data.mybatis.plus.base.IBaseEnum;
|
||||
@RequiredArgsConstructor
|
||||
public enum DataScopeEnum implements IBaseEnum<Integer> {
|
||||
|
||||
/** 全部数据权限 */
|
||||
/**
|
||||
* 全部数据权限
|
||||
*/
|
||||
ALL(1, "全部数据权限"),
|
||||
|
||||
/** 本部门及以下数据权限 */
|
||||
/**
|
||||
* 本部门及以下数据权限
|
||||
*/
|
||||
DEPT_AND_CHILD(2, "本部门及以下数据权限"),
|
||||
|
||||
/** 本部门数据权限 */
|
||||
/**
|
||||
* 本部门数据权限
|
||||
*/
|
||||
DEPT(3, "本部门数据权限"),
|
||||
|
||||
/** 仅本人数据权限 */
|
||||
/**
|
||||
* 仅本人数据权限
|
||||
*/
|
||||
SELF(4, "仅本人数据权限"),
|
||||
|
||||
/** 自定义数据权限 */
|
||||
/**
|
||||
* 自定义数据权限
|
||||
*/
|
||||
CUSTOM(5, "自定义数据权限"),;
|
||||
|
||||
private final Integer value;
|
@ -14,12 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.common.enums;
|
||||
package top.continew.admin.common.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
import top.charles7c.continew.admin.common.constant.UiConstants;
|
||||
import top.continew.admin.common.constant.UiConstants;
|
||||
import top.continew.starter.data.mybatis.plus.base.IBaseEnum;
|
||||
|
||||
/**
|
||||
@ -32,10 +31,14 @@ import top.continew.starter.data.mybatis.plus.base.IBaseEnum;
|
||||
@RequiredArgsConstructor
|
||||
public enum DisEnableStatusEnum implements IBaseEnum<Integer> {
|
||||
|
||||
/** 启用 */
|
||||
/**
|
||||
* 启用
|
||||
*/
|
||||
ENABLE(1, "启用", UiConstants.COLOR_SUCCESS),
|
||||
|
||||
/** 禁用 */
|
||||
/**
|
||||
* 禁用
|
||||
*/
|
||||
DISABLE(2, "禁用", UiConstants.COLOR_ERROR),;
|
||||
|
||||
private final Integer value;
|
@ -14,11 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.common.enums;
|
||||
package top.continew.admin.common.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
import top.continew.starter.data.mybatis.plus.base.IBaseEnum;
|
||||
|
||||
/**
|
||||
@ -31,13 +30,19 @@ import top.continew.starter.data.mybatis.plus.base.IBaseEnum;
|
||||
@RequiredArgsConstructor
|
||||
public enum GenderEnum implements IBaseEnum<Integer> {
|
||||
|
||||
/** 未知 */
|
||||
/**
|
||||
* 未知
|
||||
*/
|
||||
UNKNOWN(0, "未知"),
|
||||
|
||||
/** 男 */
|
||||
/**
|
||||
* 男
|
||||
*/
|
||||
MALE(1, "男"),
|
||||
|
||||
/** 女 */
|
||||
/**
|
||||
* 女
|
||||
*/
|
||||
FEMALE(2, "女"),;
|
||||
|
||||
private final Integer value;
|
@ -14,11 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.common.enums;
|
||||
package top.continew.admin.common.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
import top.continew.starter.data.mybatis.plus.base.IBaseEnum;
|
||||
|
||||
/**
|
||||
@ -31,13 +30,19 @@ import top.continew.starter.data.mybatis.plus.base.IBaseEnum;
|
||||
@RequiredArgsConstructor
|
||||
public enum MenuTypeEnum implements IBaseEnum<Integer> {
|
||||
|
||||
/** 目录 */
|
||||
/**
|
||||
* 目录
|
||||
*/
|
||||
DIR(1, "目录"),
|
||||
|
||||
/** 菜单 */
|
||||
/**
|
||||
* 菜单
|
||||
*/
|
||||
MENU(2, "菜单"),
|
||||
|
||||
/** 按钮 */
|
||||
/**
|
||||
* 按钮
|
||||
*/
|
||||
BUTTON(3, "按钮"),;
|
||||
|
||||
private final Integer value;
|
@ -14,12 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.common.enums;
|
||||
package top.continew.admin.common.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
import top.charles7c.continew.admin.common.constant.UiConstants;
|
||||
import top.continew.admin.common.constant.UiConstants;
|
||||
import top.continew.starter.data.mybatis.plus.base.IBaseEnum;
|
||||
|
||||
/**
|
||||
@ -32,7 +31,9 @@ import top.continew.starter.data.mybatis.plus.base.IBaseEnum;
|
||||
@RequiredArgsConstructor
|
||||
public enum MessageTypeEnum implements IBaseEnum<Integer> {
|
||||
|
||||
/** 系统消息 */
|
||||
/**
|
||||
* 系统消息
|
||||
*/
|
||||
SYSTEM(1, "系统消息", UiConstants.COLOR_PRIMARY),;
|
||||
|
||||
private final Integer value;
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.common.enums;
|
||||
package top.continew.admin.common.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@ -29,10 +29,14 @@ import lombok.RequiredArgsConstructor;
|
||||
@RequiredArgsConstructor
|
||||
public enum SocialSourceEnum {
|
||||
|
||||
/** 码云 */
|
||||
/**
|
||||
* 码云
|
||||
*/
|
||||
GITEE("码云"),
|
||||
|
||||
/** GitHub */
|
||||
/**
|
||||
* GitHub
|
||||
*/
|
||||
GITHUB("GitHub"),;
|
||||
|
||||
private final String description;
|
@ -14,12 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.common.enums;
|
||||
package top.continew.admin.common.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
import top.charles7c.continew.admin.common.constant.UiConstants;
|
||||
import top.continew.admin.common.constant.UiConstants;
|
||||
import top.continew.starter.data.mybatis.plus.base.IBaseEnum;
|
||||
|
||||
/**
|
||||
@ -32,10 +31,14 @@ import top.continew.starter.data.mybatis.plus.base.IBaseEnum;
|
||||
@RequiredArgsConstructor
|
||||
public enum SuccessFailureStatusEnum implements IBaseEnum<Integer> {
|
||||
|
||||
/** 成功 */
|
||||
/**
|
||||
* 成功
|
||||
*/
|
||||
SUCCESS(1, "成功", UiConstants.COLOR_SUCCESS),
|
||||
|
||||
/** 失败 */
|
||||
/**
|
||||
* 失败
|
||||
*/
|
||||
FAILURE(2, "失败", UiConstants.COLOR_ERROR),;
|
||||
|
||||
private final Integer value;
|
@ -14,19 +14,17 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.common.model.dto;
|
||||
package top.continew.admin.common.model.dto;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import lombok.Data;
|
||||
import top.continew.admin.common.constant.SysConstants;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Set;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
|
||||
import top.charles7c.continew.admin.common.constant.SysConstants;
|
||||
|
||||
/**
|
||||
* 登录用户信息
|
||||
*
|
@ -14,15 +14,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.common.model.dto;
|
||||
package top.continew.admin.common.model.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import top.continew.admin.common.enums.DataScopeEnum;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import top.charles7c.continew.admin.common.enums.DataScopeEnum;
|
||||
|
||||
/**
|
||||
* 角色信息
|
||||
*
|
@ -14,15 +14,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.common.model.resp;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
package top.continew.admin.common.model.resp;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 验证码信息
|
@ -14,17 +14,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.common.model.resp;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
package top.continew.admin.common.model.resp;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 键值对信息
|
@ -14,12 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.common.util;
|
||||
package top.continew.admin.common.util;
|
||||
|
||||
import cn.hutool.core.codec.Base64;
|
||||
import cn.hutool.crypto.SecureUtil;
|
||||
import cn.hutool.crypto.asymmetric.KeyType;
|
||||
import top.charles7c.continew.admin.common.config.properties.RsaProperties;
|
||||
import top.continew.admin.common.config.properties.RsaProperties;
|
||||
import top.continew.starter.core.util.validate.ValidationUtils;
|
||||
|
||||
/**
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.common.util.helper;
|
||||
package top.continew.admin.common.util.helper;
|
||||
|
||||
import cn.dev33.satoken.context.SaHolder;
|
||||
import cn.dev33.satoken.exception.NotLoginException;
|
||||
@ -24,8 +24,8 @@ import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.extra.servlet.JakartaServletUtil;
|
||||
import cn.hutool.extra.spring.SpringUtil;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import top.charles7c.continew.admin.common.constant.CacheConstants;
|
||||
import top.charles7c.continew.admin.common.model.dto.LoginUser;
|
||||
import top.continew.admin.common.constant.CacheConstants;
|
||||
import top.continew.admin.common.model.dto.LoginUser;
|
||||
import top.continew.starter.core.util.ExceptionUtils;
|
||||
import top.continew.starter.core.util.IpUtils;
|
||||
import top.continew.starter.extension.crud.service.CommonUserService;
|
@ -1,10 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
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"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>top.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-admin</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
@ -15,7 +15,7 @@
|
||||
<dependencies>
|
||||
<!-- 公共模块(存放公共工具类,公共配置等) -->
|
||||
<dependency>
|
||||
<groupId>top.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-admin-common</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.generator.config.properties;
|
||||
package top.continew.admin.generator.config.properties;
|
||||
|
||||
import cn.hutool.core.io.file.FileNameUtil;
|
||||
import cn.hutool.core.map.MapUtil;
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.generator.enums;
|
||||
package top.continew.admin.generator.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.generator.enums;
|
||||
package top.continew.admin.generator.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
@ -14,11 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.generator.mapper;
|
||||
package top.continew.admin.generator.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import top.charles7c.continew.admin.generator.model.entity.FieldConfigDO;
|
||||
import top.continew.admin.generator.model.entity.FieldConfigDO;
|
||||
import top.continew.starter.data.mybatis.plus.base.BaseMapper;
|
||||
|
||||
import java.util.List;
|
||||
@ -33,7 +33,7 @@ public interface FieldConfigMapper extends BaseMapper<FieldConfigDO> {
|
||||
|
||||
/**
|
||||
* 根据表名称查询
|
||||
*
|
||||
*
|
||||
* @param tableName 表名称
|
||||
* @return 字段配置信息
|
||||
*/
|
@ -14,9 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.generator.mapper;
|
||||
package top.continew.admin.generator.mapper;
|
||||
|
||||
import top.charles7c.continew.admin.generator.model.entity.GenConfigDO;
|
||||
import top.continew.admin.generator.model.entity.GenConfigDO;
|
||||
import top.continew.starter.data.mybatis.plus.base.BaseMapper;
|
||||
|
||||
/**
|
||||
@ -25,4 +25,5 @@ import top.continew.starter.data.mybatis.plus.base.BaseMapper;
|
||||
* @author Charles7c
|
||||
* @since 2023/4/12 23:56
|
||||
*/
|
||||
public interface GenConfigMapper extends BaseMapper<GenConfigDO> {}
|
||||
public interface GenConfigMapper extends BaseMapper<GenConfigDO> {
|
||||
}
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.generator.model.entity;
|
||||
package top.continew.admin.generator.model.entity;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
@ -28,8 +28,8 @@ import jakarta.validation.constraints.NotNull;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.NonNull;
|
||||
import top.charles7c.continew.admin.generator.enums.FormTypeEnum;
|
||||
import top.charles7c.continew.admin.generator.enums.QueryTypeEnum;
|
||||
import top.continew.admin.generator.enums.FormTypeEnum;
|
||||
import top.continew.admin.generator.enums.QueryTypeEnum;
|
||||
import top.continew.starter.core.constant.StringConstants;
|
||||
|
||||
import java.io.Serial;
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.generator.model.entity;
|
||||
package top.continew.admin.generator.model.entity;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
@ -28,7 +28,7 @@ import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
import top.charles7c.continew.admin.common.constant.RegexConstants;
|
||||
import top.continew.admin.common.constant.RegexConstants;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
@ -68,7 +68,7 @@ public class GenConfigDO implements Serializable {
|
||||
/**
|
||||
* 包名称
|
||||
*/
|
||||
@Schema(description = "包名称", example = "top.charles7c.continew.admin.system")
|
||||
@Schema(description = "包名称", example = "top.continew.admin.system")
|
||||
@NotBlank(message = "包名称不能为空")
|
||||
@Pattern(regexp = RegexConstants.PACKAGE_NAME, message = "包名称格式错误")
|
||||
@Length(max = 60, message = "包名称不能超过 {max} 个字符")
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.generator.model.query;
|
||||
package top.continew.admin.generator.model.query;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.generator.model.req;
|
||||
package top.continew.admin.generator.model.req;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
@ -29,8 +29,8 @@ import lombok.Data;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import top.charles7c.continew.admin.generator.model.entity.FieldConfigDO;
|
||||
import top.charles7c.continew.admin.generator.model.entity.GenConfigDO;
|
||||
import top.continew.admin.generator.model.entity.FieldConfigDO;
|
||||
import top.continew.admin.generator.model.entity.GenConfigDO;
|
||||
|
||||
/**
|
||||
* 代码生成配置信息
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.generator.model.resp;
|
||||
package top.continew.admin.generator.model.resp;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.generator.model.resp;
|
||||
package top.continew.admin.generator.model.resp;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
@ -14,16 +14,16 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.generator.service;
|
||||
package top.continew.admin.generator.service;
|
||||
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import top.charles7c.continew.admin.generator.model.entity.FieldConfigDO;
|
||||
import top.charles7c.continew.admin.generator.model.entity.GenConfigDO;
|
||||
import top.charles7c.continew.admin.generator.model.query.TableQuery;
|
||||
import top.charles7c.continew.admin.generator.model.req.GenConfigReq;
|
||||
import top.charles7c.continew.admin.generator.model.resp.GeneratePreviewResp;
|
||||
import top.charles7c.continew.admin.generator.model.resp.TableResp;
|
||||
import top.continew.admin.generator.model.entity.FieldConfigDO;
|
||||
import top.continew.admin.generator.model.entity.GenConfigDO;
|
||||
import top.continew.admin.generator.model.query.TableQuery;
|
||||
import top.continew.admin.generator.model.req.GenConfigReq;
|
||||
import top.continew.admin.generator.model.resp.GeneratePreviewResp;
|
||||
import top.continew.admin.generator.model.resp.TableResp;
|
||||
import top.continew.starter.extension.crud.model.query.PageQuery;
|
||||
import top.continew.starter.extension.crud.model.resp.PageResp;
|
||||
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.generator.service.impl;
|
||||
package top.continew.admin.generator.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
@ -33,18 +33,17 @@ import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import top.charles7c.continew.admin.generator.config.properties.GeneratorProperties;
|
||||
import top.charles7c.continew.admin.generator.config.properties.GeneratorProperties.TemplateConfig;
|
||||
import top.charles7c.continew.admin.generator.enums.QueryTypeEnum;
|
||||
import top.charles7c.continew.admin.generator.mapper.FieldConfigMapper;
|
||||
import top.charles7c.continew.admin.generator.mapper.GenConfigMapper;
|
||||
import top.charles7c.continew.admin.generator.model.entity.FieldConfigDO;
|
||||
import top.charles7c.continew.admin.generator.model.entity.GenConfigDO;
|
||||
import top.charles7c.continew.admin.generator.model.query.TableQuery;
|
||||
import top.charles7c.continew.admin.generator.model.req.GenConfigReq;
|
||||
import top.charles7c.continew.admin.generator.model.resp.GeneratePreviewResp;
|
||||
import top.charles7c.continew.admin.generator.model.resp.TableResp;
|
||||
import top.charles7c.continew.admin.generator.service.GeneratorService;
|
||||
import top.continew.admin.generator.config.properties.GeneratorProperties;
|
||||
import top.continew.admin.generator.enums.QueryTypeEnum;
|
||||
import top.continew.admin.generator.mapper.FieldConfigMapper;
|
||||
import top.continew.admin.generator.mapper.GenConfigMapper;
|
||||
import top.continew.admin.generator.model.entity.FieldConfigDO;
|
||||
import top.continew.admin.generator.model.entity.GenConfigDO;
|
||||
import top.continew.admin.generator.model.query.TableQuery;
|
||||
import top.continew.admin.generator.model.req.GenConfigReq;
|
||||
import top.continew.admin.generator.model.resp.GeneratePreviewResp;
|
||||
import top.continew.admin.generator.model.resp.TableResp;
|
||||
import top.continew.admin.generator.service.GeneratorService;
|
||||
import top.continew.starter.core.autoconfigure.project.ProjectProperties;
|
||||
import top.continew.starter.core.constant.StringConstants;
|
||||
import top.continew.starter.core.exception.BusinessException;
|
||||
@ -228,12 +227,12 @@ public class GeneratorServiceImpl implements GeneratorService {
|
||||
genConfigMap.put("apiName", StrUtil.lowerFirst(genConfig.getClassNamePrefix()));
|
||||
// 渲染代码
|
||||
String classNamePrefix = genConfig.getClassNamePrefix();
|
||||
Map<String, TemplateConfig> templateConfigMap = generatorProperties.getTemplateConfigs();
|
||||
for (Map.Entry<String, TemplateConfig> templateConfigEntry : templateConfigMap.entrySet()) {
|
||||
Map<String, GeneratorProperties.TemplateConfig> templateConfigMap = generatorProperties.getTemplateConfigs();
|
||||
for (Map.Entry<String, GeneratorProperties.TemplateConfig> templateConfigEntry : templateConfigMap.entrySet()) {
|
||||
this.pretreatment(genConfigMap, fieldConfigList, templateConfigEntry);
|
||||
String className = classNamePrefix + StrUtil.nullToEmpty(templateConfigEntry.getKey());
|
||||
genConfigMap.put("className", className);
|
||||
TemplateConfig templateConfig = templateConfigEntry.getValue();
|
||||
GeneratorProperties.TemplateConfig templateConfig = templateConfigEntry.getValue();
|
||||
boolean isBackend = templateConfig.isBackend();
|
||||
String extension = templateConfig.getExtension();
|
||||
GeneratePreviewResp generatePreview = new GeneratePreviewResp();
|
||||
@ -291,11 +290,11 @@ public class GeneratorServiceImpl implements GeneratorService {
|
||||
String moduleName = StrUtil.subSuf(packageName, StrUtil
|
||||
.lastIndexOfIgnoreCase(packageName, StringConstants.DOT) + 1);
|
||||
// 生成代码
|
||||
Map<String, TemplateConfig> templateConfigMap = generatorProperties.getTemplateConfigs();
|
||||
Map<String, GeneratorProperties.TemplateConfig> templateConfigMap = generatorProperties.getTemplateConfigs();
|
||||
for (GeneratePreviewResp generatePreview : generatePreviewList) {
|
||||
// 获取对应模板配置
|
||||
TemplateConfig templateConfig = templateConfigMap.getOrDefault(StrUtil.subBefore(generatePreview
|
||||
.getFileName(), StringConstants.DOT, true)
|
||||
GeneratorProperties.TemplateConfig templateConfig = templateConfigMap.getOrDefault(StrUtil
|
||||
.subBefore(generatePreview.getFileName(), StringConstants.DOT, true)
|
||||
.replace(genConfig.getClassNamePrefix(), StringConstants.EMPTY), templateConfigMap.get("api"));
|
||||
String packagePath;
|
||||
if (generatePreview.isBackend()) {
|
||||
@ -356,8 +355,8 @@ public class GeneratorServiceImpl implements GeneratorService {
|
||||
*/
|
||||
private void pretreatment(Map<String, Object> genConfigMap,
|
||||
List<FieldConfigDO> originFieldConfigList,
|
||||
Map.Entry<String, TemplateConfig> templateConfigEntry) {
|
||||
TemplateConfig templateConfig = templateConfigEntry.getValue();
|
||||
Map.Entry<String, GeneratorProperties.TemplateConfig> templateConfigEntry) {
|
||||
GeneratorProperties.TemplateConfig templateConfig = templateConfigEntry.getValue();
|
||||
// 移除需要忽略的字段
|
||||
List<FieldConfigDO> fieldConfigList = originFieldConfigList.stream()
|
||||
.filter(fieldConfig -> !StrUtil.equalsAny(fieldConfig.getFieldName(), templateConfig.getExcludeFields()))
|
@ -1,10 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
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"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>top.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-admin</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
@ -21,7 +21,7 @@
|
||||
|
||||
<!-- 公共模块(存放公共工具类,公共配置等) -->
|
||||
<dependency>
|
||||
<groupId>top.charles7c.continew</groupId>
|
||||
<groupId>top.continew</groupId>
|
||||
<artifactId>continew-admin-common</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.auth.config.satoken;
|
||||
package top.continew.admin.auth.config.satoken;
|
||||
|
||||
import cn.dev33.satoken.stp.StpInterface;
|
||||
import org.springframework.context.annotation.Bean;
|
@ -14,11 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.auth.config.satoken;
|
||||
package top.continew.admin.auth.config.satoken;
|
||||
|
||||
import cn.dev33.satoken.stp.StpInterface;
|
||||
import top.charles7c.continew.admin.common.model.dto.LoginUser;
|
||||
import top.charles7c.continew.admin.common.util.helper.LoginHelper;
|
||||
import top.continew.admin.common.model.dto.LoginUser;
|
||||
import top.continew.admin.common.util.helper.LoginHelper;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
@ -14,21 +14,18 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.auth.model.query;
|
||||
package top.continew.admin.auth.model.query;
|
||||
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
|
||||
/**
|
||||
* 在线用户查询条件
|
||||
*
|
@ -14,17 +14,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.auth.model.req;
|
||||
package top.continew.admin.auth.model.req;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
/**
|
||||
* 账号登录信息
|
||||
*
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.auth.model.req;
|
||||
package top.continew.admin.auth.model.req;
|
||||
|
||||
import cn.hutool.core.lang.RegexPool;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.auth.model.req;
|
||||
package top.continew.admin.auth.model.req;
|
||||
|
||||
import cn.hutool.core.lang.RegexPool;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
@ -14,15 +14,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.auth.model.resp;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
package top.continew.admin.auth.model.resp;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 令牌信息
|
@ -14,16 +14,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.auth.model.resp;
|
||||
package top.continew.admin.auth.model.resp;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
/**
|
||||
* 在线用户信息
|
||||
*
|
||||
@ -64,7 +63,7 @@ public class OnlineUserResp implements Serializable {
|
||||
/**
|
||||
* 登录 IP
|
||||
*/
|
||||
@Schema(description = "登录 IP", example = "192.168.0.1")
|
||||
@Schema(description = "登录 IP", example = "")
|
||||
private String ip;
|
||||
|
||||
/**
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.auth.model.resp;
|
||||
package top.continew.admin.auth.model.resp;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.auth.model.resp;
|
||||
package top.continew.admin.auth.model.resp;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Builder;
|
@ -14,12 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.auth.model.resp;
|
||||
package top.continew.admin.auth.model.resp;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import top.charles7c.continew.admin.common.enums.GenderEnum;
|
||||
import top.continew.admin.common.enums.GenderEnum;
|
||||
import top.continew.starter.security.mask.annotation.JsonMask;
|
||||
import top.continew.starter.security.mask.enums.MaskType;
|
||||
|
@ -14,13 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.auth.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import top.charles7c.continew.admin.auth.model.resp.RouteResp;
|
||||
package top.continew.admin.auth.service;
|
||||
|
||||
import me.zhyd.oauth.model.AuthUser;
|
||||
import top.continew.admin.auth.model.resp.RouteResp;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 登录业务接口
|
@ -14,16 +14,16 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.auth.service;
|
||||
package top.continew.admin.auth.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import top.charles7c.continew.admin.auth.model.query.OnlineUserQuery;
|
||||
import top.charles7c.continew.admin.auth.model.resp.OnlineUserResp;
|
||||
import top.charles7c.continew.admin.common.model.dto.LoginUser;
|
||||
import top.continew.admin.auth.model.query.OnlineUserQuery;
|
||||
import top.continew.admin.auth.model.resp.OnlineUserResp;
|
||||
import top.continew.admin.common.model.dto.LoginUser;
|
||||
import top.continew.starter.extension.crud.model.query.PageQuery;
|
||||
import top.continew.starter.extension.crud.model.resp.PageResp;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 在线用户业务接口
|
||||
*
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.auth.service;
|
||||
package top.continew.admin.auth.service;
|
||||
|
||||
import java.util.Set;
|
||||
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.auth.service.impl;
|
||||
package top.continew.admin.auth.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
@ -29,25 +29,25 @@ import lombok.RequiredArgsConstructor;
|
||||
import me.zhyd.oauth.model.AuthUser;
|
||||
import org.springframework.security.crypto.password.PasswordEncoder;
|
||||
import org.springframework.stereotype.Service;
|
||||
import top.charles7c.continew.admin.auth.model.resp.RouteResp;
|
||||
import top.charles7c.continew.admin.auth.service.LoginService;
|
||||
import top.charles7c.continew.admin.auth.service.PermissionService;
|
||||
import top.charles7c.continew.admin.common.constant.RegexConstants;
|
||||
import top.charles7c.continew.admin.common.constant.SysConstants;
|
||||
import top.charles7c.continew.admin.common.enums.DisEnableStatusEnum;
|
||||
import top.charles7c.continew.admin.common.enums.GenderEnum;
|
||||
import top.charles7c.continew.admin.common.enums.MenuTypeEnum;
|
||||
import top.charles7c.continew.admin.common.enums.MessageTypeEnum;
|
||||
import top.charles7c.continew.admin.common.model.dto.LoginUser;
|
||||
import top.charles7c.continew.admin.common.util.helper.LoginHelper;
|
||||
import top.charles7c.continew.admin.system.enums.MessageTemplateEnum;
|
||||
import top.charles7c.continew.admin.system.model.entity.DeptDO;
|
||||
import top.charles7c.continew.admin.system.model.entity.RoleDO;
|
||||
import top.charles7c.continew.admin.system.model.entity.UserDO;
|
||||
import top.charles7c.continew.admin.system.model.entity.UserSocialDO;
|
||||
import top.charles7c.continew.admin.system.model.req.MessageReq;
|
||||
import top.charles7c.continew.admin.system.model.resp.MenuResp;
|
||||
import top.charles7c.continew.admin.system.service.*;
|
||||
import top.continew.admin.auth.model.resp.RouteResp;
|
||||
import top.continew.admin.auth.service.LoginService;
|
||||
import top.continew.admin.auth.service.PermissionService;
|
||||
import top.continew.admin.common.constant.RegexConstants;
|
||||
import top.continew.admin.common.constant.SysConstants;
|
||||
import top.continew.admin.common.enums.DisEnableStatusEnum;
|
||||
import top.continew.admin.common.enums.GenderEnum;
|
||||
import top.continew.admin.common.enums.MenuTypeEnum;
|
||||
import top.continew.admin.common.enums.MessageTypeEnum;
|
||||
import top.continew.admin.common.model.dto.LoginUser;
|
||||
import top.continew.admin.common.util.helper.LoginHelper;
|
||||
import top.continew.admin.system.enums.MessageTemplateEnum;
|
||||
import top.continew.admin.system.model.entity.DeptDO;
|
||||
import top.continew.admin.system.model.entity.RoleDO;
|
||||
import top.continew.admin.system.model.entity.UserDO;
|
||||
import top.continew.admin.system.model.entity.UserSocialDO;
|
||||
import top.continew.admin.system.model.req.MessageReq;
|
||||
import top.continew.admin.system.model.resp.MenuResp;
|
||||
import top.continew.admin.system.service.*;
|
||||
import top.continew.starter.core.autoconfigure.project.ProjectProperties;
|
||||
import top.continew.starter.core.util.validate.CheckUtils;
|
||||
import top.continew.starter.extension.crud.annotation.TreeField;
|
||||
@ -207,7 +207,7 @@ public class LoginServiceImpl implements LoginService {
|
||||
|
||||
/**
|
||||
* 发送系统消息
|
||||
*
|
||||
*
|
||||
* @param user 用户信息
|
||||
*/
|
||||
private void sendSystemMsg(UserDO user) {
|
@ -14,14 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.auth.service.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
package top.continew.admin.auth.service.impl;
|
||||
|
||||
import cn.dev33.satoken.dao.SaTokenDao;
|
||||
import cn.dev33.satoken.exception.NotLoginException;
|
||||
@ -30,16 +23,21 @@ import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
|
||||
import top.charles7c.continew.admin.auth.model.query.OnlineUserQuery;
|
||||
import top.charles7c.continew.admin.auth.model.resp.OnlineUserResp;
|
||||
import top.charles7c.continew.admin.auth.service.OnlineUserService;
|
||||
import top.charles7c.continew.admin.common.model.dto.LoginUser;
|
||||
import top.charles7c.continew.admin.common.util.helper.LoginHelper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import top.continew.admin.auth.model.query.OnlineUserQuery;
|
||||
import top.continew.admin.auth.model.resp.OnlineUserResp;
|
||||
import top.continew.admin.auth.service.OnlineUserService;
|
||||
import top.continew.admin.common.model.dto.LoginUser;
|
||||
import top.continew.admin.common.util.helper.LoginHelper;
|
||||
import top.continew.starter.core.constant.StringConstants;
|
||||
import top.continew.starter.extension.crud.model.query.PageQuery;
|
||||
import top.continew.starter.extension.crud.model.resp.PageResp;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 在线用户业务实现
|
||||
*
|
@ -14,20 +14,17 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.auth.service.impl;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
package top.continew.admin.auth.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import top.continew.admin.auth.service.PermissionService;
|
||||
import top.continew.admin.common.constant.SysConstants;
|
||||
import top.continew.admin.system.service.MenuService;
|
||||
import top.continew.admin.system.service.RoleService;
|
||||
|
||||
import top.charles7c.continew.admin.auth.service.PermissionService;
|
||||
import top.charles7c.continew.admin.common.constant.SysConstants;
|
||||
import top.charles7c.continew.admin.system.service.MenuService;
|
||||
import top.charles7c.continew.admin.system.service.RoleService;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 权限业务实现
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.system.config.file;
|
||||
package top.continew.admin.system.config.file;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.EscapeUtil;
|
||||
@ -25,12 +25,12 @@ import org.dromara.x.file.storage.core.FileInfo;
|
||||
import org.dromara.x.file.storage.core.recorder.FileRecorder;
|
||||
import org.dromara.x.file.storage.core.upload.FilePartInfo;
|
||||
import org.springframework.stereotype.Component;
|
||||
import top.charles7c.continew.admin.common.util.helper.LoginHelper;
|
||||
import top.charles7c.continew.admin.system.enums.FileTypeEnum;
|
||||
import top.charles7c.continew.admin.system.mapper.FileMapper;
|
||||
import top.charles7c.continew.admin.system.mapper.StorageMapper;
|
||||
import top.charles7c.continew.admin.system.model.entity.FileDO;
|
||||
import top.charles7c.continew.admin.system.model.entity.StorageDO;
|
||||
import top.continew.admin.common.util.helper.LoginHelper;
|
||||
import top.continew.admin.system.enums.FileTypeEnum;
|
||||
import top.continew.admin.system.mapper.FileMapper;
|
||||
import top.continew.admin.system.mapper.StorageMapper;
|
||||
import top.continew.admin.system.model.entity.FileDO;
|
||||
import top.continew.admin.system.model.entity.StorageDO;
|
||||
import top.continew.starter.core.constant.StringConstants;
|
||||
|
||||
import java.util.Optional;
|
||||
@ -87,8 +87,7 @@ public class FileRecorderImpl implements FileRecorder {
|
||||
/**
|
||||
* 根据 URL 查询文件
|
||||
*
|
||||
* @param url
|
||||
* URL
|
||||
* @param url URL
|
||||
* @return 文件信息
|
||||
*/
|
||||
private FileDO getFileByUrl(String url) {
|
||||
@ -101,13 +100,16 @@ public class FileRecorderImpl implements FileRecorder {
|
||||
|
||||
@Override
|
||||
public void update(FileInfo fileInfo) {
|
||||
/* 不使用分片功能则无需重写 */ }
|
||||
/* 不使用分片功能则无需重写 */
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveFilePart(FilePartInfo filePartInfo) {
|
||||
/* 不使用分片功能则无需重写 */ }
|
||||
/* 不使用分片功能则无需重写 */
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteFilePartByUploadId(String s) {
|
||||
/* 不使用分片功能则无需重写 */}
|
||||
/* 不使用分片功能则无需重写 */
|
||||
}
|
||||
}
|
@ -14,25 +14,22 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.system.config.file;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.springframework.boot.ApplicationArguments;
|
||||
import org.springframework.boot.ApplicationRunner;
|
||||
import org.springframework.stereotype.Component;
|
||||
package top.continew.admin.system.config.file;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.boot.ApplicationArguments;
|
||||
import org.springframework.boot.ApplicationRunner;
|
||||
import org.springframework.stereotype.Component;
|
||||
import top.continew.admin.common.enums.DisEnableStatusEnum;
|
||||
import top.continew.admin.system.model.query.StorageQuery;
|
||||
import top.continew.admin.system.model.req.StorageReq;
|
||||
import top.continew.admin.system.model.resp.StorageResp;
|
||||
import top.continew.admin.system.service.StorageService;
|
||||
|
||||
import top.charles7c.continew.admin.common.enums.DisEnableStatusEnum;
|
||||
import top.charles7c.continew.admin.system.model.query.StorageQuery;
|
||||
import top.charles7c.continew.admin.system.model.req.StorageReq;
|
||||
import top.charles7c.continew.admin.system.model.resp.StorageResp;
|
||||
import top.charles7c.continew.admin.system.service.StorageService;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 文件存储配置加载器
|
@ -14,13 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.system.config.log;
|
||||
package top.continew.admin.system.config.log;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import top.charles7c.continew.admin.system.mapper.LogMapper;
|
||||
import top.charles7c.continew.admin.system.service.UserService;
|
||||
import top.continew.admin.system.mapper.LogMapper;
|
||||
import top.continew.admin.system.service.UserService;
|
||||
import top.continew.starter.log.core.dao.LogDao;
|
||||
import top.continew.starter.log.httptracepro.autoconfigure.ConditionalOnEnabledLog;
|
||||
import top.continew.starter.web.autoconfigure.trace.TraceProperties;
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.system.config.log;
|
||||
package top.continew.admin.system.config.log;
|
||||
|
||||
import cn.dev33.satoken.SaManager;
|
||||
import cn.dev33.satoken.stp.StpUtil;
|
||||
@ -27,12 +27,12 @@ import cn.hutool.json.JSONUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import top.charles7c.continew.admin.auth.model.req.AccountLoginReq;
|
||||
import top.charles7c.continew.admin.common.constant.SysConstants;
|
||||
import top.charles7c.continew.admin.system.enums.LogStatusEnum;
|
||||
import top.charles7c.continew.admin.system.mapper.LogMapper;
|
||||
import top.charles7c.continew.admin.system.model.entity.LogDO;
|
||||
import top.charles7c.continew.admin.system.service.UserService;
|
||||
import top.continew.admin.auth.model.req.AccountLoginReq;
|
||||
import top.continew.admin.common.constant.SysConstants;
|
||||
import top.continew.admin.system.enums.LogStatusEnum;
|
||||
import top.continew.admin.system.mapper.LogMapper;
|
||||
import top.continew.admin.system.model.entity.LogDO;
|
||||
import top.continew.admin.system.service.UserService;
|
||||
import top.continew.starter.core.constant.StringConstants;
|
||||
import top.continew.starter.core.util.ExceptionUtils;
|
||||
import top.continew.starter.log.core.dao.LogDao;
|
@ -14,12 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.system.enums;
|
||||
package top.continew.admin.system.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
import top.charles7c.continew.admin.common.constant.UiConstants;
|
||||
import top.continew.admin.common.constant.UiConstants;
|
||||
import top.continew.starter.data.mybatis.plus.base.IBaseEnum;
|
||||
|
||||
/**
|
||||
@ -32,13 +31,19 @@ import top.continew.starter.data.mybatis.plus.base.IBaseEnum;
|
||||
@RequiredArgsConstructor
|
||||
public enum AnnouncementStatusEnum implements IBaseEnum<Integer> {
|
||||
|
||||
/** 待发布 */
|
||||
/**
|
||||
* 待发布
|
||||
*/
|
||||
PENDING_RELEASE(1, "待发布", UiConstants.COLOR_PRIMARY),
|
||||
|
||||
/** 已发布 */
|
||||
/**
|
||||
* 已发布
|
||||
*/
|
||||
PUBLISHED(2, "已发布", UiConstants.COLOR_SUCCESS),
|
||||
|
||||
/** 已过期 */
|
||||
/**
|
||||
* 已过期
|
||||
*/
|
||||
EXPIRED(3, "已过期", UiConstants.COLOR_ERROR),;
|
||||
|
||||
private final Integer value;
|
@ -14,19 +14,17 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.system.enums;
|
||||
package top.continew.admin.system.enums;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import top.continew.starter.data.mybatis.plus.base.IBaseEnum;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
|
||||
import top.continew.starter.data.mybatis.plus.base.IBaseEnum;
|
||||
|
||||
/**
|
||||
* 文件类型枚举
|
||||
*
|
@ -14,11 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.system.enums;
|
||||
package top.continew.admin.system.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
import top.continew.starter.data.mybatis.plus.base.IBaseEnum;
|
||||
|
||||
/**
|
||||
@ -31,10 +30,14 @@ import top.continew.starter.data.mybatis.plus.base.IBaseEnum;
|
||||
@RequiredArgsConstructor
|
||||
public enum LogStatusEnum implements IBaseEnum<Integer> {
|
||||
|
||||
/** 成功 */
|
||||
/**
|
||||
* 成功
|
||||
*/
|
||||
SUCCESS(1, "成功"),
|
||||
|
||||
/** 失败 */
|
||||
/**
|
||||
* 失败
|
||||
*/
|
||||
FAILURE(2, "失败"),;
|
||||
|
||||
private final Integer value;
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.system.enums;
|
||||
package top.continew.admin.system.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
@ -14,11 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.system.enums;
|
||||
package top.continew.admin.system.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
import top.continew.starter.data.mybatis.plus.base.IBaseEnum;
|
||||
|
||||
/**
|
@ -14,14 +14,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.system.mapper;
|
||||
package top.continew.admin.system.mapper;
|
||||
|
||||
import top.continew.admin.system.model.entity.AnnouncementDO;
|
||||
import top.continew.admin.system.model.resp.DashboardAnnouncementResp;
|
||||
import top.continew.starter.data.mybatis.plus.base.BaseMapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import top.charles7c.continew.admin.system.model.entity.AnnouncementDO;
|
||||
import top.charles7c.continew.admin.system.model.resp.DashboardAnnouncementResp;
|
||||
import top.continew.starter.data.mybatis.plus.base.BaseMapper;
|
||||
|
||||
/**
|
||||
* 公告 Mapper
|
||||
*
|
@ -14,9 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.system.mapper;
|
||||
package top.continew.admin.system.mapper;
|
||||
|
||||
import top.charles7c.continew.admin.system.model.entity.DeptDO;
|
||||
import top.continew.admin.system.model.entity.DeptDO;
|
||||
import top.continew.starter.data.mybatis.plus.base.BaseMapper;
|
||||
|
||||
/**
|
||||
@ -25,4 +25,5 @@ import top.continew.starter.data.mybatis.plus.base.BaseMapper;
|
||||
* @author Charles7c
|
||||
* @since 2023/1/22 17:56
|
||||
*/
|
||||
public interface DeptMapper extends BaseMapper<DeptDO> {}
|
||||
public interface DeptMapper extends BaseMapper<DeptDO> {
|
||||
}
|
@ -14,11 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.system.mapper;
|
||||
package top.continew.admin.system.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import top.charles7c.continew.admin.common.model.resp.LabelValueResp;
|
||||
import top.charles7c.continew.admin.system.model.entity.DictItemDO;
|
||||
import top.continew.admin.common.model.resp.LabelValueResp;
|
||||
import top.continew.admin.system.model.entity.DictItemDO;
|
||||
import top.continew.starter.data.mybatis.plus.base.BaseMapper;
|
||||
|
||||
import java.io.Serializable;
|
||||
@ -34,7 +34,7 @@ public interface DictItemMapper extends BaseMapper<DictItemDO> {
|
||||
|
||||
/**
|
||||
* 根据字典编码查询
|
||||
*
|
||||
*
|
||||
* @param dictCode 字典编码
|
||||
* @return 字典项列表
|
||||
*/
|
@ -14,9 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.system.mapper;
|
||||
package top.continew.admin.system.mapper;
|
||||
|
||||
import top.charles7c.continew.admin.system.model.entity.DictDO;
|
||||
import top.continew.admin.system.model.entity.DictDO;
|
||||
import top.continew.starter.data.mybatis.plus.base.BaseMapper;
|
||||
|
||||
/**
|
||||
@ -25,4 +25,5 @@ import top.continew.starter.data.mybatis.plus.base.BaseMapper;
|
||||
* @author Charles7c
|
||||
* @since 2023/9/11 21:29
|
||||
*/
|
||||
public interface DictMapper extends BaseMapper<DictDO> {}
|
||||
public interface DictMapper extends BaseMapper<DictDO> {
|
||||
}
|
@ -14,9 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.system.mapper;
|
||||
package top.continew.admin.system.mapper;
|
||||
|
||||
import top.charles7c.continew.admin.system.model.entity.FileDO;
|
||||
import top.continew.admin.system.model.entity.FileDO;
|
||||
import top.continew.starter.data.mybatis.plus.base.BaseMapper;
|
||||
|
||||
/**
|
||||
@ -25,4 +25,5 @@ import top.continew.starter.data.mybatis.plus.base.BaseMapper;
|
||||
* @author Charles7c
|
||||
* @since 2023/12/23 10:38
|
||||
*/
|
||||
public interface FileMapper extends BaseMapper<FileDO> {}
|
||||
public interface FileMapper extends BaseMapper<FileDO> {
|
||||
}
|
@ -14,15 +14,17 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.system.mapper;
|
||||
package top.continew.admin.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import top.charles7c.continew.admin.system.model.entity.LogDO;
|
||||
import top.charles7c.continew.admin.system.model.resp.*;
|
||||
import top.charles7c.continew.admin.system.model.resp.log.LogResp;
|
||||
import top.continew.admin.system.model.entity.LogDO;
|
||||
import top.continew.admin.system.model.resp.DashboardAccessTrendResp;
|
||||
import top.continew.admin.system.model.resp.DashboardPopularModuleResp;
|
||||
import top.continew.admin.system.model.resp.DashboardTotalResp;
|
||||
import top.continew.admin.system.model.resp.log.LogResp;
|
||||
import top.continew.starter.data.mybatis.plus.base.BaseMapper;
|
||||
|
||||
import java.util.List;
|
@ -14,16 +14,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.system.mapper;
|
||||
package top.continew.admin.system.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import top.continew.admin.system.model.entity.MenuDO;
|
||||
import top.continew.starter.data.mybatis.plus.base.BaseMapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import top.charles7c.continew.admin.system.model.entity.MenuDO;
|
||||
import top.continew.starter.data.mybatis.plus.base.BaseMapper;
|
||||
|
||||
/**
|
||||
* 菜单 Mapper
|
||||
*
|
@ -14,16 +14,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.system.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
package top.continew.admin.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
|
||||
import top.charles7c.continew.admin.system.model.entity.MessageDO;
|
||||
import top.charles7c.continew.admin.system.model.resp.MessageResp;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import top.continew.admin.system.model.entity.MessageDO;
|
||||
import top.continew.admin.system.model.resp.MessageResp;
|
||||
import top.continew.starter.data.mybatis.plus.base.BaseMapper;
|
||||
|
||||
/**
|
@ -14,11 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.system.mapper;
|
||||
package top.continew.admin.system.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import top.charles7c.continew.admin.system.model.entity.MessageUserDO;
|
||||
import top.continew.admin.system.model.entity.MessageUserDO;
|
||||
import top.continew.starter.data.mybatis.plus.base.BaseMapper;
|
||||
|
||||
/**
|
||||
@ -31,7 +30,7 @@ public interface MessageUserMapper extends BaseMapper<MessageUserDO> {
|
||||
|
||||
/**
|
||||
* 根据用户 ID 和消息类型查询未读消息数量
|
||||
*
|
||||
*
|
||||
* @param userId 用户 ID
|
||||
* @param type 消息类型
|
||||
* @return 未读消息信息
|
@ -14,9 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.system.mapper;
|
||||
package top.continew.admin.system.mapper;
|
||||
|
||||
import top.charles7c.continew.admin.system.model.entity.OptionDO;
|
||||
import top.continew.admin.system.model.entity.OptionDO;
|
||||
import top.continew.starter.data.mybatis.plus.base.BaseMapper;
|
||||
|
||||
/**
|
||||
@ -25,4 +25,5 @@ import top.continew.starter.data.mybatis.plus.base.BaseMapper;
|
||||
* @author Bull-BCLS
|
||||
* @since 2023/8/26 19:38
|
||||
*/
|
||||
public interface OptionMapper extends BaseMapper<OptionDO> {}
|
||||
public interface OptionMapper extends BaseMapper<OptionDO> {
|
||||
}
|
@ -14,11 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.system.mapper;
|
||||
package top.continew.admin.system.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import top.charles7c.continew.admin.system.model.entity.RoleDeptDO;
|
||||
import top.continew.admin.system.model.entity.RoleDeptDO;
|
||||
import top.continew.starter.data.mybatis.plus.base.BaseMapper;
|
||||
|
||||
import java.util.List;
|
@ -14,9 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.system.mapper;
|
||||
package top.continew.admin.system.mapper;
|
||||
|
||||
import top.charles7c.continew.admin.system.model.entity.RoleDO;
|
||||
import top.continew.admin.system.model.entity.RoleDO;
|
||||
import top.continew.starter.data.mybatis.plus.base.BaseMapper;
|
||||
|
||||
/**
|
||||
@ -25,4 +25,5 @@ import top.continew.starter.data.mybatis.plus.base.BaseMapper;
|
||||
* @author Charles7c
|
||||
* @since 2023/2/8 23:17
|
||||
*/
|
||||
public interface RoleMapper extends BaseMapper<RoleDO> {}
|
||||
public interface RoleMapper extends BaseMapper<RoleDO> {
|
||||
}
|
@ -14,13 +14,13 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.system.mapper;
|
||||
package top.continew.admin.system.mapper;
|
||||
|
||||
import top.continew.admin.system.model.entity.RoleMenuDO;
|
||||
import top.continew.starter.data.mybatis.plus.base.BaseMapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import top.charles7c.continew.admin.system.model.entity.RoleMenuDO;
|
||||
import top.continew.starter.data.mybatis.plus.base.BaseMapper;
|
||||
|
||||
/**
|
||||
* 角色和菜单 Mapper
|
||||
*
|
@ -14,9 +14,9 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.system.mapper;
|
||||
package top.continew.admin.system.mapper;
|
||||
|
||||
import top.charles7c.continew.admin.system.model.entity.StorageDO;
|
||||
import top.continew.admin.system.model.entity.StorageDO;
|
||||
import top.continew.starter.data.mybatis.plus.base.BaseMapper;
|
||||
|
||||
/**
|
@ -14,13 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.system.mapper;
|
||||
package top.continew.admin.system.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import top.charles7c.continew.admin.common.config.mybatis.DataPermissionMapper;
|
||||
import top.charles7c.continew.admin.system.model.entity.UserDO;
|
||||
import top.continew.admin.common.config.mybatis.DataPermissionMapper;
|
||||
import top.continew.admin.system.model.entity.UserDO;
|
||||
import top.continew.starter.security.crypto.annotation.FieldEncrypt;
|
||||
|
||||
/**
|
@ -14,16 +14,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
package top.continew.admin.system.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import top.charles7c.continew.admin.system.model.entity.UserRoleDO;
|
||||
import top.continew.admin.system.model.entity.UserRoleDO;
|
||||
import top.continew.starter.data.mybatis.plus.base.BaseMapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户和角色 Mapper
|
||||
*
|
@ -14,11 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.system.mapper;
|
||||
package top.continew.admin.system.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import top.charles7c.continew.admin.system.model.entity.UserSocialDO;
|
||||
import top.continew.admin.system.model.entity.UserSocialDO;
|
||||
import top.continew.starter.data.mybatis.plus.base.BaseMapper;
|
||||
|
||||
/**
|
||||
@ -31,7 +30,7 @@ public interface UserSocialMapper extends BaseMapper<UserSocialDO> {
|
||||
|
||||
/**
|
||||
* 根据来源和开放 ID 查询
|
||||
*
|
||||
*
|
||||
* @param source 来源
|
||||
* @param openId 开放 ID
|
||||
* @return 用户社会化关联信息
|
@ -14,17 +14,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.system.model.entity;
|
||||
package top.continew.admin.system.model.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import top.continew.starter.extension.crud.model.entity.BaseDO;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import top.continew.starter.extension.crud.model.entity.BaseDO;
|
||||
|
||||
/**
|
||||
* 公告实体
|
||||
*
|
@ -14,17 +14,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.system.model.entity;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
import lombok.Data;
|
||||
package top.continew.admin.system.model.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import top.charles7c.continew.admin.common.enums.DisEnableStatusEnum;
|
||||
import lombok.Data;
|
||||
import top.continew.admin.common.enums.DisEnableStatusEnum;
|
||||
import top.continew.starter.extension.crud.model.entity.BaseDO;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 部门实体
|
||||
*
|
@ -14,16 +14,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.system.model.entity;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
import lombok.Data;
|
||||
package top.continew.admin.system.model.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import lombok.Data;
|
||||
import top.continew.starter.extension.crud.model.entity.BaseDO;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 字典实体
|
||||
*
|
@ -14,11 +14,11 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.system.model.entity;
|
||||
package top.continew.admin.system.model.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import top.charles7c.continew.admin.common.enums.DisEnableStatusEnum;
|
||||
import top.continew.admin.common.enums.DisEnableStatusEnum;
|
||||
import top.continew.starter.extension.crud.model.entity.BaseDO;
|
||||
|
||||
import java.io.Serial;
|
@ -14,23 +14,21 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.system.model.entity;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import org.dromara.x.file.storage.core.FileInfo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
package top.continew.admin.system.model.entity;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
|
||||
import top.charles7c.continew.admin.system.enums.FileTypeEnum;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import org.dromara.x.file.storage.core.FileInfo;
|
||||
import top.continew.admin.system.enums.FileTypeEnum;
|
||||
import top.continew.starter.core.constant.StringConstants;
|
||||
import top.continew.starter.core.util.URLUtils;
|
||||
import top.continew.starter.extension.crud.model.entity.BaseDO;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 文件实体
|
||||
*
|
@ -14,12 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.system.model.entity;
|
||||
package top.continew.admin.system.model.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import top.charles7c.continew.admin.system.enums.LogStatusEnum;
|
||||
import top.continew.admin.system.enums.LogStatusEnum;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
@ -14,12 +14,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.system.model.entity;
|
||||
package top.continew.admin.system.model.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import top.charles7c.continew.admin.common.enums.DisEnableStatusEnum;
|
||||
import top.charles7c.continew.admin.common.enums.MenuTypeEnum;
|
||||
import top.continew.admin.common.enums.DisEnableStatusEnum;
|
||||
import top.continew.admin.common.enums.MenuTypeEnum;
|
||||
import top.continew.starter.extension.crud.model.entity.BaseDO;
|
||||
|
||||
import java.io.Serial;
|
@ -14,20 +14,18 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.system.model.entity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import lombok.Data;
|
||||
package top.continew.admin.system.model.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import top.continew.admin.common.enums.MessageTypeEnum;
|
||||
|
||||
import top.charles7c.continew.admin.common.enums.MessageTypeEnum;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 消息实体
|
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.system.model.entity;
|
||||
package top.continew.admin.system.model.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
@ -14,18 +14,17 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.system.model.entity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import lombok.Data;
|
||||
package top.continew.admin.system.model.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 参数实体
|
@ -14,18 +14,16 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package top.charles7c.continew.admin.system.model.entity;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
import lombok.Data;
|
||||
package top.continew.admin.system.model.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import top.charles7c.continew.admin.common.enums.DataScopeEnum;
|
||||
import top.charles7c.continew.admin.common.enums.DisEnableStatusEnum;
|
||||
import lombok.Data;
|
||||
import top.continew.admin.common.enums.DataScopeEnum;
|
||||
import top.continew.admin.common.enums.DisEnableStatusEnum;
|
||||
import top.continew.starter.extension.crud.model.entity.BaseDO;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 角色实体
|
||||
*
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user