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

从接口测试行为

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