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

实体行为批处理

上级 598df9ee
......@@ -1024,13 +1024,19 @@ public class ${itemCodeName}Resource {
</#if>
<@SecurityAnnotation deaction/>
@ApiOperation(value = "批量处理[${deaction.getLogicName()}]", tags = {"${deLogicName}" }, notes = "批量处理[${deaction.getLogicName()}]")
@RequestMapping(method = RequestMethod.${reqMtd}, value = "${fullPath}<#if deaction.getRequestParamType() == 'NONE'><#else>/{${itemCodeNameLC + keyCNLC}}</#if>${deactionCodeName?lower_case}batch")
public ResponseEntity<${resultValueType}> ${deactionCodeName?uncap_first}Batch(${etParamsList}) {
@RequestMapping(method = RequestMethod.${reqMtd}, value = "${fullPath}/${deactionCodeName?lower_case}batch")
public ResponseEntity<${resultValueType}> ${deactionCodeName?uncap_first}Batch(<#if deaction.getRequestParamType() == 'NONE'><#else>${etParamsList}</#if>) {
<#if deaction.getRequestParamType() == 'NONE'>
List<${deCodeName}> domains = new List<${deCodeName}>();
boolean result = ${deCodeNameLC}Service.${srfmethodname(deactionCodeName)}Batch(domains);
<#else>
List<${deCodeName}> domains = ${itemCodeNameLC}Mapping.toDomain(${itemCodeNameLC}dtos);
boolean result = ${deCodeNameLC}Service.${srfmethodname(deactionCodeName)}Batch(domains);
</#if>
<#if resultValueType?lower_case =='void'>
${deCodeNameLC}Service.${srfmethodname(deactionCodeName)}Batch(${itemCodeNameLC}Mapping.toDomain(${itemCodeNameLC}dtos));
return ResponseEntity.status(HttpStatus.OK).build();
<#else>
return ResponseEntity.status(HttpStatus.OK).body(${deCodeNameLC}Service.${srfmethodname(deactionCodeName)}Batch(${itemCodeNameLC}Mapping.toDomain(${itemCodeNameLC}dtos)));
return ResponseEntity.status(HttpStatus.OK).body(result);
</#if>
}
</#macro>
......@@ -1043,13 +1049,19 @@ public class ${itemCodeName}Resource {
<#assign resultValueType='Void'>
</#if>
@ApiOperation(value = "批量处理[${byTagParams}${deLogicName}]", tags = {"${deLogicName}" }, notes = "批量处理[${byTagParams}${deLogicName}]")
@RequestMapping(method = RequestMethod.${reqMtd}, value = "${fullPath}<#if deaction.getRequestParamType() == 'NONE'><#else>/{${itemCodeNameLC + keyCNLC}}</#if>${deactionCodeName?lower_case}batch")
public ResponseEntity<${resultValueType}> ${deactionCodeName?uncap_first}${byParams}(${etParamsList}) {
@RequestMapping(method = RequestMethod.${reqMtd}, value = "${fullPath}/${deactionCodeName?lower_case}batch")
public ResponseEntity<${resultValueType}> ${deactionCodeName?uncap_first}${byParams}(<#if deaction.getRequestParamType() == 'NONE'><#else>${etParamsList}</#if>) {
<#if deaction.getRequestParamType() == 'NONE'>
List<${deCodeName}> domains = new List<${deCodeName}>();
boolean result = ${deCodeNameLC}Service.${srfmethodname(deactionCodeName)}Batch(domains);
<#else>
List<${deCodeName}> domains = ${itemCodeNameLC}Mapping.toDomain(${itemCodeNameLC}dtos);
boolean result = ${deCodeNameLC}Service.${srfmethodname(deactionCodeName)}Batch(domains);
</#if>
<#if resultValueType?lower_case =='void'>
${deCodeNameLC}Service.${srfmethodname(deactionCodeName)}Batch(${itemCodeNameLC}Mapping.toDomain(${itemCodeNameLC}dtos));
return ResponseEntity.status(HttpStatus.OK).build();
<#else>
return ResponseEntity.status(HttpStatus.OK).body(${deCodeNameLC}Service.${srfmethodname(deactionCodeName)}Batch(${itemCodeNameLC}Mapping.toDomain(${itemCodeNameLC}dtos)));
return ResponseEntity.status(HttpStatus.OK).body(result);
</#if>
}
</#macro>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册