生成数据分组代码
This commit is contained in:
@@ -139,19 +139,19 @@ public class OperatorLogAspect {
|
||||
break;
|
||||
}
|
||||
OperatorLogs.add(
|
||||
orElse(((RequestParam) annotation).value(),
|
||||
Strings.ifBlank(((RequestParam) annotation).value(),
|
||||
((RequestParam) annotation).name()),
|
||||
args[i]);
|
||||
break;
|
||||
} else if (annotation instanceof RequestHeader) {
|
||||
OperatorLogs.add(
|
||||
orElse(((RequestHeader) annotation).value(),
|
||||
Strings.ifBlank(((RequestHeader) annotation).value(),
|
||||
((RequestHeader) annotation).name()),
|
||||
args[i]);
|
||||
break;
|
||||
} else if (annotation instanceof PathVariable) {
|
||||
OperatorLogs.add(
|
||||
orElse(((PathVariable) annotation).value(),
|
||||
Strings.ifBlank(((PathVariable) annotation).value(),
|
||||
((PathVariable) annotation).name()),
|
||||
args[i]);
|
||||
break;
|
||||
@@ -316,15 +316,4 @@ public class OperatorLogAspect {
|
||||
LOG_SAVER.submit(() -> operatorLogFrameworkService.insert(model));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取可用值
|
||||
*
|
||||
* @param value value
|
||||
* @param name name
|
||||
* @return available
|
||||
*/
|
||||
private String orElse(String value, String name) {
|
||||
return Strings.isBlank(value) ? name : value;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -30,20 +30,34 @@ public class CodeGenerators {
|
||||
String module = "infra";
|
||||
// 生成的表
|
||||
Table[] tables = {
|
||||
Template.create("dict_key", "字典配置项", "dict")
|
||||
// Template.create("dict_key", "字典配置项", "dict")
|
||||
// .enableProviderApi()
|
||||
// .disableUnitTest()
|
||||
// .cache("dict:keys", "字典配置项")
|
||||
// .expire(1, TimeUnit.DAYS)
|
||||
// .vue("system", "dict-key")
|
||||
// .enableRowSelection()
|
||||
// .enableCardView()
|
||||
// .enableDrawerForm()
|
||||
// .dict("dictValueType", "value_type")
|
||||
// .fields("STRING", "INTEGER", "DECIMAL", "BOOLEAN", "COLOR")
|
||||
// .labels("字符串", "整数", "小数", "布尔值", "颜色")
|
||||
// .color("blue", "gray", "red", "green", "white")
|
||||
// .valueUseFields()
|
||||
// .build(),
|
||||
Template.create("data_group", "数据分组", "data")
|
||||
.enableProviderApi()
|
||||
.disableUnitTest()
|
||||
.cache("dict:keys", "字典配置项")
|
||||
.cache("data:group:{}", "数据分组 ${type}")
|
||||
.expire(1, TimeUnit.DAYS)
|
||||
.vue("system", "dict-key")
|
||||
.enableRowSelection()
|
||||
.enableCardView()
|
||||
.enableDrawerForm()
|
||||
.dict("dictValueType", "value_type")
|
||||
.fields("STRING", "INTEGER", "DECIMAL", "BOOLEAN", "COLOR")
|
||||
.labels("字符串", "整数", "小数", "布尔值", "颜色")
|
||||
.color("blue", "gray", "red", "green", "white")
|
||||
.valueUseFields()
|
||||
.vue("system", "data-group")
|
||||
.build(),
|
||||
Template.create("data_group_rel", "数据分组关联", "data")
|
||||
.enableProviderApi()
|
||||
.disableUnitTest()
|
||||
.cache("data:group-rel:{}", "数据分组关联 ${groupId}")
|
||||
.expire(1, TimeUnit.DAYS)
|
||||
.vue("system", "data-group-rel")
|
||||
.build(),
|
||||
};
|
||||
// jdbc 配置 - 使用配置文件
|
||||
|
||||
@@ -9,7 +9,7 @@ import java.util.concurrent.TimeUnit;
|
||||
* @version 1.0.0
|
||||
* @since 2023/9/26 1:14
|
||||
*/
|
||||
public class CacheTemplate extends ServerTemplate {
|
||||
public class CacheTemplate extends Template {
|
||||
|
||||
public CacheTemplate(Table table) {
|
||||
this(table, table.cacheKey, table.cacheDesc);
|
||||
|
||||
Reference in New Issue
Block a user