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

支持无参自定义行为

上级 dc3db940
......@@ -254,10 +254,10 @@ public class ${itemCodeName}Resource {
<#else>
<@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}")
public ResponseEntity<${itemCodeName}DTO> ${deactionCodeName?uncap_first}(<#if deaction.getRequestParamType() == 'NOKEY'>${id_etParams4}<#else>${id_etParams}</#if>) {
@RequestMapping(method = RequestMethod.${reqMtd}, value = "${fullPath}<#if deaction.getRequestParamType() == 'NONE'><#else>/{${itemCodeNameLC + keyCNLC}}</#if>/${deactionCodeName?lower_case}")
public ResponseEntity<${itemCodeName}DTO> ${deactionCodeName?uncap_first}(<#if deaction.getRequestParamType() == 'NONE'>${id_etParams4}<#else>${id_etParams}</#if>) {
${deCodeName} domain = ${itemCodeNameLC}Mapping.toDomain(${itemCodeNameLC}dto);
<#if deaction.getRequestParamType() == 'NOKEY'><#else>domain.set${dePKCodeName}(${itemCodeNameLC + keyCNLC});</#if>
<#if deaction.getRequestParamType() == 'NONE'><#else>domain.set${dePKCodeName}(${itemCodeNameLC + keyCNLC});</#if>
domain = ${deCodeNameLC}Service.${srfmethodname(deactionCodeName)}(domain);
${itemCodeNameLC}dto = ${itemCodeNameLC}Mapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(${itemCodeNameLC}dto);
......@@ -557,8 +557,8 @@ public class ${itemCodeName}Resource {
<#else>
<@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}")
public ResponseEntity<${itemCodeName}DTO> ${deactionCodeName?uncap_first}${byParams}(<#if deaction.getRequestParamType() == 'NOKEY'>${id_etParams4}<#else>${id_etParams}</#if>) {
@RequestMapping(method = RequestMethod.${reqMtd}, value = "${fullPath}<#if deaction.getRequestParamType() == 'NONE'><#else>/{${itemCodeNameLC + keyCNLC}}</#if>/${deactionCodeName?lower_case}")
public ResponseEntity<${itemCodeName}DTO> ${deactionCodeName?uncap_first}${byParams}(<#if deaction.getRequestParamType() == 'NONE'>${id_etParams4}<#else>${id_etParams}</#if>) {
${deCodeName} domain = ${itemCodeNameLC}Mapping.toDomain(${itemCodeNameLC}dto);
${parentSetParams}
domain = ${deCodeNameLC}Service.${srfmethodname(deactionCodeName)}(domain) ;
......@@ -810,8 +810,8 @@ public class ${itemCodeName}Resource {
<#else>
<@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")
public ResponseEntity<Boolean> test${deactionCodeName?cap_first}(<#if deaction.getRequestParamType() == 'NOKEY'>${id_etParams4}<#else>${id_etParams}</#if>) {
@RequestMapping(method = RequestMethod.${reqMtd}, value = "${fullPath}<#if deaction.getRequestParamType() == 'NONE'><#else>/{${itemCodeNameLC + keyCNLC}}</#if>/${deactionCodeName?lower_case}/test")
public ResponseEntity<Boolean> test${deactionCodeName?cap_first}(<#if deaction.getRequestParamType() == 'NONE'>${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));
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册