提交 146a79de 编写于 作者: zhouweidong's avatar zhouweidong

关系删除、缓存

上级 e60eb10d
......@@ -53,7 +53,7 @@ public interface ${item.getCodeName()}Mapper extends BaseMapper<${item.getCodeNa
int updateById(@Param(Constants.ENTITY) ${item.getCodeName()} entity);
@Override
<#if item.isEnableEntityCache()==true>
@CacheEvict(value ="${item.codeName?lower_case}", key = "'row:'+#p0.${keyfieldCodeName}")
@CacheEvict(value ="${item.codeName?lower_case}", key = "'row:'+#p0.${keyfieldCodeName}" ,condition ="#p0 != null")
</#if>
int update(@Param(Constants.ENTITY) ${item.getCodeName()} entity, @Param("ew") Wrapper<${item.codeName}> updateWrapper);
@Override
......
......@@ -191,7 +191,9 @@ public interface I${item.codeName}Service {
<#if MinorPSDER.getRemoveActionType()?c=='3'><#comment>限制删除</#comment>
List<${item.getCodeName()}> selectBy${srfr7templcaseformat(MajorField.codeName)?cap_first}(Collection<${srfr7javatype(MajorField.stdDataType)}> ids);
<#elseif MinorPSDER.getRemoveActionType()?c=='2'><#comment>置空</#comment>
@CacheEvict(value = "${item.codeName?lower_case}", allEntries = true)
void resetBy${srfr7templcaseformat(MajorField.codeName)?cap_first}(${srfr7javatype(MajorField.stdDataType)} ${MajorkeyField.codeName?lower_case});
@CacheEvict(value = "${item.codeName?lower_case}", allEntries = true)
void resetBy${srfr7templcaseformat(MajorField.codeName)?cap_first}(Collection<${srfr7javatype(MajorField.stdDataType)}> ids);
<#elseif MinorPSDER.getRemoveActionType()?c=='1'><#comment>同时删除</#comment>
<#if item.isEnableEntityCache()==true>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册