mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-08-11 08:41:53 +08:00
代码生成:进一步完成 erp 模版
This commit is contained in:
@@ -192,6 +192,16 @@ public class ${sceneEnum.prefixClass}${table.className}Controller {
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/${subSimpleClassName_strikeCase}/get")
|
||||
@Operation(summary = "获得${subTable.classComment}")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
#if ($sceneEnum.scene == 1)
|
||||
@PreAuthorize("@ss.hasPermission('${permissionPrefix}:query')")
|
||||
#end
|
||||
public CommonResult<${subTable.className}DO> get${subSimpleClassName}(@RequestParam("id") ${subPrimaryColumn.javaType} id) {
|
||||
return success(${classNameVar}Service.get${subSimpleClassName}(id));
|
||||
}
|
||||
|
||||
#end
|
||||
#end
|
||||
}
|
@@ -132,6 +132,14 @@ public interface ${table.className}Service {
|
||||
*/
|
||||
void delete${subSimpleClassName}(${subPrimaryColumn.javaType} id);
|
||||
|
||||
/**
|
||||
* 获得${subTable.classComment}
|
||||
*
|
||||
* @param id 编号
|
||||
* @return ${subTable.classComment}
|
||||
*/
|
||||
${subTable.className}DO get${subSimpleClassName}(${subPrimaryColumn.javaType} id);
|
||||
|
||||
#end
|
||||
#end
|
||||
}
|
@@ -198,6 +198,11 @@ public class ${table.className}ServiceImpl implements ${table.className}Service
|
||||
${subClassNameVars.get($index)}Mapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ${subTable.className}DO get${subSimpleClassName}(${subPrimaryColumn.javaType} id) {
|
||||
return ${subClassNameVars.get($index)}Mapper.selectById(id);
|
||||
}
|
||||
|
||||
## 情况二:非 MASTER_ERP 时,支持批量的新增、修改操作
|
||||
#else
|
||||
#if ( $subTable.subJoinMany)
|
||||
|
Reference in New Issue
Block a user