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

从接口测试行为

上级 981dcd38
...@@ -2313,19 +2313,16 @@ ${deaction.getRender().code} ...@@ -2313,19 +2313,16 @@ ${deaction.getRender().code}
<#if deaction.isEnableBackend() && deaction.getTestActionMode?? && deaction.getTestActionMode()??> <#if deaction.isEnableBackend() && deaction.getTestActionMode?? && deaction.getTestActionMode()??>
<#if deaction.getTestActionMode() ==1 || deaction.getTestActionMode() ==3> <#if deaction.getTestActionMode() ==1 || deaction.getTestActionMode() ==3>
<#if (deaction.getActionType()=='USERCUSTOM')> <#if (deaction.getActionType()=='USERCUSTOM')>
@Transactional
public boolean test${srfmethodname(deaction.getCodeName())?cap_first}(${item.getCodeName()} et) { public boolean test${srfmethodname(deaction.getCodeName())?cap_first}(${item.getCodeName()} et) {
return true; return true;
} }
<#elseif deaction.getActionType()=='DELOGIC'> <#elseif deaction.getActionType()=='DELOGIC'>
@Transactional
public boolean test${srfmethodname(deaction.getCodeName())?cap_first}(${item.getCodeName()} et) { public boolean test${srfmethodname(deaction.getCodeName())?cap_first}(${item.getCodeName()} et) {
return true; return true;
} }
<#elseif deaction.getCodeName()?lower_case == 'get'> <#elseif deaction.getCodeName()?lower_case == 'get'>
@Transactional
public boolean testGet(${srfjavatype(keyfield.stdDataType)} key) { public boolean testGet(${srfjavatype(keyfield.stdDataType)} key) {
return true; return true;
} }
...@@ -2335,7 +2332,6 @@ ${deaction.getRender().code} ...@@ -2335,7 +2332,6 @@ ${deaction.getRender().code}
<#elseif deaction.getCodeName()?lower_case == "removebatch"> <#elseif deaction.getCodeName()?lower_case == "removebatch">
<#elseif deaction.getCodeName()?lower_case == "savebatch"> <#elseif deaction.getCodeName()?lower_case == "savebatch">
<#elseif deaction.getCodeName()?lower_case == "create"> <#elseif deaction.getCodeName()?lower_case == "create">
@Transactional
public boolean testCreate(${item.getCodeName()} et) { public boolean testCreate(${item.getCodeName()} et) {
return true; return true;
} }
...@@ -2345,7 +2341,6 @@ ${deaction.getRender().code} ...@@ -2345,7 +2341,6 @@ ${deaction.getRender().code}
} }
<#elseif deaction.getCodeName()?lower_case == "update"> <#elseif deaction.getCodeName()?lower_case == "update">
@Transactional
public boolean testUpdate(${item.getCodeName()} et) { public boolean testUpdate(${item.getCodeName()} et) {
return true; return true;
} }
...@@ -2355,14 +2350,10 @@ ${deaction.getRender().code} ...@@ -2355,14 +2350,10 @@ ${deaction.getRender().code}
} }
<#elseif deaction.getCodeName()?lower_case == "save"> <#elseif deaction.getCodeName()?lower_case == "save">
@Transactional
public boolean testSave(${item.getCodeName()} et) { public boolean testSave(${item.getCodeName()} et) {
return true; return true;
} }
@Transactional(
rollbackFor = {Exception.class}
)
public boolean testSaveOrUpdate(${item.getCodeName()} et) { public boolean testSaveOrUpdate(${item.getCodeName()} et) {
return true; return true;
} }
...@@ -2376,7 +2367,6 @@ ${deaction.getRender().code} ...@@ -2376,7 +2367,6 @@ ${deaction.getRender().code}
} }
<#elseif deaction.getCodeName()?lower_case == "remove"> <#elseif deaction.getCodeName()?lower_case == "remove">
@Transactional
public boolean testRemove(${srfjavatype(keyfield.stdDataType)} key) { public boolean testRemove(${srfjavatype(keyfield.stdDataType)} key) {
return true; return true;
} }
...@@ -2396,7 +2386,6 @@ ${deaction.getRender().code} ...@@ -2396,7 +2386,6 @@ ${deaction.getRender().code}
} }
<#else> <#else>
@Transactional
public boolean test${srfmethodname(deaction.getCodeName())?cap_first}(${item.getCodeName()} et) { public boolean test${srfmethodname(deaction.getCodeName())?cap_first}(${item.getCodeName()} et) {
return true; return true;
} }
......
...@@ -73,21 +73,18 @@ public class ${item.codeName}ExService extends ${item.codeName}ServiceImpl { ...@@ -73,21 +73,18 @@ public class ${item.codeName}ExService extends ${item.codeName}ServiceImpl {
<#if deaction.getTestActionMode() ==1 || deaction.getTestActionMode() ==3> <#if deaction.getTestActionMode() ==1 || deaction.getTestActionMode() ==3>
<#if (deaction.getActionType()=='USERCUSTOM')> <#if (deaction.getActionType()=='USERCUSTOM')>
@Override @Override
@Transactional
public boolean test${srfmethodname(deaction.getCodeName())?cap_first}(${item.getCodeName()} et) { public boolean test${srfmethodname(deaction.getCodeName())?cap_first}(${item.getCodeName()} et) {
return super.test${srfmethodname(deaction.getCodeName())?cap_first}(et); return super.test${srfmethodname(deaction.getCodeName())?cap_first}(et);
} }
<#elseif deaction.getActionType()=='DELOGIC'> <#elseif deaction.getActionType()=='DELOGIC'>
@Override @Override
@Transactional
public boolean test${srfmethodname(deaction.getCodeName())?cap_first}(${item.getCodeName()} et) { public boolean test${srfmethodname(deaction.getCodeName())?cap_first}(${item.getCodeName()} et) {
return super.test${srfmethodname(deaction.getCodeName())?cap_first}(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
public boolean testGet(${srfjavatype(keyfield.stdDataType)} key) { public boolean testGet(${srfjavatype(keyfield.stdDataType)} key) {
return super.testGet(key); return super.testGet(key);
} }
...@@ -98,7 +95,6 @@ public class ${item.codeName}ExService extends ${item.codeName}ServiceImpl { ...@@ -98,7 +95,6 @@ public class ${item.codeName}ExService extends ${item.codeName}ServiceImpl {
<#elseif deaction.getCodeName()?lower_case == "savebatch"> <#elseif deaction.getCodeName()?lower_case == "savebatch">
<#elseif deaction.getCodeName()?lower_case == "create"> <#elseif deaction.getCodeName()?lower_case == "create">
@Override @Override
@Transactional
public boolean testCreate(${item.getCodeName()} et) { public boolean testCreate(${item.getCodeName()} et) {
return super.testCreate(et); return super.testCreate(et);
} }
...@@ -110,7 +106,6 @@ public class ${item.codeName}ExService extends ${item.codeName}ServiceImpl { ...@@ -110,7 +106,6 @@ public class ${item.codeName}ExService extends ${item.codeName}ServiceImpl {
<#elseif deaction.getCodeName()?lower_case == "update"> <#elseif deaction.getCodeName()?lower_case == "update">
@Override @Override
@Transactional
public boolean testUpdate(${item.getCodeName()} et) { public boolean testUpdate(${item.getCodeName()} et) {
return super.testUpdate(et); return super.testUpdate(et);
} }
...@@ -122,15 +117,11 @@ public class ${item.codeName}ExService extends ${item.codeName}ServiceImpl { ...@@ -122,15 +117,11 @@ public class ${item.codeName}ExService extends ${item.codeName}ServiceImpl {
<#elseif deaction.getCodeName()?lower_case == "save"> <#elseif deaction.getCodeName()?lower_case == "save">
@Override @Override
@Transactional
public boolean testSave(${item.getCodeName()} et) { public boolean testSave(${item.getCodeName()} et) {
return super.testSave(et); return super.testSave(et);
} }
@Override @Override
@Transactional(
rollbackFor = {Exception.class}
)
public boolean testSaveOrUpdate(${item.getCodeName()} et) { public boolean testSaveOrUpdate(${item.getCodeName()} et) {
return super.testSaveOrUpdate(et); return super.testSaveOrUpdate(et);
} }
...@@ -147,7 +138,6 @@ public class ${item.codeName}ExService extends ${item.codeName}ServiceImpl { ...@@ -147,7 +138,6 @@ public class ${item.codeName}ExService extends ${item.codeName}ServiceImpl {
<#elseif deaction.getCodeName()?lower_case == "remove"> <#elseif deaction.getCodeName()?lower_case == "remove">
@Override @Override
@Transactional
public boolean testRemove(${srfjavatype(keyfield.stdDataType)} key) { public boolean testRemove(${srfjavatype(keyfield.stdDataType)} key) {
return super.testRemove(key); return super.testRemove(key);
} }
...@@ -171,7 +161,6 @@ public class ${item.codeName}ExService extends ${item.codeName}ServiceImpl { ...@@ -171,7 +161,6 @@ public class ${item.codeName}ExService extends ${item.codeName}ServiceImpl {
<#else> <#else>
@Override @Override
@Transactional
public boolean test${srfmethodname(deaction.getCodeName())?cap_first}(${item.getCodeName()} et) { public boolean test${srfmethodname(deaction.getCodeName())?cap_first}(${item.getCodeName()} et) {
return super.test${srfmethodname(deaction.getCodeName())?cap_first}(et); return super.test${srfmethodname(deaction.getCodeName())?cap_first}(et);
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册