Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.11.6 #157

Merged
merged 32 commits into from
May 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
0ad2a38
添加监听器例子,修改readme等
hlhutu Apr 10, 2023
353ef0c
流程处理所需权限,改为LOGIN
hlhutu Apr 10, 2023
fd56db5
Update README.md
hlhutu Apr 11, 2023
5a34d47
Update README.md
hlhutu Apr 11, 2023
89aaa03
Update README.md
hlhutu Apr 11, 2023
5caea62
Update README.md
hlhutu Apr 11, 2023
8174f90
Update README.md
hlhutu Apr 11, 2023
9f3b520
Update README.md
hlhutu Apr 11, 2023
6cf705a
Update README.md
hlhutu Apr 11, 2023
a3dccf2
调整布局
erupts Apr 12, 2023
f362a7b
现在互斥分支可以判断 日期,字符串,数字等了
hlhutu Apr 20, 2023
96b185d
1、增加水印显示配置
erupts Apr 22, 2023
7f6313a
增加评分组件的注解定义
erupts Apr 23, 2023
2dc224f
现在可以判断 日期,字符串,数字等条件
hlhutu Apr 24, 2023
0fe7bdb
现在可以判断 日期,字符串,数字等条件
hlhutu Apr 24, 2023
2b6dd0c
debug:某些情况下,分支会直接结束流程
hlhutu Apr 24, 2023
49f300a
人员支持支持部门判断了,并且部门判断可以级联
hlhutu Apr 26, 2023
756a923
删除无用字段
hlhutu Apr 26, 2023
dd881dd
修复搜索场景下LocalDateTime类型查询报错的问题
erupts May 3, 2023
2576410
view注解支持打开tpl能力
erupts May 4, 2023
6f4aaee
Merge pull request #4 from hlhutu/master
hlhutu May 6, 2023
7341f77
定义新的表单联动注解,替代ShowBy能力,支持更多动态场景
erupts May 6, 2023
7ffb55c
erupt-flow前端拷贝到public下
hlhutu May 8, 2023
c1806fb
修改密码参数加密传输
erupts May 9, 2023
6d581a8
定义密码类型注解
erupts May 9, 2023
e50aec8
新增@EruptFlowForm注解,可以将@Erupt实体类解析为流程的表单
hlhutu May 10, 2023
6998288
erupt-flow前端修改
hlhutu May 10, 2023
2368aae
Merge pull request #156 from hlhutu/flow
erupts May 10, 2023
9691cae
优化工作流样式
erupts May 10, 2023
571643c
优化工作流样式
erupts May 11, 2023
0e2775a
优化表单样式
erupts May 11, 2023
c6e9fe0
优化工作流前端代码与打包流程
erupts May 11, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion erupt-annotation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<parent>
<groupId>xyz.erupt</groupId>
<artifactId>erupt</artifactId>
<version>1.11.5</version>
<version>1.11.6</version>
<relativePath>../pom.xml</relativePath>
</parent>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@
@Comment("左树右表配置项")
LinkTree linkTree() default @LinkTree(field = "");

@Comment("自定义页头")
@Match("#value.path() != ''")
Tpl header() default @Tpl(path = "");

// @Comment("自定义页头")
// @Match("#value.path() != ''")
// Tpl header() default @Tpl(path = "");
//
// @Comment("画册视图定义")
// @Match("#value.enable() == true")
// Card cardView() default @Card(enable = false, galleryField = "", viewFields = {});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
Edit edit() default @Edit(title = "");

@Transient
@Comment("显示顺序,默认按照字段排列顺序排序")
@Comment("显示顺序")
int sort() default 1000;

@ToMap(key = "key")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@
@Transient
boolean enable() default true;

boolean showTitle() default false;

@Comment("封面字段")
String galleryField();

@Comment("封面效果")
GalleryCover galleryCover() default GalleryCover.CLIP;

@Comment("字段")
@Comment("显示字段")
String[] viewFields();

