代码生成调整ID查询回退为Integer类型

This commit is contained in:
1350250847@qq.com
2026-04-27 17:47:04 +08:00
parent 9eeb0c5682
commit 70b299eda6
3 changed files with 3 additions and 3 deletions

View File

@@ -105,7 +105,7 @@ public class ${table.controllerName} {
@PreAuthorize("hasAuthority('${authPre}:list')")
@Operation(summary = "根据id查询${table.comment!}")
@GetMapping("/{id}")
public ApiResult<${entity}> get(@PathVariable("id") Long id) {
public ApiResult<${entity}> get(@PathVariable("id") Integer id) {
// 使用关联查询
return success(${serviceIns}.getByIdRel(id));
}

View File

@@ -49,7 +49,7 @@ public interface ${table.serviceName} extends ${superServiceClass}<${entity}> {
* @param ${idPropertyName!} ${idComment!}
* @return ${entity}
*/
${entity} getByIdRel(Long ${idPropertyName!});
${entity} getByIdRel(Integer ${idPropertyName!});
}
<% } %>

View File

@@ -53,7 +53,7 @@ public class ${table.serviceImplName} extends ${superServiceImplClass}<${table.m
}
@Override
public ${entity} getByIdRel(Long ${idPropertyName!}) {
public ${entity} getByIdRel(Integer ${idPropertyName!}) {
${entity}Param param = new ${entity}Param();
param.set${idCapitalName!}(${idPropertyName!});
return param.getOne(baseMapper.selectListRel(param));