新增代码生成到指定菜单目录下下

This commit is contained in:
izory
2021-09-27 17:38:09 +08:00
parent 56a04bbf73
commit d5087a1725
20 changed files with 87 additions and 52 deletions

View File

@@ -1,6 +1,6 @@
-- 菜单
INSERT INTO sys_menu(menuName, parentId, orderNum, path, component, isFrame, isCache, menuType, visible, status, perms, icon, create_by,create_time, update_by, update_time, remark)
VALUES ('{FunctionName}', 0, 1, '/{ModuleName}/{ModelTypeName}', '{ModuleName}/{ViewsFileName}/index', 0, 0, 'C', '0', '0', '{Permission}:list', '#', '', sysdate(), '', NULL, '{ModelTypeDesc}菜单');
VALUES ('{FunctionName}', 0, 1, '/{ModuleName}/{ModelTypeName}', '{ModuleName}/{ViewsFileName}/index', 0, 0, 'C', '0', '0', '{Permission}:list', '#', '', sysdate(), '', NULL, '{FunctionName}菜单');
-- 按钮父菜单id
SELECT @menuId := LAST_INSERT_ID();

View File

@@ -12,7 +12,7 @@ namespace {RepositoriesNamespace}
/// @date {DateTime}
/// </summary>
[AppService(ServiceLifetime = LifeTime.Transient)]
public class {ModelTypeName}Repository : BaseRepository
public class {ModelTypeName}Repository : BaseRepository<ModelTypeName>
{
#region 业务逻辑代码
#endregion

View File

@@ -21,10 +21,10 @@ namespace {ServicesNamespace}.Business
[AppService(ServiceType = typeof(I{ModelTypeName}Service), ServiceLifetime = LifeTime.Transient)]
public class {ModelTypeName}Service: BaseService<{ModelTypeName}>, I{ModelTypeName}Service
{
private readonly {ModelTypeName}Repository _repository;
private readonly {ModelTypeName}Repository _{ModelTypeName}repository;
public {ModelTypeName}Service({ModelTypeName}Repository repository)
{
_repository = repository;
_{ModelTypeName}repository = repository;
}
#region 业务逻辑代码

View File

@@ -1,6 +1,6 @@
-- 菜单
INSERT INTO sys_menu(menuName, parentId, orderNum, path, component, isFrame, isCache, menuType, visible, status, perms, icon, create_by,create_time, update_by, update_time, remark)
VALUES ('{FunctionName}', 0, 1, '/{ModuleName}/{ModelTypeName}', '{ModuleName}/{ViewsFileName}/index', 0, 0, 'C', '0', '0', '{Permission}:list', '#', '', GETDATE(), '', NULL, '{ModelTypeDesc}');
VALUES ('{FunctionName}', {ParentId}, 1, '/{ModuleName}/{ModelTypeName}', '{ModuleName}/{ViewsFileName}/index', 0, 0, 'C', '0', '0', '{Permission}:list', '#', '', GETDATE(), '', NULL, '{FunctionName}');
-- 按钮父菜单id
declare @menuId int = @@identity
@@ -19,5 +19,5 @@ INSERT INTO sys_menu(menuName, parentId, orderNum, path, component, isFrame, isC
VALUES ('修改', @menuId, 3, '#', NULL, 0, 0, 'F', '0', '0', '{Permission}:update', '', '', GETDATE(), '', NULL, NULL);
GO
SELECT * FROM sys_menu WHERE parentId = @menuId;
SELECT * FROM sys_menu WHERE parentId = {ParentId};
SELECT * FROM sys_menu WHERE menuId = @menuId;

View File

@@ -38,7 +38,7 @@ export function update{ModelTypeName}(data) {
/**
* 获取{FunctionName}详情
* @param {Id} {ModelTypeDesc}Id
* @param {Id} {FunctionName}Id
*/
export function get{ModelTypeName}(id) {
return request({