enum GalleryCover {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package xyz.erupt.annotation.sub_erupt;

public @interface Layout {

//表单大小
FormSize formSize() default FormSize.DEFAULT;

//表格宽度,为0则自动计算
int tableWidth() default 0;

int tableLeftFixed() default 0;

int tableRightFixed() default 0;


enum FormSize {
DEFAULT,
FULL_LINE //整行
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
@Comment("模板引擎")
Engine engine() default Engine.FreeMarker;

// @Comment("模板宽度")
// int width() default 0;

@Getter
enum Engine {
@Comment("原生H5, Native模式下不支持tplHandler")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@
@Match("#item.type().toString()=='SLIDER'")
SliderType sliderType() default @SliderType(max = 999);

@Match("#item.type().toString()=='RATE'")
RateType rateType() default @RateType;

@Match("#item.type().toString()=='DATE'")
DateType dateType() default @DateType;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ public enum EditType {
@EditTypeMapping(mapping = SliderType.class, desc = "数字滑块", allowType = {JavaTypeEnum.number})
SLIDER,
@EditTypeSearch(vagueMethod = QueryExpression.RANGE)
@EditTypeMapping(mapping = RateType.class, desc = "评分", allowType = {JavaTypeEnum.number})
RATE,
@EditTypeSearch(vagueMethod = QueryExpression.RANGE)
@EditTypeMapping(mapping = DateType.class, desc = "日期", allowType = {JavaTypeEnum.String, JavaTypeEnum.date})
DATE,
@EditTypeSearch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import xyz.erupt.annotation.config.Comment;
import xyz.erupt.annotation.config.EruptProperty;
import xyz.erupt.annotation.expr.ExprBool;
import xyz.erupt.annotation.sub_erupt.Tpl;

import java.beans.Transient;

Expand All @@ -16,6 +17,9 @@

String desc() default "";

@Comment("可在模板中使用row变量,获取当前行的数据")
Tpl tpl() default @Tpl(path = "");

@Comment("列宽度(请指定单位如:%,px)")
String width() default "";

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package xyz.erupt.annotation.sub_field.sub_edit;

import xyz.erupt.annotation.SceneEnum;
import xyz.erupt.annotation.config.Comment;

/**
* @author YuePeng
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

18% of developers fix this issue

MissingSummary: A summary line is required on public/protected Javadocs.


ℹ️ Expand to see all @sonatype-lift commands

You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.

Command Usage
@sonatype-lift ignore Leave out the above finding from this PR
@sonatype-lift ignoreall Leave out all the existing findings from this PR
@sonatype-lift exclude <file|issue|path|tool> Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file

Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.

* date 2020-05-21
*/
public @interface DynamicBy {

boolean enable() default true;

// @Comment("依赖其他表单的值")
// String[] dependFields();

@Comment("显示条件表达式,支持变量:item 该值表示其他字段的值")
String expr();

@Comment("展示类型")
Type viewType() default Type.SHOW;

@Comment("生效场景范围")
SceneEnum[] sceneRange() default {SceneEnum.ADD, SceneEnum.EDIT, SceneEnum.VIEW_DETAIL};


enum Type {
SHOW, //显示
HIDE, //隐藏
SHOW_NOTNULL, //显示且必填
SHOW_READONLY, //显示且制度
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package xyz.erupt.annotation.sub_field.sub_edit;

/**
* @author YuePeng
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

18% of developers fix this issue

MissingSummary: A summary line is required on public/protected Javadocs.


ℹ️ Expand to see all @sonatype-lift commands

You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.

Command Usage
@sonatype-lift ignore Leave out the above finding from this PR
@sonatype-lift ignoreall Leave out all the existing findings from this PR
@sonatype-lift exclude <file|issue|path|tool> Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file

Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.

* date 2023/5/9 22:31
*/
public @interface PasswordType {

//加密次数
int encryptCount();


}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
//是否允许半选
boolean allowHalf() default false;

//star 总数
int count() default 5;

}
2 changes: 1 addition & 1 deletion erupt-cloud/erupt-cloud-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>xyz.erupt</groupId>
<artifactId>erupt</artifactId>
<version>1.11.5</version>
<version>1.11.6</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion erupt-cloud/erupt-cloud-node-jpa/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>xyz.erupt</groupId>
<artifactId>erupt</artifactId>
<version>1.11.5</version>
<version>1.11.6</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion erupt-cloud/erupt-cloud-node/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>xyz.erupt</groupId>
<artifactId>erupt</artifactId>
<version>1.11.5</version>
<version>1.11.6</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion erupt-cloud/erupt-cloud-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>xyz.erupt</groupId>
<artifactId>erupt</artifactId>
<version>1.11.5</version>
<version>1.11.6</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public class CloudNode extends MetaModelUpdateVo implements DataProxy<CloudNode>

@Transient
@EruptField(
views = @View(title = "实例数", className = "text-center", width = "60px")
views = @View(title = "实例数", className = "text-center", width = "70px")
)
private Integer instanceNum;

Expand Down
2 changes: 1 addition & 1 deletion erupt-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<parent>
<groupId>xyz.erupt</groupId>
<artifactId>erupt</artifactId>
<version>1.11.5</version>
<version>1.11.6</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ public abstract class AnnotationProxy<A, PA> {

protected abstract Object invocation(MethodInvocation invocation);

public A newProxy(A annotation) {
return this.newProxy(annotation, null);
}

//创建注解注解代理类
public A newProxy(A annotation, AnnotationProxy<PA, ?> parent) {
this.parent = parent;
Expand Down
21 changes: 17 additions & 4 deletions erupt-core/src/main/java/xyz/erupt/core/util/DateUtil.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
package xyz.erupt.core.util;

import lombok.SneakyThrows;
import xyz.erupt.core.exception.EruptWebApiRuntimeException;

import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Date;

/**
Expand All @@ -29,11 +33,20 @@ public static String getFormatDate(Date date, String formatStr) {
}

@SneakyThrows
public static Date getDate(String str) {
if (str.length() == 10) {
return new SimpleDateFormat(DATE).parse(str);
public static Object getDate(Class<?> targetDateType, String str) {
if (targetDateType == Date.class) {
if (str.length() == 10) {
return new SimpleDateFormat(DATE).parse(str);
} else {
return new SimpleDateFormat(DATE_TIME).parse(str);
}
} else if (targetDateType == LocalDate.class) {
return LocalDate.parse(str, DateTimeFormatter.ofPattern(DATE));
} else if (targetDateType == LocalDateTime.class) {
return LocalDateTime.parse(str, DateTimeFormatter.ofPattern(DATE_TIME));
} else {
return new SimpleDateFormat(DATE_TIME).parse(str);
throw new EruptWebApiRuntimeException("Unsupported date type");
}
}

}
10 changes: 3 additions & 7 deletions erupt-core/src/main/java/xyz/erupt/core/util/EruptUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -158,18 +158,14 @@ public static List<String> getTagList(TagsType tagsType) {
}

public static Object convertObjectType(EruptFieldModel eruptFieldModel, Object obj) {
if (null == obj) {
return null;
}
if (null == eruptFieldModel) {
return obj.toString();
}
if (null == obj) return null;
if (null == eruptFieldModel) return obj.toString();
String str = obj.toString();
Edit edit = eruptFieldModel.getEruptField().edit();
switch (edit.type()) {
case DATE:
if (isDateField(eruptFieldModel.getFieldReturnName())) {
return DateUtil.getDate(str);
return DateUtil.getDate(eruptFieldModel.getField().getType(), str);
} else {
return str;
}
Expand Down
28 changes: 28 additions & 0 deletions erupt-core/src/main/java/xyz/erupt/core/util/SecretUtil.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package xyz.erupt.core.util;

import lombok.SneakyThrows;

import java.net.URLDecoder;
import java.nio.charset.StandardCharsets;
import java.util.Base64;

/**
* @author YuePeng
* date 2023/5/9 21:34
*/
public class SecretUtil {


public static String decodeSecret(String str) {
return new String(Base64.getDecoder().decode(str));
}

@SneakyThrows
public static String decodeSecret(String str, int encodeNum) {
for (int i = 0; i < encodeNum; i++) {
str = decodeSecret(str);
}
return URLDecoder.decode(str, StandardCharsets.UTF_8.name());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public EruptFieldModel(Field field) {
}
break;
}
this.eruptField = eruptFieldAnnotationProxy.newProxy(this.getEruptField(), null);
this.eruptField = eruptFieldAnnotationProxy.newProxy(this.getEruptField());
//校验注解的正确性
EruptFieldAnnotationException.validateEruptFieldInfo(this);
}
Expand Down
4 changes: 2 additions & 2 deletions erupt-core/src/main/java/xyz/erupt/core/view/EruptModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*/
@Getter
@Setter
public final class EruptModel implements Cloneable {
public class EruptModel implements Cloneable {

private transient Class<?> clazz;

Expand All @@ -45,7 +45,7 @@ public final class EruptModel implements Cloneable {
public EruptModel(Class<?> eruptClazz) {
this.clazz = eruptClazz;
this.erupt = eruptClazz.getAnnotation(Erupt.class);
this.erupt = eruptAnnotationProxy.newProxy(this.getErupt(), null);
this.erupt = eruptAnnotationProxy.newProxy(this.getErupt());
this.eruptName = eruptClazz.getSimpleName();
DataProxyInvoke.invoke(this, it -> {
try {
Expand Down
2 changes: 1 addition & 1 deletion erupt-data/erupt-jpa/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>xyz.erupt</groupId>
<artifactId>erupt</artifactId>
<version>1.11.5</version>
<version>1.11.6</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
Loading
Loading