Skip to content

Commit

Permalink
Merge pull request #43 from dromara/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
lijiahangmax authored Jul 25, 2024
2 parents bb925d3 + 87b8e40 commit b421755
Show file tree
Hide file tree
Showing 284 changed files with 2,671 additions and 3,873 deletions.
6 changes: 3 additions & 3 deletions docker-compose-testing.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '3.3'
services:
orion-visor-service:
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-service:2.0.11
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-service:2.1.0
privileged: true
ports:
- 1081:80
Expand Down Expand Up @@ -32,7 +32,7 @@ services:
- orion-visor-mysql
- orion-visor-redis
orion-visor-mysql:
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-mysql:2.0.11
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-mysql:2.1.0
privileged: true
ports:
- 3307:3306
Expand All @@ -52,7 +52,7 @@ services:
retries: 10
start_period: 3s
orion-visor-redis:
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-redis:2.0.11
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-redis:2.1.0
privileged: true
ports:
- 6380:6379
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '3.3'
services:
orion-visor-service:
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-service:2.0.11
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-service:2.1.0
privileged: true
ports:
- 1081:80
Expand Down Expand Up @@ -32,7 +32,7 @@ services:
- orion-visor-mysql
- orion-visor-redis
orion-visor-mysql:
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-mysql:2.0.11
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-mysql:2.1.0
privileged: true
ports:
- 3307:3306
Expand All @@ -52,7 +52,7 @@ services:
retries: 10
start_period: 3s
orion-visor-redis:
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-redis:2.0.11
image: registry.cn-hangzhou.aliyuncs.com/lijiahangmax/orion-visor-redis:2.1.0
privileged: true
ports:
- 6380:6379
Expand Down
2 changes: 1 addition & 1 deletion docker/mysql/build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#/bin/bash
version=2.0.11
version=2.1.0
cp -r ../../sql ./sql
docker build -t orion-visor-mysql:${version} .
rm -rf ./sql
Expand Down
2 changes: 1 addition & 1 deletion docker/redis/build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#/bin/bash
version=2.0.11
version=2.1.0
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}
2 changes: 1 addition & 1 deletion docker/service/build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#/bin/bash
version=2.0.11
version=2.1.0
mv ../../orion-visor-launch/target/orion-visor-launch.jar ./orion-visor-launch.jar
mv ../../orion-visor-ui/dist ./dist
docker build -t orion-visor-service:${version} .
Expand Down
2 changes: 1 addition & 1 deletion orion-visor-dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<url>https://github.com/dromara/orion-visor</url>

