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

test行为用户扩展

上级 e7407980
...@@ -20,6 +20,7 @@ import ${pub.getPKGCodeName()}.core.${item.getPSSystemModule().getCodeName()?low ...@@ -20,6 +20,7 @@ import ${pub.getPKGCodeName()}.core.${item.getPSSystemModule().getCodeName()?low
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.context.annotation.Primary; import org.springframework.context.annotation.Primary;
import java.util.*;
/** /**
* 实体[${item.getLogicName()}] 自定义服务对象 * 实体[${item.getLogicName()}] 自定义服务对象
...@@ -68,21 +69,21 @@ public class ${item.codeName}ServiceEx extends ${item.codeName}ServiceImpl { ...@@ -68,21 +69,21 @@ public class ${item.codeName}ServiceEx extends ${item.codeName}ServiceImpl {
@Override @Override
@Transactional @Transactional
public ${item.getCodeName()} test${srfmethodname(deaction.getCodeName())?cap_first}(${item.getCodeName()} et) { public ${item.getCodeName()} test${srfmethodname(deaction.getCodeName())?cap_first}(${item.getCodeName()} et) {
return et; return super.test${srfmethodname(deaction.getCodeName())?cap_first}(et);
} }
<#elseif deaction.getActionType()=='DELOGIC'> <#elseif deaction.getActionType()=='DELOGIC'>
@Override @Override
@Transactional @Transactional
public ${item.getCodeName()} test${srfmethodname(deaction.getCodeName())?cap_first}(${item.getCodeName()} et) { public ${item.getCodeName()} test${srfmethodname(deaction.getCodeName())?cap_first}(${item.getCodeName()} et) {
return et ; return super.test${srfmethodname(deaction.getCodeName())?cap_first}(et);
} }
<#elseif deaction.getCodeName()?lower_case == 'get'> <#elseif deaction.getCodeName()?lower_case == 'get'>
@Override @Override
@Transactional @Transactional
public ${item.getCodeName()} testGet(${srfjavatype(keyfield.stdDataType)} key) { public ${item.getCodeName()} testGet(${srfjavatype(keyfield.stdDataType)} key) {
return et; return super.testGet(key);
} }
<#elseif deaction.getCodeName()?lower_case == "createbatch"> <#elseif deaction.getCodeName()?lower_case == "createbatch">
...@@ -93,82 +94,80 @@ public class ${item.codeName}ServiceEx extends ${item.codeName}ServiceImpl { ...@@ -93,82 +94,80 @@ public class ${item.codeName}ServiceEx extends ${item.codeName}ServiceImpl {
@Override @Override
@Transactional @Transactional
public boolean testCreate(${item.getCodeName()} et) { public boolean testCreate(${item.getCodeName()} et) {
return true; return super.testCreate(et);
} }
@Override @Override
public void testCreateBatch(List<${item.getCodeName()}> list) { public void testCreateBatch(List<${item.getCodeName()}> list) {
super.testCreateBatch(list);
} }
<#elseif deaction.getCodeName()?lower_case == "update"> <#elseif deaction.getCodeName()?lower_case == "update">
@Override @Override
@Transactional @Transactional
public boolean testUpdate(${item.getCodeName()} et) { public boolean testUpdate(${item.getCodeName()} et) {
return true; return super.testUpdate(et);
} }
@Override @Override
public void testUpdateBatch(List<${item.getCodeName()}> list) { public void testUpdateBatch(List<${item.getCodeName()}> list) {
super.testUpdateBatch(list);
} }
<#elseif deaction.getCodeName()?lower_case == "save"> <#elseif deaction.getCodeName()?lower_case == "save">
@Override @Override
@Transactional @Transactional
public boolean testSave(${item.getCodeName()} et) { public boolean testSave(${item.getCodeName()} et) {
return true; return super.testSave(et);
} }
@Override @Override
@Transactional( @Transactional(
rollbackFor = {Exception.class} rollbackFor = {Exception.class}
) )
@Override
public boolean testSaveOrUpdate(${item.getCodeName()} et) { public boolean testSaveOrUpdate(${item.getCodeName()} et) {
return true; return super.testSaveOrUpdate(et);
} }
@Override @Override
public boolean testSaveBatch(Collection<${item.getCodeName()}> list) { public boolean testSaveBatch(Collection<${item.getCodeName()}> list) {
return true; return super.testSaveBatch(list);
} }
@Override @Override
public void testSaveBatch(List<${item.getCodeName()}> list) { public void testSaveBatch(List<${item.getCodeName()}> list) {
super.testSaveBatch(list);
} }
<#elseif deaction.getCodeName()?lower_case == "remove"> <#elseif deaction.getCodeName()?lower_case == "remove">
@Override @Override
@Transactional @Transactional
public boolean testRemove(${srfjavatype(keyfield.stdDataType)} key) { public boolean testRemove(${srfjavatype(keyfield.stdDataType)} key) {
return result ; return super.testRemove(key);
} }
@Override @Override
public void testRemoveBatch(Collection<${srfjavatype(keyfield.stdDataType)}> idList) { public void testRemoveBatch(Collection<${srfjavatype(keyfield.stdDataType)}> idList) {
super.testRemoveBatch(idList);
} }
<#elseif deaction.getCodeName()?lower_case == "getdraft"> <#elseif deaction.getCodeName()?lower_case == "getdraft">
@Override @Override
public ${item.getCodeName()} testGetDraft(${item.getCodeName()} et) { public ${item.getCodeName()} testGetDraft(${item.getCodeName()} et) {
return et; return super.testGetDraft(et);
} }
<#elseif deaction.getCodeName()?lower_case == "checkkey"> <#elseif deaction.getCodeName()?lower_case == "checkkey">
@Override @Override
public boolean testCheckKey(${item.getCodeName()} et) { public boolean testCheckKey(${item.getCodeName()} et) {
return true; return super.testCheckKey(et);
} }
<#else> <#else>
@Override @Override
@Transactional @Transactional
public ${item.getCodeName()} test${srfmethodname(deaction.getCodeName())?cap_first}(${item.getCodeName()} et) { public ${item.getCodeName()} test${srfmethodname(deaction.getCodeName())?cap_first}(${item.getCodeName()} et) {
return et; return super.test${srfmethodname(deaction.getCodeName())?cap_first}(et);
} }
</#if> </#if>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册