Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
74c981f0
提交
74c981f0
编写于
8月 28, 2022
作者:
ibiz4j
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
缓存bug修复
上级
0cdb4735
变更
10
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
168 行增加
和
117 行删除
+168
-117
{{entities@SQL}}Mapper.java.hbs
...Name}}/{{modules}}/mapper/{{entities@SQL}}Mapper.java.hbs
+12
-12
{{entities@NoSQL}}Service.java.hbs
...}}/{{modules}}/service/{{entities@NoSQL}}Service.java.hbs
+16
-16
{{entities@SQL}}Service.java.hbs
...me}}/{{modules}}/service/{{entities@SQL}}Service.java.hbs
+16
-16
{{entities@ServiceAPI}}Service.java.hbs
...modules}}/service/{{entities@ServiceAPI}}Service.java.hbs
+16
-16
{{entities@ServiceAPI}}FeignClient.java.hbs
...ules}}/client/{{entities@ServiceAPI}}FeignClient.java.hbs
+14
-14
{{entities@SQL}}Mapper.java.hbs
...}/core/{{modules}}/mapper/{{entities@SQL}}Mapper.java.hbs
+14
-14
{{entities@SQL}}ServiceBase.java.hbs
...dules}}/service/impl/{{entities@SQL}}ServiceBase.java.hbs
+13
-1
{{entities@ServiceAPI}}ServiceBase.java.hbs
.../service/impl/{{entities@ServiceAPI}}ServiceBase.java.hbs
+11
-0
{{entities@SQL}}Service.java.hbs
...core/{{modules}}/service/{{entities@SQL}}Service.java.hbs
+30
-16
{{entities@ServiceAPI}}Service.java.hbs
...modules}}/service/{{entities@ServiceAPI}}Service.java.hbs
+26
-12
未找到文件。
modules/ibizlab-template/ibizlab-template-ibizboot/src/main/resources/templ/{{projectName}}-core/src/main/java/{{packageName}}/{{modules}}/mapper/{{entities@SQL}}Mapper.java.hbs
浏览文件 @
74c981f0
...
@@ -30,40 +30,40 @@ public interface {{entity.codeName}}Mapper extends BaseMapper<{{entity.codeName}
...
@@ -30,40 +30,40 @@ public interface {{entity.codeName}}Mapper extends BaseMapper<{{entity.codeName}
{{/
entity
.
dataSets
}}
{{/
entity
.
dataSets
}}
@Override
@Override
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@Cacheable(value = "
{{
lowerCase
entity
.
codeName
}}
", key = "'row:'+#p0")
@Cacheable(value = "
{{
lowerCase
entity
.
codeName
}}
", key = "'row:'+#p0")
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
{{
entity
.
codeName
}}
selectById(Serializable id);
{{
entity
.
codeName
}}
selectById(Serializable id);
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@Cacheable(value = "
{{
lowerCase
entity
.
codeName
}}
", key = "'row:'+#p0.
{{
camelCase
entity
.
keyField
.
codeName
}}
")
@Cacheable(value = "
{{
lowerCase
entity
.
codeName
}}
", key = "'row:'+#p0.
{{
camelCase
entity
.
keyField
.
codeName
}}
")
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
{{
entity
.
codeName
}}
selectEntity(
{{
entity
.
codeName
}}
entity);
{{
entity
.
codeName
}}
selectEntity(
{{
entity
.
codeName
}}
entity);
List
<
{{
entity
.
codeName
}}
>
selectEntities(@Param("list") List
<
{{
entity
.
codeName
}}
>
list);
List
<
{{
entity
.
codeName
}}
>
selectEntities(@Param("list") List
<
{{
entity
.
codeName
}}
>
list);
@Override
@Override
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", key = "'row:'+#p0.
{{
camelCase
entity
.
keyField
.
codeName
}}
")
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", key = "'row:'+#p0.
{{
camelCase
entity
.
keyField
.
codeName
}}
")
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
int insert(
{{
entity
.
codeName
}}
entity);
int insert(
{{
entity
.
codeName
}}
entity);
@Override
@Override
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", key = "'row:'+#p0.
{{
camelCase
entity
.
keyField
.
codeName
}}
")
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", key = "'row:'+#p0.
{{
camelCase
entity
.
keyField
.
codeName
}}
")
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
int updateById(@Param(Constants.ENTITY)
{{
entity
.
codeName
}}
entity);
int updateById(@Param(Constants.ENTITY)
{{
entity
.
codeName
}}
entity);
@Override
@Override
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", key = "'row:'+#p0.
{{
camelCase
entity
.
keyField
.
codeName
}}
", condition ="#p0 != null")
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", key = "'row:'+#p0.
{{
camelCase
entity
.
keyField
.
codeName
}}
", condition ="#p0 != null")
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
int update(@Param(Constants.ENTITY)
{{
entity
.
codeName
}}
entity, @Param("ew") Wrapper
<
{{
entity
.
codeName
}}
>
updateWrapper);
int update(@Param(Constants.ENTITY)
{{
entity
.
codeName
}}
entity, @Param("ew") Wrapper
<
{{
entity
.
codeName
}}
>
updateWrapper);
@Override
@Override
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", key = "'row:'+#p0")
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", key = "'row:'+#p0")
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
int deleteById(Serializable id);
int deleteById(Serializable id);
/**
/**
...
...
modules/ibizlab-template/ibizlab-template-ibizboot/src/main/resources/templ/{{projectName}}-core/src/main/java/{{packageName}}/{{modules}}/service/{{entities@NoSQL}}Service.java.hbs
浏览文件 @
74c981f0
...
@@ -53,44 +53,44 @@ public interface {{entity.codeName}}Service extends IBaseService<{{entity.codeNa
...
@@ -53,44 +53,44 @@ public interface {{entity.codeName}}Service extends IBaseService<{{entity.codeNa
return IBaseService.super.onCreate(dto);
return IBaseService.super.onCreate(dto);
}
}
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
default boolean update(
{{
entity
.
codeName
}}
dto) throws Throwable {
default boolean update(
{{
entity
.
codeName
}}
dto) throws Throwable {
return IBaseService.super.update(dto);
return IBaseService.super.update(dto);
}
}
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
default boolean onUpdate(
{{
entity
.
codeName
}}
dto) throws Throwable {
default boolean onUpdate(
{{
entity
.
codeName
}}
dto) throws Throwable {
return IBaseService.super.onUpdate(dto);
return IBaseService.super.onUpdate(dto);
}
}
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
default boolean remove(
{{
entity
.
keyField
.
type
.
java
}}
key) throws Throwable {
default boolean remove(
{{
entity
.
keyField
.
type
.
java
}}
key) throws Throwable {
return IBaseService.super.remove(key);
return IBaseService.super.remove(key);
}
}
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
default boolean onRemove(
{{
entity
.
keyField
.
type
.
java
}}
key) throws Throwable {
default boolean onRemove(
{{
entity
.
keyField
.
type
.
java
}}
key) throws Throwable {
return IBaseService.super.onRemove(key);
return IBaseService.super.onRemove(key);
}
}
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
default boolean remove(List keys) throws Throwable {
default boolean remove(List keys) throws Throwable {
return IBaseService.super.remove(keys);
return IBaseService.super.remove(keys);
}
}
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
default boolean onRemove(List keys) throws Throwable {
default boolean onRemove(List keys) throws Throwable {
return IBaseService.super.onRemove(keys);
return IBaseService.super.onRemove(keys);
}
}
...
@@ -119,16 +119,16 @@ public interface {{entity.codeName}}Service extends IBaseService<{{entity.codeNa
...
@@ -119,16 +119,16 @@ public interface {{entity.codeName}}Service extends IBaseService<{{entity.codeNa
return IBaseService.super.onCheckKey(dto);
return IBaseService.super.onCheckKey(dto);
}
}
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
default boolean save(
{{
entity
.
codeName
}}
dto) throws Throwable {
default boolean save(
{{
entity
.
codeName
}}
dto) throws Throwable {
return IBaseService.super.save(dto);
return IBaseService.super.save(dto);
}
}
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
default boolean onSave(
{{
entity
.
codeName
}}
dto) throws Throwable {
default boolean onSave(
{{
entity
.
codeName
}}
dto) throws Throwable {
return IBaseService.super.onSave(dto);
return IBaseService.super.onSave(dto);
}
}
...
...
modules/ibizlab-template/ibizlab-template-ibizboot/src/main/resources/templ/{{projectName}}-core/src/main/java/{{packageName}}/{{modules}}/service/{{entities@SQL}}Service.java.hbs
浏览文件 @
74c981f0
...
@@ -54,44 +54,44 @@ public interface {{entity.codeName}}Service extends IMPService<{{entity.codeName
...
@@ -54,44 +54,44 @@ public interface {{entity.codeName}}Service extends IMPService<{{entity.codeName
return IMPService.super.onCreate(dto);
return IMPService.super.onCreate(dto);
}
}
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
default boolean update(
{{
entity
.
codeName
}}
dto) throws Throwable {
default boolean update(
{{
entity
.
codeName
}}
dto) throws Throwable {
return IMPService.super.update(dto);
return IMPService.super.update(dto);
}
}
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
default boolean onUpdate(
{{
entity
.
codeName
}}
dto) throws Throwable {
default boolean onUpdate(
{{
entity
.
codeName
}}
dto) throws Throwable {
return IMPService.super.onUpdate(dto);
return IMPService.super.onUpdate(dto);
}
}
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
default boolean remove(
{{
entity
.
keyField
.
type
.
java
}}
key) throws Throwable {
default boolean remove(
{{
entity
.
keyField
.
type
.
java
}}
key) throws Throwable {
return IMPService.super.remove(key);
return IMPService.super.remove(key);
}
}
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
default boolean onRemove(
{{
entity
.
keyField
.
type
.
java
}}
key) throws Throwable {
default boolean onRemove(
{{
entity
.
keyField
.
type
.
java
}}
key) throws Throwable {
return IMPService.super.onRemove(key);
return IMPService.super.onRemove(key);
}
}
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
default boolean remove(List keys) throws Throwable {
default boolean remove(List keys) throws Throwable {
return IMPService.super.remove(keys);
return IMPService.super.remove(keys);
}
}
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
default boolean onRemove(List keys) throws Throwable {
default boolean onRemove(List keys) throws Throwable {
return IMPService.super.onRemove(keys);
return IMPService.super.onRemove(keys);
}
}
...
@@ -120,16 +120,16 @@ public interface {{entity.codeName}}Service extends IMPService<{{entity.codeName
...
@@ -120,16 +120,16 @@ public interface {{entity.codeName}}Service extends IMPService<{{entity.codeName
return IMPService.super.onCheckKey(dto);
return IMPService.super.onCheckKey(dto);
}
}
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
default boolean save(
{{
entity
.
codeName
}}
dto) throws Throwable {
default boolean save(
{{
entity
.
codeName
}}
dto) throws Throwable {
return IMPService.super.save(dto);
return IMPService.super.save(dto);
}
}
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
default boolean onSave(
{{
entity
.
codeName
}}
dto) throws Throwable {
default boolean onSave(
{{
entity
.
codeName
}}
dto) throws Throwable {
return IMPService.super.onSave(dto);
return IMPService.super.onSave(dto);
}
}
...
...
modules/ibizlab-template/ibizlab-template-ibizboot/src/main/resources/templ/{{projectName}}-core/src/main/java/{{packageName}}/{{modules}}/service/{{entities@ServiceAPI}}Service.java.hbs
浏览文件 @
74c981f0
...
@@ -53,44 +53,44 @@ public interface {{entity.codeName}}Service extends IServiceApiService<{{entity.
...
@@ -53,44 +53,44 @@ public interface {{entity.codeName}}Service extends IServiceApiService<{{entity.
return IServiceApiService.super.onCreate(dto);
return IServiceApiService.super.onCreate(dto);
}
}
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
default boolean update(
{{
entity
.
codeName
}}
dto) throws Throwable {
default boolean update(
{{
entity
.
codeName
}}
dto) throws Throwable {
return IServiceApiService.super.update(dto);
return IServiceApiService.super.update(dto);
}
}
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
default boolean onUpdate(
{{
entity
.
codeName
}}
dto) throws Throwable {
default boolean onUpdate(
{{
entity
.
codeName
}}
dto) throws Throwable {
return IServiceApiService.super.onUpdate(dto);
return IServiceApiService.super.onUpdate(dto);
}
}
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
default boolean remove(
{{
entity
.
keyField
.
type
.
java
}}
key) throws Throwable {
default boolean remove(
{{
entity
.
keyField
.
type
.
java
}}
key) throws Throwable {
return IServiceApiService.super.remove(key);
return IServiceApiService.super.remove(key);
}
}
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
default boolean onRemove(
{{
entity
.
keyField
.
type
.
java
}}
key) throws Throwable {
default boolean onRemove(
{{
entity
.
keyField
.
type
.
java
}}
key) throws Throwable {
return IServiceApiService.super.onRemove(key);
return IServiceApiService.super.onRemove(key);
}
}
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
default boolean remove(List keys) throws Throwable {
default boolean remove(List keys) throws Throwable {
return IServiceApiService.super.remove(keys);
return IServiceApiService.super.remove(keys);
}
}
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
default boolean onRemove(List keys) throws Throwable {
default boolean onRemove(List keys) throws Throwable {
return IServiceApiService.super.onRemove(keys);
return IServiceApiService.super.onRemove(keys);
}
}
...
@@ -119,16 +119,16 @@ public interface {{entity.codeName}}Service extends IServiceApiService<{{entity.
...
@@ -119,16 +119,16 @@ public interface {{entity.codeName}}Service extends IServiceApiService<{{entity.
return IServiceApiService.super.onCheckKey(dto);
return IServiceApiService.super.onCheckKey(dto);
}
}
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
default boolean save(
{{
entity
.
codeName
}}
dto) throws Throwable {
default boolean save(
{{
entity
.
codeName
}}
dto) throws Throwable {
return IServiceApiService.super.save(dto);
return IServiceApiService.super.save(dto);
}
}
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
default boolean onSave(
{{
entity
.
codeName
}}
dto) throws Throwable {
default boolean onSave(
{{
entity
.
codeName
}}
dto) throws Throwable {
return IServiceApiService.super.onSave(dto);
return IServiceApiService.super.onSave(dto);
}
}
...
...
modules/ibizlab-template/ibizlab-template-ibizedge/src/main/resources/templ/{{projectName}}-core/src/main/java/{{packageName}}/core/{{modules}}/client/{{entities@ServiceAPI}}FeignClient.java.hbs
浏览文件 @
74c981f0
...
@@ -69,21 +69,21 @@ public interface {{entity.codeName}}FeignClient {
...
@@ -69,21 +69,21 @@ public interface {{entity.codeName}}FeignClient {
Integer checkKey(
{{
entity
.
codeName
}}
et);
Integer checkKey(
{{
entity
.
codeName
}}
et);
boolean create(
{{
entity
.
codeName
}}
et);
boolean create(
{{
entity
.
codeName
}}
et);
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
boolean createBatch(List
<
{{
entity
.
codeName
}}
>
list);
boolean createBatch(List
<
{{
entity
.
codeName
}}
>
list);
boolean update(
{{
entity
.
codeName
}}
et);
boolean update(
{{
entity
.
codeName
}}
et);
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
boolean updateBatch(List
<
{{
entity
.
codeName
}}
>
list);
boolean updateBatch(List
<
{{
entity
.
codeName
}}
>
list);
boolean save(
{{
entity
.
codeName
}}
et);
boolean save(
{{
entity
.
codeName
}}
et);
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
boolean saveBatch(List
<
{{
entity
.
codeName
}}
>
list);
boolean saveBatch(List
<
{{
entity
.
codeName
}}
>
list);
default boolean remove(
{{
entity
.
keyField
.
type
.
java
}}
key) {
default boolean remove(
{{
entity
.
keyField
.
type
.
java
}}
key) {
...
@@ -96,9 +96,9 @@ public interface {{entity.codeName}}FeignClient {
...
@@ -96,9 +96,9 @@ public interface {{entity.codeName}}FeignClient {
}
}
boolean remove(
{{
entity
.
codeName
}}
et);
boolean remove(
{{
entity
.
codeName
}}
et);
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
boolean removeBatch(Collection
<
{{
entity
.
keyField
.
type
.
java
}}
>
ids);
boolean removeBatch(Collection
<
{{
entity
.
keyField
.
type
.
java
}}
>
ids);
{{#
each
entity
.
extActions
}}
{{#
each
entity
.
extActions
}}
...
@@ -118,17 +118,17 @@ public interface {{entity.codeName}}FeignClient {
...
@@ -118,17 +118,17 @@ public interface {{entity.codeName}}FeignClient {
{{/
entity
.
dataSets
}}
{{/
entity
.
dataSets
}}
{{#
entity
.
references
}}
{{#
entity
.
references
}}
List
<
{{
entity
.
codeName
}}
>
selectBy
{{
pascalCase
fkField
.
codeName
}}
(
{{
fkField
.
type
.
java
}}
{{
camelCase
fkField
.
codeName
}}
);
List
<
{{
entity
.
codeName
}}
>
selectBy
{{
pascalCase
fkField
.
codeName
}}
(
{{
fkField
.
type
.
java
}}
{{
camelCase
fkField
.
codeName
}}
);
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
boolean removeBy
{{
pascalCase
fkField
.
codeName
}}
(
{{
fkField
.
type
.
java
}}
{{
camelCase
fkField
.
codeName
}}
);
boolean removeBy
{{
pascalCase
fkField
.
codeName
}}
(
{{
fkField
.
type
.
java
}}
{{
camelCase
fkField
.
codeName
}}
);
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
boolean resetBy
{{
pascalCase
fkField
.
codeName
}}
(
{{
fkField
.
type
.
java
}}
{{
camelCase
fkField
.
codeName
}}
);
boolean resetBy
{{
pascalCase
fkField
.
codeName
}}
(
{{
fkField
.
type
.
java
}}
{{
camelCase
fkField
.
codeName
}}
);
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
boolean saveBy
{{
pascalCase
fkField
.
codeName
}}
(
{{
fkField
.
type
.
java
}}
{{
camelCase
fkField
.
codeName
}}
,List
<
{{
entity
.
codeName
}}
>
list);
boolean saveBy
{{
pascalCase
fkField
.
codeName
}}
(
{{
fkField
.
type
.
java
}}
{{
camelCase
fkField
.
codeName
}}
,List
<
{{
entity
.
codeName
}}
>
list);
{{/
entity
.
references
}}
{{/
entity
.
references
}}
...
...
modules/ibizlab-template/ibizlab-template-ibizedge/src/main/resources/templ/{{projectName}}-core/src/main/java/{{packageName}}/core/{{modules}}/mapper/{{entities@SQL}}Mapper.java.hbs
浏览文件 @
74c981f0
...
@@ -30,45 +30,45 @@ public interface {{entity.codeName}}Mapper extends BaseMapper<{{entity.codeName}
...
@@ -30,45 +30,45 @@ public interface {{entity.codeName}}Mapper extends BaseMapper<{{entity.codeName}
{{/
entity
.
dataSets
}}
{{/
entity
.
dataSets
}}
@Override
@Override
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@Cacheable(value = "
{{
lowerCase
entity
.
codeName
}}
", key = "'row:'+#p0")
@Cacheable(value = "
{{
lowerCase
entity
.
codeName
}}
", key = "'row:'+#p0")
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
{{
entity
.
codeName
}}
selectById(Serializable id);
{{
entity
.
codeName
}}
selectById(Serializable id);
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@Cacheable(value = "
{{
lowerCase
entity
.
codeName
}}
", key = "'row:'+#p0.
{{
camelCase
entity
.
keyField
.
codeName
}}
")
@Cacheable(value = "
{{
lowerCase
entity
.
codeName
}}
", key = "'row:'+#p0.
{{
camelCase
entity
.
keyField
.
codeName
}}
")
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
{{
entity
.
codeName
}}
selectEntity(
{{
entity
.
codeName
}}
entity);
{{
entity
.
codeName
}}
selectEntity(
{{
entity
.
codeName
}}
entity);
List
<
{{
entity
.
codeName
}}
>
selectEntities(@Param("list") List
<
{{
entity
.
codeName
}}
>
list);
List
<
{{
entity
.
codeName
}}
>
selectEntities(@Param("list") List
<
{{
entity
.
codeName
}}
>
list);
@Override
@Override
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", key = "'row:'+#p0.
{{
camelCase
entity
.
keyField
.
codeName
}}
")
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", key = "'row:'+#p0.
{{
camelCase
entity
.
keyField
.
codeName
}}
")
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
int insert(
{{
entity
.
codeName
}}
entity);
int insert(
{{
entity
.
codeName
}}
entity);
@Override
@Override
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", key = "'row:'+#p0.
{{
camelCase
entity
.
keyField
.
codeName
}}
")
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", key = "'row:'+#p0.
{{
camelCase
entity
.
keyField
.
codeName
}}
")
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
int updateById(@Param(Constants.ENTITY)
{{
entity
.
codeName
}}
entity);
int updateById(@Param(Constants.ENTITY)
{{
entity
.
codeName
}}
entity);
@Override
@Override
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", key = "'row:'+#p0.
{{
camelCase
entity
.
keyField
.
codeName
}}
", condition ="#p0 != null")
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", key = "'row:'+#p0.
{{
camelCase
entity
.
keyField
.
codeName
}}
", condition ="#p0 != null")
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
int update(@Param(Constants.ENTITY)
{{
entity
.
codeName
}}
entity, @Param("ew") Wrapper
<
{{
entity
.
codeName
}}
>
updateWrapper);
int update(@Param(Constants.ENTITY)
{{
entity
.
codeName
}}
entity, @Param("ew") Wrapper
<
{{
entity
.
codeName
}}
>
updateWrapper);
@Override
@Override
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", key = "'row:'+#p0")
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", key = "'row:'+#p0")
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
int deleteById(Serializable id);
int deleteById(Serializable id);
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
int deleteEntities(@Param("list") List
<
{{
entity
.
codeName
}}
>
list);
int deleteEntities(@Param("list") List
<
{{
entity
.
codeName
}}
>
list);
/**
/**
...
...
modules/ibizlab-template/ibizlab-template-ibizedge/src/main/resources/templ/{{projectName}}-core/src/main/java/{{packageName}}/core/{{modules}}/service/impl/{{entities@SQL}}ServiceBase.java.hbs
浏览文件 @
74c981f0
...
@@ -366,7 +366,7 @@ public class {{entity.codeName}}ServiceBase extends ServiceImpl<{{entity.codeNam
...
@@ -366,7 +366,7 @@ public class {{entity.codeName}}ServiceBase extends ServiceImpl<{{entity.codeNam
return this.update(new UpdateWrapper
<
{{
entity
.
codeName
}}
>
().set("
{{
lowerCase
fkField
.
name
}}
",null).eq("
{{
lowerCase
fkField
.
name
}}
",
{{
camelCase
fkField
.
codeName
}}
));
return this.update(new UpdateWrapper
<
{{
entity
.
codeName
}}
>
().set("
{{
lowerCase
fkField
.
name
}}
",null).eq("
{{
lowerCase
fkField
.
name
}}
",
{{
camelCase
fkField
.
codeName
}}
));
}
}
public boolean saveBy
{{
pascalCase
fkField
.
codeName
}}
(
{{
entityCodeName
}}
{{
camelCase
entityCodeName
}}
,List
<
{{
entity
.
codeName
}}
>
list) {
public boolean saveBy
{{
pascalCase
codeName
}}
(
{{
entityCodeName
}}
{{
camelCase
entityCodeName
}}
,List
<
{{
entity
.
codeName
}}
>
list) {
if(list==null)
if(list==null)
return true;
return true;
Set
<
{{
entity
.
keyField
.
type
.
java
}}
>
delIds=new HashSet
<
{{
entity
.
keyField
.
type
.
java
}}
>
();
Set
<
{{
entity
.
keyField
.
type
.
java
}}
>
delIds=new HashSet
<
{{
entity
.
keyField
.
type
.
java
}}
>
();
...
@@ -397,7 +397,19 @@ public class {{entity.codeName}}ServiceBase extends ServiceImpl<{{entity.codeNam
...
@@ -397,7 +397,19 @@ public class {{entity.codeName}}ServiceBase extends ServiceImpl<{{entity.codeNam
}
}
{{/
entity
.
references
}}
{{/
entity
.
references
}}
{{#
each
entity
.
nesteds
}}
{{#if
listCode
}}
{{#
unless
columnName
}}
public List
<
{{
entityCodeName
}}
>
get
{{
pascalCase
codeName
}}
(
{{
entity
.
codeName
}}
et) {
List
<
{{
entityCodeName
}}
>
list =
{{
camelCase
codeName
}}
Service.selectBy
{{
pascalCase
fkField
.
codeName
}}
(et.get
{{
pascalCase
entity
.
keyField
.
codeName
}}
());
et.set
{{
pascalCase
codeName
}}
(list);
return list;
}
{{/
unless
}}
{{/if}}
{{/
each
}}
{{#if
entity
.
hasPSDEWF
}}
{{#if
entity
.
hasPSDEWF
}}
@Autowired
@Autowired
...
...
modules/ibizlab-template/ibizlab-template-ibizedge/src/main/resources/templ/{{projectName}}-core/src/main/java/{{packageName}}/core/{{modules}}/service/impl/{{entities@ServiceAPI}}ServiceBase.java.hbs
浏览文件 @
74c981f0
...
@@ -199,5 +199,16 @@ public class {{entity.codeName}}ServiceBase implements {{entity.codeName}}Servic
...
@@ -199,5 +199,16 @@ public class {{entity.codeName}}ServiceBase implements {{entity.codeName}}Servic
}
}
{{/
entity
.
references
}}
{{/
entity
.
references
}}
{{#
each
entity
.
nesteds
}}
{{#if
listCode
}}
{{#
unless
columnName
}}
public List
<
{{
entityCodeName
}}
>
get
{{
pascalCase
codeName
}}
(
{{
entity
.
codeName
}}
et) {
return null;
}
{{/
unless
}}
{{/if}}
{{/
each
}}
}
}
\ No newline at end of file
modules/ibizlab-template/ibizlab-template-ibizedge/src/main/resources/templ/{{projectName}}-core/src/main/java/{{packageName}}/core/{{modules}}/service/{{entities@SQL}}Service.java.hbs
浏览文件 @
74c981f0
...
@@ -21,6 +21,9 @@ import cn.ibizlab.util.helper.CachedBeanCopier;
...
@@ -21,6 +21,9 @@ import cn.ibizlab.util.helper.CachedBeanCopier;
import cn.ibizlab.util.security.SpringContextHolder;
import cn.ibizlab.util.security.SpringContextHolder;
import
{{
packageName
}}
.core.
{{
entity
.
module
}}
.domain.
{{
entity
.
codeName
}}
;
import
{{
packageName
}}
.core.
{{
entity
.
module
}}
.domain.
{{
entity
.
codeName
}}
;
import
{{
packageName
}}
.core.
{{
entity
.
module
}}
.filter.
{{
entity
.
codeName
}}
SearchContext;
import
{{
packageName
}}
.core.
{{
entity
.
module
}}
.filter.
{{
entity
.
codeName
}}
SearchContext;
{{#
entity
.
relEntities
}}
import
{{
packageName
}}
.core.
{{
module
}}
.domain.
{{
codeName
}}
;
{{/
entity
.
relEntities
}}
{{#
dsName
}}
{{#
dsName
}}
@DS("
{{
entity
.
dataSource
}}
")
@DS("
{{
entity
.
dataSource
}}
")
...
@@ -53,21 +56,21 @@ public interface {{entity.codeName}}Service extends IService<{{entity.codeName}}
...
@@ -53,21 +56,21 @@ public interface {{entity.codeName}}Service extends IService<{{entity.codeName}}
Integer checkKey(
{{
entity
.
codeName
}}
et);
Integer checkKey(
{{
entity
.
codeName
}}
et);
boolean create(
{{
entity
.
codeName
}}
et);
boolean create(
{{
entity
.
codeName
}}
et);
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
boolean createBatch(List
<
{{
entity
.
codeName
}}
>
list);
boolean createBatch(List
<
{{
entity
.
codeName
}}
>
list);
boolean update(
{{
entity
.
codeName
}}
et);
boolean update(
{{
entity
.
codeName
}}
et);
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
boolean updateBatch(List
<
{{
entity
.
codeName
}}
>
list);
boolean updateBatch(List
<
{{
entity
.
codeName
}}
>
list);
boolean save(
{{
entity
.
codeName
}}
et);
boolean save(
{{
entity
.
codeName
}}
et);
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
boolean saveBatch(List
<
{{
entity
.
codeName
}}
>
list);
boolean saveBatch(List
<
{{
entity
.
codeName
}}
>
list);
default boolean remove(
{{
entity
.
keyField
.
type
.
java
}}
key) {
default boolean remove(
{{
entity
.
keyField
.
type
.
java
}}
key) {
...
@@ -78,6 +81,9 @@ public interface {{entity.codeName}}Service extends IService<{{entity.codeName}}
...
@@ -78,6 +81,9 @@ public interface {{entity.codeName}}Service extends IService<{{entity.codeName}}
default boolean remove(List
<
{{
entity
.
keyField
.
type
.
java
}}
>
key) {
default boolean remove(List
<
{{
entity
.
keyField
.
type
.
java
}}
>
key) {
return removeBatch(key);
return removeBatch(key);
}
}
{{#
entity
.
enableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", key = "'row:'+#p0.
{{
camelCase
entity
.
keyField
.
codeName
}}
")
{{/
entity
.
enableEntityCache
}}
boolean remove(
{{
entity
.
codeName
}}
et);
boolean remove(
{{
entity
.
codeName
}}
et);
default boolean removeBatch(Collection
<
{{
entity
.
keyField
.
type
.
java
}}
>
ids) {
default boolean removeBatch(Collection
<
{{
entity
.
keyField
.
type
.
java
}}
>
ids) {
...
@@ -109,26 +115,34 @@ public interface {{entity.codeName}}Service extends IService<{{entity.codeName}}
...
@@ -109,26 +115,34 @@ public interface {{entity.codeName}}Service extends IService<{{entity.codeName}}
{{/
entity
.
dataSets
}}
{{/
entity
.
dataSets
}}
{{#
entity
.
references
}}
{{#
entity
.
references
}}
List
<
{{
entity
.
codeName
}}
>
selectBy
{{
pascalCase
fkField
.
codeName
}}
(
{{
fkField
.
type
.
java
}}
{{
camelCase
fkField
.
codeName
}}
);
List
<
{{
entity
.
codeName
}}
>
selectBy
{{
pascalCase
fkField
.
codeName
}}
(
{{
fkField
.
type
.
java
}}
{{
camelCase
fkField
.
codeName
}}
);
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
boolean removeBy
{{
pascalCase
fkField
.
codeName
}}
(
{{
fkField
.
type
.
java
}}
{{
camelCase
fkField
.
codeName
}}
);
boolean removeBy
{{
pascalCase
fkField
.
codeName
}}
(
{{
fkField
.
type
.
java
}}
{{
camelCase
fkField
.
codeName
}}
);
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
boolean resetBy
{{
pascalCase
fkField
.
codeName
}}
(
{{
fkField
.
type
.
java
}}
{{
camelCase
fkField
.
codeName
}}
);
boolean resetBy
{{
pascalCase
fkField
.
codeName
}}
(
{{
fkField
.
type
.
java
}}
{{
camelCase
fkField
.
codeName
}}
);
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
boolean saveBy
{{
pascalCase
fkField
.
codeName
}}
(
{{
packageName
}}
.core.
{{
module
}}
.domain.
{{
entityCodeName
}}
{{
camelCase
entityCodeName
}}
,List
<
{{
entity
.
codeName
}}
>
list);
boolean saveBy
{{
pascalCase
codeName
}}
(
{{
packageName
}}
.core.
{{
module
}}
.domain.
{{
entityCodeName
}}
{{
camelCase
entityCodeName
}}
,List
<
{{
entity
.
codeName
}}
>
list);
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
default boolean saveBy
{{
pascalCase
fkField
.
codeName
}}
(
{{
fkField
.
type
.
java
}}
{{
camelCase
fkField
.
codeName
}}
,List
<
{{
entity
.
codeName
}}
>
list) {
default boolean saveBy
{{
pascalCase
fkField
.
codeName
}}
(
{{
fkField
.
type
.
java
}}
{{
camelCase
fkField
.
codeName
}}
,List
<
{{
entity
.
codeName
}}
>
list) {
{{
packageName
}}
.core.
{{
module
}}
.domain.
{{
entityCodeName
}}
et = new
{{
packageName
}}
.core.
{{
module
}}
.domain.
{{
entityCodeName
}}
();
{{
packageName
}}
.core.
{{
module
}}
.domain.
{{
entityCodeName
}}
et = new
{{
packageName
}}
.core.
{{
module
}}
.domain.
{{
entityCodeName
}}
();
et.set
{{
pascalCase
relEntity
.
keyField
.
codeName
}}
(
{{
camelCase
fkField
.
codeName
}}
);
et.set
{{
pascalCase
relEntity
.
keyField
.
codeName
}}
(
{{
camelCase
fkField
.
codeName
}}
);
return getSelf().saveBy
{{
pascalCase
fkField
.
codeName
}}
(et,list);
return getSelf().saveBy
{{
pascalCase
codeName
}}
(et,list);
}
}
{{/
entity
.
references
}}
{{/
entity
.
references
}}
{{#
each
entity
.
nesteds
}}
{{#if
listCode
}}
{{#
unless
columnName
}}
List
<
{{
entityCodeName
}}
>
get
{{
pascalCase
codeName
}}
(
{{
entity
.
codeName
}}
et);
{{/
unless
}}
{{/if}}
{{/
each
}}
}
}
\ No newline at end of file
modules/ibizlab-template/ibizlab-template-ibizedge/src/main/resources/templ/{{projectName}}-core/src/main/java/{{packageName}}/core/{{modules}}/service/{{entities@ServiceAPI}}Service.java.hbs
浏览文件 @
74c981f0
...
@@ -21,6 +21,9 @@ import cn.ibizlab.util.helper.CachedBeanCopier;
...
@@ -21,6 +21,9 @@ import cn.ibizlab.util.helper.CachedBeanCopier;
import cn.ibizlab.util.security.SpringContextHolder;
import cn.ibizlab.util.security.SpringContextHolder;
import
{{
packageName
}}
.core.
{{
entity
.
module
}}
.domain.
{{
entity
.
codeName
}}
;
import
{{
packageName
}}
.core.
{{
entity
.
module
}}
.domain.
{{
entity
.
codeName
}}
;
import
{{
packageName
}}
.core.
{{
entity
.
module
}}
.filter.
{{
entity
.
codeName
}}
SearchContext;
import
{{
packageName
}}
.core.
{{
entity
.
module
}}
.filter.
{{
entity
.
codeName
}}
SearchContext;
{{#
entity
.
relEntities
}}
import
{{
packageName
}}
.core.
{{
module
}}
.domain.
{{
codeName
}}
;
{{/
entity
.
relEntities
}}
{{#
dsName
}}
{{#
dsName
}}
@DS("
{{
entity
.
dataSource
}}
")
@DS("
{{
entity
.
dataSource
}}
")
...
@@ -53,21 +56,21 @@ public interface {{entity.codeName}}Service {
...
@@ -53,21 +56,21 @@ public interface {{entity.codeName}}Service {
Integer checkKey(
{{
entity
.
codeName
}}
et);
Integer checkKey(
{{
entity
.
codeName
}}
et);
boolean create(
{{
entity
.
codeName
}}
et);
boolean create(
{{
entity
.
codeName
}}
et);
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
boolean createBatch(List
<
{{
entity
.
codeName
}}
>
list);
boolean createBatch(List
<
{{
entity
.
codeName
}}
>
list);
boolean update(
{{
entity
.
codeName
}}
et);
boolean update(
{{
entity
.
codeName
}}
et);
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
boolean updateBatch(List
<
{{
entity
.
codeName
}}
>
list);
boolean updateBatch(List
<
{{
entity
.
codeName
}}
>
list);
boolean save(
{{
entity
.
codeName
}}
et);
boolean save(
{{
entity
.
codeName
}}
et);
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
boolean saveBatch(List
<
{{
entity
.
codeName
}}
>
list);
boolean saveBatch(List
<
{{
entity
.
codeName
}}
>
list);
default boolean remove(
{{
entity
.
keyField
.
type
.
java
}}
key) {
default boolean remove(
{{
entity
.
keyField
.
type
.
java
}}
key) {
...
@@ -78,6 +81,9 @@ public interface {{entity.codeName}}Service {
...
@@ -78,6 +81,9 @@ public interface {{entity.codeName}}Service {
default boolean remove(List
<
{{
entity
.
keyField
.
type
.
java
}}
>
key) {
default boolean remove(List
<
{{
entity
.
keyField
.
type
.
java
}}
>
key) {
return removeBatch(key);
return removeBatch(key);
}
}
{{#
entity
.
enableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", key = "'row:'+#p0.
{{
camelCase
entity
.
keyField
.
codeName
}}
")
{{/
entity
.
enableEntityCache
}}
boolean remove(
{{
entity
.
codeName
}}
et);
boolean remove(
{{
entity
.
codeName
}}
et);
default boolean removeBatch(Collection
<
{{
entity
.
keyField
.
type
.
java
}}
>
ids) {
default boolean removeBatch(Collection
<
{{
entity
.
keyField
.
type
.
java
}}
>
ids) {
...
@@ -109,18 +115,26 @@ public interface {{entity.codeName}}Service {
...
@@ -109,18 +115,26 @@ public interface {{entity.codeName}}Service {
{{/
entity
.
dataSets
}}
{{/
entity
.
dataSets
}}
{{#
entity
.
references
}}
{{#
entity
.
references
}}
List
<
{{
entity
.
codeName
}}
>
selectBy
{{
pascalCase
fkField
.
codeName
}}
(
{{
fkField
.
type
.
java
}}
{{
camelCase
fkField
.
codeName
}}
);
List
<
{{
entity
.
codeName
}}
>
selectBy
{{
pascalCase
fkField
.
codeName
}}
(
{{
fkField
.
type
.
java
}}
{{
camelCase
fkField
.
codeName
}}
);
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
boolean removeBy
{{
pascalCase
fkField
.
codeName
}}
(
{{
fkField
.
type
.
java
}}
{{
camelCase
fkField
.
codeName
}}
);
boolean removeBy
{{
pascalCase
fkField
.
codeName
}}
(
{{
fkField
.
type
.
java
}}
{{
camelCase
fkField
.
codeName
}}
);
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
boolean resetBy
{{
pascalCase
fkField
.
codeName
}}
(
{{
fkField
.
type
.
java
}}
{{
camelCase
fkField
.
codeName
}}
);
boolean resetBy
{{
pascalCase
fkField
.
codeName
}}
(
{{
fkField
.
type
.
java
}}
{{
camelCase
fkField
.
codeName
}}
);
{{#
enableEntityCache
}}
{{#
en
tity
.
en
ableEntityCache
}}
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
@CacheEvict(value = "
{{
lowerCase
entity
.
codeName
}}
", allEntries = true)
{{/
enableEntityCache
}}
{{/
en
tity
.
en
ableEntityCache
}}
boolean saveBy
{{
pascalCase
fkField
.
codeName
}}
(
{{
fkField
.
type
.
java
}}
{{
camelCase
fkField
.
codeName
}}
,List
<
{{
entity
.
codeName
}}
>
list);
boolean saveBy
{{
pascalCase
fkField
.
codeName
}}
(
{{
fkField
.
type
.
java
}}
{{
camelCase
fkField
.
codeName
}}
,List
<
{{
entity
.
codeName
}}
>
list);
{{/
entity
.
references
}}
{{/
entity
.
references
}}
{{#
each
entity
.
nesteds
}}
{{#if
listCode
}}
{{#
unless
columnName
}}
List
<
{{
entityCodeName
}}
>
get
{{
pascalCase
codeName
}}
(
{{
entity
.
codeName
}}
et);
{{/
unless
}}
{{/if}}
{{/
each
}}
}
}
\ No newline at end of file
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录