修改代码生成器模板.

This commit is contained in:
lijiahang
2023-07-13 09:57:32 +08:00
parent d39ab1f32a
commit 75e588be4e
25 changed files with 750 additions and 340 deletions

View File

@@ -2,6 +2,8 @@ package com.orion.ops.framework.common.constant;
/**
* 自动装配排序常量
* <p>
* 实际遵循 DependsOn
*
* @author Jiahang Li
* @version 1.0.0

View File

@@ -2,6 +2,7 @@ package com.orion.ops.framework.common.constant;
import com.orion.lang.define.wrapper.CodeInfo;
import com.orion.lang.define.wrapper.HttpWrapper;
import com.orion.lang.utils.Exceptions;
/**
* 错误码
@@ -69,6 +70,10 @@ public enum ErrorCode implements CodeInfo {
DIABLED_ERROR(715, "数据已被禁用"),
DATA_PRESENT(716, "数据已存在"),
DATA_ABESENT(717, "数据不存在"),
;
ErrorCode(int code, String message) {
@@ -127,4 +132,11 @@ public enum ErrorCode implements CodeInfo {
return wrapper;
}
/**
* @return 获取异常
*/
public RuntimeException exception() {
return Exceptions.httpWrapper(this);
}
}

View File

@@ -11,4 +11,6 @@ public interface ErrorMessage {
String PARAM_MISSING = "{} 不能为空";
String ID_MISSING = "id 不能为空";
}

View File

@@ -0,0 +1,27 @@
package com.orion.ops.framework.common.entity;
import com.orion.lang.define.wrapper.IPageRequest;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Range;
/**
* 公共页码请求
*
* @author Jiahang Li
* @version 1.0.0
* @since 2023/7/12 23:14
*/
@Data
public class PageRequest implements IPageRequest {
// TODO TEST
@Range(min = 1, max = 10000)
@Schema(description = "页码")
private int page;
@Range(min = 1, max = 100)
@Schema(description = "大小")
private int limit;
}