<properties>
<revision>2.0.11</revision>
<revision>2.1.0</revision>
<spring.boot.version>2.7.17</spring.boot.version>
<spring.boot.admin.version>2.7.15</spring.boot.admin.version>
<flatten.maven.plugin.version>1.5.0</flatten.maven.plugin.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public interface AppConst extends OrionConst {
/**
* 同 ${orion.version} 迭代时候需要手动更改
*/
String VERSION = "2.0.11";
String VERSION = "2.1.0";

/**
* 同 ${spring.application.name}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ public interface ErrorMessage {

String GROUP_ABSENT = "分组不存在";

String HOST_TYPE_ERROR = "主机类型错误";

String HOST_NOT_ENABLED = "主机未启用";

String UNABLE_OPERATE_ADMIN_ROLE = "无法操作管理员账号";

String UNSUPPORTED_CHARSET = "不支持的编码 [{}]";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,6 @@ public interface FieldConst {

String FILTER = "filter";

String LICENSE = "license";
String ALL = "all";

}
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,6 @@ private InjectionConfig getInjectionConfig() {
new String[]{"/templates/orion-server-module-entity-request-update.java.vm", "${type}UpdateRequest.java", "entity.request.${bizPackage}"},
// query request 文件
new String[]{"/templates/orion-server-module-entity-request-query.java.vm", "${type}QueryRequest.java", "entity.request.${bizPackage}"},
// export 文件
new String[]{"/templates/orion-server-module-entity-export.java.vm", "${type}Export.java", "entity.export"},
// convert 文件
new String[]{"/templates/orion-server-module-convert.java.vm", "${type}Convert.java", "convert"},
// cache dto 文件
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ private void addApiCommentMeta(@NotNull TableInfo tableInfo, @NotNull Map<String
apiComment.put("deleteById", "删除" + comment);
apiComment.put("deleteAll", "根据条件删除" + comment);
apiComment.put("batchDelete", "批量删除" + comment);
apiComment.put("export", "导出" + comment);
objectMap.put("apiComment", apiComment);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ public List<CustomFile> doFilter() {
.packageName(s.getPackageName())
.build())
.collect(Collectors.toList());
// 不生成 api http 文件
if (!table.isEnableApiHttp()) {
files.removeIf(file -> isApiHttpFile(file.getTemplatePath()));
}
// 不生成对外 api 文件
if (!table.isEnableProviderApi()) {
files.removeIf(file -> isServerProviderFile(file.getTemplatePath()));
Expand Down Expand Up @@ -139,13 +143,13 @@ public static boolean isServerCacheFile(String templatePath) {
}

/**
* 是否为导出文件
* 是否为 api http 文件
*
* @param templatePath templatePath
* @return 是否为导出文件
*/
public static boolean isExportFile(String templatePath) {
return templatePath.contains("orion-server-module-entity-export");
public static boolean isApiHttpFile(String templatePath) {
return templatePath.contains("orion-server-module-controller.http");
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,16 @@ public ServerTemplate bizPackage(String bizPackage) {
return this;
}

/**
* 是否生成 api http 文件
*
* @return this
*/
public ServerTemplate enableApiHttp() {
table.enableApiHttp = true;
return this;
}

/**
* 是否生成对外 api
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ public class Table {
*/
protected String bizPackage;

/**
* 是否生成 api http 文件
*/
protected boolean enableApiHttp;

/**
* 是否生成对外 api
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,14 +210,23 @@ public boolean present() {
// -------------------- data grid --------------------

public DataGrid<T> dataGrid() {
return this.dataGrid(Function.identity());
return this.dataGrid(this.wrapper, Function.identity());
}

public DataGrid<T> dataGrid(Wrapper<T> countWrapper) {
return this.dataGrid(countWrapper, Function.identity());
}

public <R> DataGrid<R> dataGrid(Function<T, R> mapper) {
Valid.notNull(mapper, "convert function is null");
return this.dataGrid(this.wrapper, mapper);
}

public <R> DataGrid<R> dataGrid(Wrapper<T> countWrapper, Function<T, R> mapper) {
Valid.notNull(page, "page is null");
Valid.notNull(wrapper, "wrapper is null");
Long count = dao.selectCount(wrapper);
Valid.notNull(countWrapper, "count wrapper is null");
Valid.notNull(mapper, "convert function is null");
Long count = dao.selectCount(countWrapper);
Pager<R> pager = new Pager<>(page);
pager.setTotal(count.intValue());
boolean next = pager.hasMoreData();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ import java.util.List;
@RestWrapper
@RestController
@RequestMapping("/${package.ModuleName}/${typeHyphen}")
@SuppressWarnings({"ELValidationInJSP", "SpringElInspection"})
#if(${superControllerClass})
public class ${table.controllerName} extends ${superControllerClass} {
#else
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,3 @@ VALUES
(@TMP_SUB_ID, '创建$table.comment', '${package.ModuleName}:${typeHyphen}:create', 3, 20, '1', '1', 0),
(@TMP_SUB_ID, '修改$table.comment', '${package.ModuleName}:${typeHyphen}:update', 3, 30, '1', '1', 0),
(@TMP_SUB_ID, '删除$table.comment', '${package.ModuleName}:${typeHyphen}:delete', 3, 40, '1', '1', 0);
#if(false)
(@TMP_SUB_ID, '导出$table.comment', '${package.ModuleName}:${typeHyphen}:export', 3, 50, '1', '1', 0),
(@TMP_SUB_ID, '导入$table.comment', '${package.ModuleName}:${typeHyphen}:import', 3, 60, '1', '1', 0);
#end
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
search-input-placeholder="输入搜索值"
create-card-position="head"
:loading="loading"
:fieldConfig="fieldConfig"
:field-config="fieldConfig"
:list="list"
:pagination="pagination"
:card-layout-cols="cardColLayout"
Expand Down Expand Up @@ -74,15 +74,16 @@
<!-- 修改 -->
<a-doption v-permission="['${package.ModuleName}:${typeHyphen}:update']"
@click="emits('openUpdate', record)">
<icon-edit />
修改
<span class="more-doption normal">
<icon-edit /> 修改
</span>
</a-doption>
<!-- 删除 -->
<a-doption v-permission="['${package.ModuleName}:${typeHyphen}:delete']"
class="span-red"
@click="deleteRow(record.id)">
<icon-delete />
删除
<span class="more-doption error">
<icon-delete /> 删除
</span>
</a-doption>
</template>
</a-dropdown>
Expand All @@ -93,15 +94,17 @@
<!-- 修改 -->
<a-doption v-permission="['${package.ModuleName}:${typeHyphen}:update']"
@click="emits('openUpdate', record)">
<icon-edit />
修改
<span class="more-doption normal">
<icon-edit /> 修改
</span>
</a-doption>
<!-- 删除 -->
<a-doption v-permission="['${package.ModuleName}:${typeHyphen}:delete']"
class="span-red"
@click="deleteRow(record.id)">
<icon-delete />
删除
<span class="more-doption error">
<icon-delete /> 删除
</span>
</a-doption>
</template>
</card-list>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const columns = [
title: 'id',
dataIndex: 'id',
slotName: 'id',
width: 80,
width: 68,
align: 'left',
fixed: 'left',
}, #foreach($field in ${table.fields})#if("$!field.propertyName" != "id"){
Expand Down

This file was deleted.

Loading

0 comments on commit b421755

Please sign in to comment.