代码生成调整ID查询回退为Integer类型
This commit is contained in:
@@ -105,7 +105,7 @@ public class ${table.controllerName} {
|
|||||||
@PreAuthorize("hasAuthority('${authPre}:list')")
|
@PreAuthorize("hasAuthority('${authPre}:list')")
|
||||||
@Operation(summary = "根据id查询${table.comment!}")
|
@Operation(summary = "根据id查询${table.comment!}")
|
||||||
@GetMapping("/{id}")
|
@GetMapping("/{id}")
|
||||||
public ApiResult<${entity}> get(@PathVariable("id") Long id) {
|
public ApiResult<${entity}> get(@PathVariable("id") Integer id) {
|
||||||
// 使用关联查询
|
// 使用关联查询
|
||||||
return success(${serviceIns}.getByIdRel(id));
|
return success(${serviceIns}.getByIdRel(id));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ public interface ${table.serviceName} extends ${superServiceClass}<${entity}> {
|
|||||||
* @param ${idPropertyName!} ${idComment!}
|
* @param ${idPropertyName!} ${idComment!}
|
||||||
* @return ${entity}
|
* @return ${entity}
|
||||||
*/
|
*/
|
||||||
${entity} getByIdRel(Long ${idPropertyName!});
|
${entity} getByIdRel(Integer ${idPropertyName!});
|
||||||
|
|
||||||
}
|
}
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ public class ${table.serviceImplName} extends ${superServiceImplClass}<${table.m
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ${entity} getByIdRel(Long ${idPropertyName!}) {
|
public ${entity} getByIdRel(Integer ${idPropertyName!}) {
|
||||||
${entity}Param param = new ${entity}Param();
|
${entity}Param param = new ${entity}Param();
|
||||||
param.set${idCapitalName!}(${idPropertyName!});
|
param.set${idCapitalName!}(${idPropertyName!});
|
||||||
return param.getOne(baseMapper.selectListRel(param));
|
return param.getOne(baseMapper.selectListRel(param));
|
||||||
|
|||||||
Reference in New Issue
Block a user