-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from dromara/dev
Dev
- Loading branch information
Showing
60 changed files
with
269 additions
and
289 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#/bin/bash | ||
version=2.0.7 | ||
version=2.0.8 | ||
docker build -t orion-visor-redis:${version} . | ||
docker tag orion-visor-redis:${version} registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-redis:${version} | ||
docker push registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-redis:${version} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
.../com/orion/visor/framework/common/handler/data/strategy/AbstractGenericsDataStrategy.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
package com.orion.visor.framework.common.handler.data.strategy; | ||
|
||
import com.alibaba.fastjson.JSON; | ||
import com.orion.visor.framework.common.handler.data.model.GenericsDataModel; | ||
|
||
/** | ||
* 标准数据处理策略 基类 | ||
* | ||
* @author Jiahang Li | ||
* @version 1.0.0 | ||
* @since 2024/6/11 21:44 | ||
*/ | ||
public abstract class AbstractGenericsDataStrategy<M extends GenericsDataModel> implements GenericsDataStrategy<M> { | ||
|
||
protected final Class<M> modelClass; | ||
|
||
public AbstractGenericsDataStrategy(Class<M> modelClass) { | ||
this.modelClass = modelClass; | ||
} | ||
|
||
/** | ||
* 更新填充 | ||
* | ||
* @param beforeModel 修改前的配置 | ||
* @param afterModel 修改后的配置 | ||
*/ | ||
protected void updateFill(M beforeModel, M afterModel) { | ||
} | ||
|
||
/** | ||
* 预校验参数 | ||
* | ||
* @param model model | ||
*/ | ||
protected void preValid(M model) { | ||
} | ||
|
||
/** | ||
* 校验参数 | ||
* | ||
* @param model model | ||
*/ | ||
protected void valid(M model) { | ||
} | ||
|
||
@Override | ||
public void doValid(M beforeModel, M afterModel) { | ||
// 预校验参数 | ||
this.preValid(afterModel); | ||
// 更新填充 | ||
this.updateFill(beforeModel, afterModel); | ||
// 校验参数 | ||
this.valid(afterModel); | ||
} | ||
|
||
@Override | ||
public M parse(String serialModel) { | ||
return JSON.parseObject(serialModel, modelClass); | ||
} | ||
|
||
@Override | ||
public void toView(M model) { | ||
} | ||
|
||
} |
Oops, something went wrong.