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

自定义行为批处理

上级 813697e0
...@@ -3062,8 +3062,8 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser ...@@ -3062,8 +3062,8 @@ public class ${item.getCodeName()}ServiceImpl implements I${de.getCodeName()}Ser
<#macro customBatchAction deaction> <#macro customBatchAction deaction>
@Override @Override
<@transactionalAnno deaction/> <@transactionalAnno deaction/>
public boolean ${item.getCodeName()} ${srfmethodname(deaction.getCodeName())}Batch(List<${item.codeName}> etList) { public boolean ${srfmethodname(deaction.getCodeName())}Batch(List<${item.codeName}> etList) {
for(${item.getCodeName()} et : etList)){ for(${item.getCodeName()} et : etList) {
${srfmethodname(deaction.getCodeName())}(et); ${srfmethodname(deaction.getCodeName())}(et);
} }
return true; return true;
......
...@@ -1006,7 +1006,7 @@ public class ${itemCodeName}Resource { ...@@ -1006,7 +1006,7 @@ public class ${itemCodeName}Resource {
@ApiOperation(value = "${deaction.getLogicName()}Batch", tags = {"批量处理${deLogicName}" }, notes = "${deaction.getLogicName()}Batch") @ApiOperation(value = "${deaction.getLogicName()}Batch", tags = {"批量处理${deLogicName}" }, notes = "${deaction.getLogicName()}Batch")
@RequestMapping(method = RequestMethod.${reqMtd}, value = "${fullPath}<#if deaction.getRequestParamType() == 'NONE'><#else>/{${itemCodeNameLC + keyCNLC}}</#if>/${deactionCodeName?lower_case}batch") @RequestMapping(method = RequestMethod.${reqMtd}, value = "${fullPath}<#if deaction.getRequestParamType() == 'NONE'><#else>/{${itemCodeNameLC + keyCNLC}}</#if>/${deactionCodeName?lower_case}batch")
public ResponseEntity<Boolean> ${deactionCodeName?uncap_first}Batch(${etParamsList}) { public ResponseEntity<Boolean> ${deactionCodeName?uncap_first}Batch(${etParamsList}) {
return ResponseEntity.status(HttpStatus.OK).body(${deCodeNameLC}Service.${srfmethodname(deactionCodeName)}(${itemCodeNameLC}dtos)); return ResponseEntity.status(HttpStatus.OK).body(${deCodeNameLC}Service.${srfmethodname(deactionCodeName)}(${itemCodeNameLC}Mapping.toDomain(${itemCodeNameLC}dtos)));
} }
</#macro> </#macro>
...@@ -1016,7 +1016,7 @@ public class ${itemCodeName}Resource { ...@@ -1016,7 +1016,7 @@ public class ${itemCodeName}Resource {
@ApiOperation(value = "${byTagParams}${deLogicName}Batch", tags = {"批量处理${deLogicName}" }, notes = "${byTagParams}${deLogicName}Batch") @ApiOperation(value = "${byTagParams}${deLogicName}Batch", tags = {"批量处理${deLogicName}" }, notes = "${byTagParams}${deLogicName}Batch")
@RequestMapping(method = RequestMethod.${reqMtd}, value = "${fullPath}<#if deaction.getRequestParamType() == 'NONE'><#else>/{${itemCodeNameLC + keyCNLC}}</#if>/${deactionCodeName?lower_case}batch") @RequestMapping(method = RequestMethod.${reqMtd}, value = "${fullPath}<#if deaction.getRequestParamType() == 'NONE'><#else>/{${itemCodeNameLC + keyCNLC}}</#if>/${deactionCodeName?lower_case}batch")
public ResponseEntity<Boolean> ${deactionCodeName?uncap_first}${byParams}(${etParamsList}) { public ResponseEntity<Boolean> ${deactionCodeName?uncap_first}${byParams}(${etParamsList}) {
return ResponseEntity.status(HttpStatus.OK).body(${deCodeNameLC}Service.${srfmethodname(deactionCodeName)}(${itemCodeNameLC}dtos)); return ResponseEntity.status(HttpStatus.OK).body(${deCodeNameLC}Service.${srfmethodname(deactionCodeName)}(${itemCodeNameLC}Mapping.toDomain(${itemCodeNameLC}dtos)));
} }
</#macro> </#macro>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册