提交 f2364dc5 编写于 作者: xignzi006's avatar xignzi006 🇨🇳

去除@Transactional

上级 566a3861
......@@ -43,7 +43,6 @@ import com.alibaba.fastjson.JSONObject;
import javax.servlet.ServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
<#if de.getStorageMode()==4><#else>import org.springframework.transaction.annotation.Transactional;</#if>
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.http.HttpStatus;
......@@ -155,7 +154,6 @@ public class ${itemCodeName}Resource {
<@SecurityAnnotation deaction/>
@ApiOperation(value = "新建${deLogicName}", tags = {"${deLogicName}" }, notes = "新建${deLogicName}")
@RequestMapping(method = RequestMethod.POST, value = "${fullPath}")
<#if de.getStorageMode()==4><#else> @Transactional</#if>
public ResponseEntity<${itemCodeName}DTO> create(${etParams}) {
${deCodeName} domain = ${itemCodeNameLC}Mapping.toDomain(${itemCodeNameLC}dto);
${deCodeNameLC}Service.create(domain);
......@@ -176,7 +174,6 @@ public class ${itemCodeName}Resource {
<@SecurityAnnotation deaction/>
@ApiOperation(value = "更新${deLogicName}", tags = {"${deLogicName}" }, notes = "更新${deLogicName}")
@RequestMapping(method = RequestMethod.PUT, value = "${fullPath}/{${itemCodeNameLC + keyCNLC}}")
<#if de.getStorageMode()==4><#else> @Transactional</#if>
public ResponseEntity<${itemCodeName}DTO> update(${id_etParams}) {
${deCodeName} domain = ${itemCodeNameLC}Mapping.toDomain(${itemCodeNameLC}dto);
domain .set${dePKCodeName}(${itemCodeNameLC + keyCNLC});
......@@ -213,7 +210,6 @@ public class ${itemCodeName}Resource {
<@SecurityAnnotation deaction/>
@ApiOperation(value = "删除${deLogicName}", tags = {"${deLogicName}" }, notes = "删除${deLogicName}")
@RequestMapping(method = RequestMethod.DELETE, value = "${fullPath}/{${itemCodeNameLC + keyCNLC}}")
<#if de.getStorageMode()==4><#else> @Transactional</#if>
public ResponseEntity<Boolean> remove(${idParams}) {
return ResponseEntity.status(HttpStatus.OK).body(${deCodeNameLC}Service.remove(${itemCodeNameLC + keyCNLC}));
}
......@@ -259,7 +255,6 @@ public class ${itemCodeName}Resource {
<@SecurityAnnotation deaction/>
@ApiOperation(value = "${deaction.getLogicName()}", tags = {"${deLogicName}" }, notes = "${deaction.getLogicName()}")
@RequestMapping(method = RequestMethod.${reqMtd}, value = "${fullPath}<#if deaction.getRequestParamType() == 'NOKEY'><#else>/{${itemCodeNameLC + keyCNLC}}</#if>/${deactionCodeName?lower_case}")
<#if de.getStorageMode()==4><#else> @Transactional</#if>
public ResponseEntity<${itemCodeName}DTO> ${deactionCodeName?uncap_first}(<#if deaction.getRequestParamType() == 'NOKEY'>${id_etParams4}<#else>${id_etParams}</#if>) {
${deCodeName} domain = ${itemCodeNameLC}Mapping.toDomain(${itemCodeNameLC}dto);
<#if deaction.getRequestParamType() == 'NOKEY'><#else>domain.set${dePKCodeName}(${itemCodeNameLC + keyCNLC});</#if>
......@@ -405,7 +400,6 @@ public class ${itemCodeName}Resource {
<@SecurityAnnotation deaction/>
@ApiOperation(value = "${byTagParams}建立${deLogicName}", tags = {"${deLogicName}" }, notes = "${byTagParams}建立${deLogicName}")
@RequestMapping(method = RequestMethod.POST, value = "${fullPath}")
<#if de.getStorageMode()==4><#else> @Transactional</#if>
public ResponseEntity<${itemCodeName}DTO> ${deactionCodeName?uncap_first}${byParams}(${etParams}) {
${deCodeName} domain = ${itemCodeNameLC}Mapping.toDomain(${itemCodeNameLC}dto);
${parentSetParams}
......@@ -431,7 +425,6 @@ public class ${itemCodeName}Resource {
<@SecurityAnnotation deaction/>
@ApiOperation(value = "${byTagParams}更新${deLogicName}", tags = {"${deLogicName}" }, notes = "${byTagParams}更新${deLogicName}")
@RequestMapping(method = RequestMethod.PUT, value = "${fullPath}/{${itemCodeNameLC + keyCNLC}}")
<#if de.getStorageMode()==4><#else> @Transactional</#if>
public ResponseEntity<${itemCodeName}DTO> ${deactionCodeName?uncap_first}${byParams}(${id_etParams}) {
${deCodeName} domain = ${itemCodeNameLC}Mapping.toDomain(${itemCodeNameLC}dto);
${parentSetParams}
......@@ -496,7 +489,6 @@ public class ${itemCodeName}Resource {
<@SecurityAnnotation deaction/>
@ApiOperation(value = "${byTagParams}删除${deLogicName}", tags = {"${deLogicName}" }, notes = "${byTagParams}删除${deLogicName}")
@RequestMapping(method = RequestMethod.DELETE, value = "${fullPath}/{${itemCodeNameLC + keyCNLC}}")
<#if de.getStorageMode()==4><#else> @Transactional</#if>
public ResponseEntity<Boolean> ${deactionCodeName?uncap_first}${byParams}(${idParams}) {
return ResponseEntity.status(HttpStatus.OK).body(${deCodeNameLC}Service.remove(${itemCodeNameLC + keyCNLC}));
}
......@@ -566,7 +558,6 @@ public class ${itemCodeName}Resource {
<@SecurityAnnotation deaction/>
@ApiOperation(value = "${byTagParams}${deLogicName}", tags = {"${deLogicName}" }, notes = "${byTagParams}${deLogicName}")
@RequestMapping(method = RequestMethod.${reqMtd}, value = "${fullPath}<#if deaction.getRequestParamType() == 'NOKEY'><#else>/{${itemCodeNameLC + keyCNLC}}</#if>/${deactionCodeName?lower_case}")
<#if de.getStorageMode()==4><#else> @Transactional</#if>
public ResponseEntity<${itemCodeName}DTO> ${deactionCodeName?uncap_first}${byParams}(<#if deaction.getRequestParamType() == 'NOKEY'>${id_etParams4}<#else>${id_etParams}</#if>) {
${deCodeName} domain = ${itemCodeNameLC}Mapping.toDomain(${itemCodeNameLC}dto);
${parentSetParams}
......@@ -731,7 +722,6 @@ public class ${itemCodeName}Resource {
<@SecurityAnnotation deaction/>
@ApiOperation(value = "新建${deLogicName}", tags = {"${deLogicName}" }, notes = "新建${deLogicName}")
@RequestMapping(method = RequestMethod.POST, value = "${fullPath}/test")
<#if de.getStorageMode()==4><#else> @Transactional</#if>
public ResponseEntity<Boolean> testCreate(${etParams}) {
return ResponseEntity.status(HttpStatus.OK).body(${deCodeNameLC}Service.testCreate(${itemCodeNameLC}Mapping.toDomain(${itemCodeNameLC}dto)));
}
......@@ -747,7 +737,6 @@ public class ${itemCodeName}Resource {
<@SecurityAnnotation deaction/>
@ApiOperation(value = "更新${deLogicName}", tags = {"${deLogicName}" }, notes = "更新${deLogicName}")
@RequestMapping(method = RequestMethod.PUT, value = "${fullPath}/{${itemCodeNameLC + keyCNLC}}/test")
<#if de.getStorageMode()==4><#else> @Transactional</#if>
public ResponseEntity<Boolean> testUpdate(${id_etParams}) {
${deCodeName} domain = ${itemCodeNameLC}Mapping.toDomain(${itemCodeNameLC}dto);
domain .set${dePKCodeName}(${itemCodeNameLC + keyCNLC});
......@@ -780,7 +769,6 @@ public class ${itemCodeName}Resource {
<@SecurityAnnotation deaction/>
@ApiOperation(value = "删除${deLogicName}", tags = {"${deLogicName}" }, notes = "删除${deLogicName}")
@RequestMapping(method = RequestMethod.DELETE, value = "${fullPath}/{${itemCodeNameLC + keyCNLC}}/test")
<#if de.getStorageMode()==4><#else> @Transactional</#if>
public ResponseEntity<Boolean> testRemove(${idParams}) {
return ResponseEntity.status(HttpStatus.OK).body(${deCodeNameLC}Service.testRemove(${itemCodeNameLC + keyCNLC}));
}
......@@ -823,7 +811,6 @@ public class ${itemCodeName}Resource {
<@SecurityAnnotation deaction/>
@ApiOperation(value = "${deaction.getLogicName()}", tags = {"${deLogicName}" }, notes = "${deaction.getLogicName()}")
@RequestMapping(method = RequestMethod.${reqMtd}, value = "${fullPath}<#if deaction.getRequestParamType() == 'NOKEY'><#else>/{${itemCodeNameLC + keyCNLC}}</#if>/${deactionCodeName?lower_case}/test")
<#if de.getStorageMode()==4><#else> @Transactional</#if>
public ResponseEntity<Boolean> test${deactionCodeName?cap_first}(<#if deaction.getRequestParamType() == 'NOKEY'>${id_etParams4}<#else>${id_etParams}</#if>) {
${deCodeName} domain = ${itemCodeNameLC}Mapping.toDomain(${itemCodeNameLC}dto);
return ResponseEntity.status(HttpStatus.OK).body(${deCodeNameLC}Service.test${srfmethodname(deactionCodeName)?cap_first}(domain));
......@@ -843,7 +830,6 @@ public class ${itemCodeName}Resource {
<@SecurityAnnotation deaction/>
@ApiOperation(value = "${byTagParams}建立${deLogicName}", tags = {"${deLogicName}" }, notes = "${byTagParams}建立${deLogicName}")
@RequestMapping(method = RequestMethod.POST, value = "${fullPath}/test")
<#if de.getStorageMode()==4><#else> @Transactional</#if>
public ResponseEntity<Boolean> testCreate${byParams}(${etParams}) {
${deCodeName} domain = ${itemCodeNameLC}Mapping.toDomain(${itemCodeNameLC}dto);
${parentSetParams}
......@@ -865,7 +851,6 @@ public class ${itemCodeName}Resource {
<@SecurityAnnotation deaction/>
@ApiOperation(value = "${byTagParams}更新${deLogicName}", tags = {"${deLogicName}" }, notes = "${byTagParams}更新${deLogicName}")
@RequestMapping(method = RequestMethod.PUT, value = "${fullPath}/{${itemCodeNameLC + keyCNLC}}/test")
<#if de.getStorageMode()==4><#else> @Transactional</#if>
public ResponseEntity<Boolean> testUpdate${byParams}(${id_etParams}) {
${deCodeName} domain = ${itemCodeNameLC}Mapping.toDomain(${itemCodeNameLC}dto);
${parentSetParams}
......@@ -888,7 +873,6 @@ public class ${itemCodeName}Resource {
<@SecurityAnnotation deaction/>
@ApiOperation(value = "${byTagParams}删除${deLogicName}", tags = {"${deLogicName}" }, notes = "${byTagParams}删除${deLogicName}")
@RequestMapping(method = RequestMethod.DELETE, value = "${fullPath}/{${itemCodeNameLC + keyCNLC}}/test")
<#if de.getStorageMode()==4><#else> @Transactional</#if>
public ResponseEntity<Boolean> testRemove${byParams}(${idParams}) {
return ResponseEntity.status(HttpStatus.OK).body(${deCodeNameLC}Service.testRemove(${itemCodeNameLC + keyCNLC}));
}
......@@ -954,7 +938,6 @@ public class ${itemCodeName}Resource {
<@SecurityAnnotation deaction/>
@ApiOperation(value = "${byTagParams}${deLogicName}", tags = {"${deLogicName}" }, notes = "${byTagParams}${deLogicName}")
@RequestMapping(method = RequestMethod.${reqMtd}, value = "${fullPath}/{${itemCodeNameLC + keyCNLC}}/${deactionCodeName?lower_case}/test")
<#if de.getStorageMode()==4><#else> @Transactional</#if>
public ResponseEntity<Boolean> test${deactionCodeName?cap_first}${byParams}(${id_etParams}) {
${deCodeName} domain = ${itemCodeNameLC}Mapping.toDomain(${itemCodeNameLC}dto);
${parentSetParams}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册