mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-09-09 08:57:16 +08:00
build: continew-starter 2.12.2 => 2.13.0
1.引入 continew-starter-validation(从 core 拆分)、sa-token-sign(从 sa-token-core 拆分并调整了部分 API) 2.Starter import 包路径调整 - EasyExcel 替换为 FastExcel:com.alibaba.excel(EasyExcel) => cn.idev.excel(FastExcel) - top.continew.starter.file.excel => top.continew.starter.excel - top.continew.starter.core.validation.constraints => top.continew.starter.validation.constraints - top.continew.starter.core.validation.ValidationUtils、CheckUtils、Validator => top.continew.starter.core.util.validation - cn.dev33.satoken.sign => cn.dev33.satoken.sign.template - top.continew.starter.core.autoconfigure.project => top.continew.starter.core.autoconfigure.application - top.continew.starter.data.core、top.continew.starter.data.mp => top.continew.starter.data - top.continew.starter.data.mp.base.BaseMapper => top.continew.starter.data.mapper.BaseMapper 2.Starter 基础类命名调整 CRUD:AbstractBaseController => AbstractCrudController,BaseService => CrudService,BaseServiceImpl => CrudServiceImpl Core:ProjectProperties(项目配置,project.xxx) => ApplicationProperties(应用配置更为贴切,且变量 application.xx 可以和 Maven 变量显著区分开) 3.groupId 调整:top.continew.starter、top.continew.admin(避免部分童鞋全局替换包名时出现把 starter 也一起替换了!) 4.Admin import 包路径调整:BaseController、BaseDO等 => common.base 5.新增 BaseService、BaseServiceImpl 替代 Starter 原 BaseXxx,方便用户根据项目实际需要重写或新增全局通用接口、方法 6.snail-job server 数据库脚本更新至 v1.5.0 7.Valid 及 Validated 使用梳理(CrudService 支持通过在实现类添加 Validated 注解来实现 Service 层基础校验)
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
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.continew</groupId>
|
||||
<groupId>top.continew.admin</groupId>
|
||||
<artifactId>continew-plugin</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
|
@@ -26,7 +26,7 @@ import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PatchMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import top.continew.admin.common.controller.BaseController;
|
||||
import top.continew.admin.common.base.controller.BaseController;
|
||||
import top.continew.admin.open.model.query.AppQuery;
|
||||
import top.continew.admin.open.model.req.AppReq;
|
||||
import top.continew.admin.open.model.resp.AppDetailResp;
|
||||
|
@@ -21,7 +21,7 @@ import cn.dev33.satoken.annotation.handler.SaAnnotationHandlerInterface;
|
||||
import org.springframework.stereotype.Component;
|
||||
import top.continew.admin.open.util.OpenApiUtils;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.AnnotatedElement;
|
||||
|
||||
import static cn.dev33.satoken.annotation.handler.SaCheckPermissionHandler._checkMethod;
|
||||
|
||||
@@ -40,9 +40,10 @@ public class SaCheckPermissionHandler implements SaAnnotationHandlerInterface<Sa
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkMethod(SaCheckPermission at, Method method) {
|
||||
public void checkMethod(SaCheckPermission saCheckPermission, AnnotatedElement annotatedElement) {
|
||||
if (!OpenApiUtils.isSignParamExists()) {
|
||||
_checkMethod(at.type(), at.value(), at.mode(), at.orRole());
|
||||
_checkMethod(saCheckPermission.type(), saCheckPermission.value(), saCheckPermission
|
||||
.mode(), saCheckPermission.orRole());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -20,7 +20,7 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import top.continew.admin.open.model.entity.AppDO;
|
||||
import top.continew.starter.data.mp.base.BaseMapper;
|
||||
import top.continew.starter.data.mapper.BaseMapper;
|
||||
import top.continew.starter.security.crypto.annotation.FieldEncrypt;
|
||||
|
||||
/**
|
||||
|
@@ -19,7 +19,7 @@ package top.continew.admin.open.model.entity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import top.continew.admin.common.enums.DisEnableStatusEnum;
|
||||
import top.continew.admin.common.model.entity.BaseDO;
|
||||
import top.continew.admin.common.base.model.entity.BaseDO;
|
||||
import top.continew.starter.security.crypto.annotation.FieldEncrypt;
|
||||
|
||||
import java.io.Serial;
|
||||
|
@@ -18,8 +18,8 @@ package top.continew.admin.open.model.query;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import top.continew.starter.data.core.annotation.Query;
|
||||
import top.continew.starter.data.core.enums.QueryType;
|
||||
import top.continew.starter.data.annotation.Query;
|
||||
import top.continew.starter.data.enums.QueryType;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
@@ -16,13 +16,13 @@
|
||||
|
||||
package top.continew.admin.open.model.resp;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import top.continew.admin.common.model.resp.BaseDetailResp;
|
||||
import top.continew.admin.common.base.model.resp.BaseDetailResp;
|
||||
import top.continew.admin.common.enums.DisEnableStatusEnum;
|
||||
import top.continew.starter.file.excel.converter.ExcelBaseEnumConverter;
|
||||
import top.continew.starter.excel.converter.ExcelBaseEnumConverter;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.time.LocalDateTime;
|
||||
|
@@ -18,7 +18,7 @@ package top.continew.admin.open.model.resp;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import top.continew.admin.common.model.resp.BaseDetailResp;
|
||||
import top.continew.admin.common.base.model.resp.BaseDetailResp;
|
||||
import top.continew.admin.common.enums.DisEnableStatusEnum;
|
||||
|
||||
import java.io.Serial;
|
||||
|
@@ -16,13 +16,13 @@
|
||||
|
||||
package top.continew.admin.open.service;
|
||||
|
||||
import top.continew.admin.common.base.service.BaseService;
|
||||
import top.continew.admin.open.model.entity.AppDO;
|
||||
import top.continew.admin.open.model.query.AppQuery;
|
||||
import top.continew.admin.open.model.req.AppReq;
|
||||
import top.continew.admin.open.model.resp.AppDetailResp;
|
||||
import top.continew.admin.open.model.resp.AppResp;
|
||||
import top.continew.admin.open.model.resp.AppSecretResp;
|
||||
import top.continew.starter.extension.crud.service.BaseService;
|
||||
|
||||
/**
|
||||
* 应用业务接口
|
||||
|
@@ -19,8 +19,8 @@ package top.continew.admin.open.service.impl;
|
||||
import cn.hutool.core.codec.Base64;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import top.continew.admin.common.base.service.BaseServiceImpl;
|
||||
import top.continew.admin.open.mapper.AppMapper;
|
||||
import top.continew.admin.open.model.entity.AppDO;
|
||||
import top.continew.admin.open.model.query.AppQuery;
|
||||
@@ -30,7 +30,6 @@ import top.continew.admin.open.model.resp.AppResp;
|
||||
import top.continew.admin.open.model.resp.AppSecretResp;
|
||||
import top.continew.admin.open.service.AppService;
|
||||
import top.continew.starter.core.constant.StringConstants;
|
||||
import top.continew.starter.extension.crud.service.BaseServiceImpl;
|
||||
|
||||
/**
|
||||
* 应用业务实现
|
||||
@@ -40,7 +39,6 @@ import top.continew.starter.extension.crud.service.BaseServiceImpl;
|
||||
* @since 2024/10/17 16:03
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class AppServiceImpl extends BaseServiceImpl<AppMapper, AppDO, AppResp, AppDetailResp, AppQuery, AppReq> implements AppService {
|
||||
|
||||
@Override
|
||||
|
@@ -17,13 +17,13 @@
|
||||
package top.continew.admin.open.sign;
|
||||
|
||||
import cn.dev33.satoken.secure.SaSecureUtil;
|
||||
import cn.dev33.satoken.sign.SaSignTemplate;
|
||||
import cn.dev33.satoken.sign.template.SaSignTemplate;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
import top.continew.admin.common.enums.DisEnableStatusEnum;
|
||||
import top.continew.admin.open.model.entity.AppDO;
|
||||
import top.continew.admin.open.service.AppService;
|
||||
import top.continew.starter.core.validation.ValidationUtils;
|
||||
import top.continew.starter.core.util.validation.ValidationUtils;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
|
@@ -18,7 +18,7 @@ package top.continew.admin.open.util;
|
||||
|
||||
import cn.dev33.satoken.context.SaHolder;
|
||||
import cn.dev33.satoken.context.model.SaRequest;
|
||||
import cn.dev33.satoken.sign.SaSignTemplate;
|
||||
import cn.dev33.satoken.sign.template.SaSignTemplate;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
|
Reference in New Issue
Block a user