fix 代码生成路径大小写问题
This commit is contained in:
parent
3c0769b869
commit
7c4f3c97c2
@ -66,7 +66,6 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="Controllers\business\" />
|
|
||||||
<Folder Include="DataProtection\" />
|
<Folder Include="DataProtection\" />
|
||||||
<Folder Include="wwwroot\export\" />
|
<Folder Include="wwwroot\export\" />
|
||||||
<Folder Include="wwwroot\Generatecode\" />
|
<Folder Include="wwwroot\Generatecode\" />
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
-- 菜单
|
-- 菜单
|
||||||
INSERT INTO sys_menu(menuName, parentId, orderNum, path, component, isFrame, isCache, menuType, visible, status, perms, icon, create_by, create_time)
|
INSERT INTO sys_menu(menuName, parentId, orderNum, path, component, isFrame, isCache, menuType, visible, status, perms, icon, create_by, create_time)
|
||||||
VALUES ('${genTable.functionName}', ${parentId}, 999, '${genTable.BusinessName}', '${genTable.ModuleName}/${genTable.BusinessName}', 0, 0, 'C', '0', '0', '${replaceDto.PermissionPrefix}:list', '', 'system', sysdate());
|
VALUES ('${genTable.functionName}', ${parentId}, 999, '${genTable.BusinessName}', '${tool.FirstLowerCase(genTable.ModuleName)}/${genTable.BusinessName}', 0, 0, 'C', '0', '0', '${replaceDto.PermissionPrefix}:list', '', 'system', sysdate());
|
||||||
|
|
||||||
-- 按钮父菜单id
|
-- 按钮父菜单id
|
||||||
SELECT @menuId := LAST_INSERT_ID();
|
SELECT @menuId := LAST_INSERT_ID();
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
-- ${genTable.functionName}菜单
|
-- ${genTable.functionName}菜单
|
||||||
INSERT INTO sys_menu(menuName, parentId, orderNum, path, component, isFrame, isCache, menuType, visible, status, perms, icon, create_by, create_time)
|
INSERT INTO sys_menu(menuName, parentId, orderNum, path, component, isFrame, isCache, menuType, visible, status, perms, icon, create_by, create_time)
|
||||||
VALUES ('${genTable.functionName}', ${parentId}, 999, '${genTable.BusinessName}', '${genTable.ModuleName}/${genTable.BusinessName}', 0, 0, 'C', '0', '0', '${replaceDto.PermissionPrefix}:list', '', 'system', GETDATE());
|
VALUES ('${genTable.functionName}', ${parentId}, 999, '${genTable.BusinessName}', '${tool.FirstLowerCase(genTable.ModuleName)}/${genTable.BusinessName}', 0, 0, 'C', '0', '0', '${replaceDto.PermissionPrefix}:list', '', 'system', GETDATE());
|
||||||
|
|
||||||
-- 按钮父菜单id
|
-- 按钮父菜单id
|
||||||
declare @menuId int = @@identity
|
declare @menuId int = @@identity
|
||||||
|
|||||||
@ -72,7 +72,7 @@ $end
|
|||||||
$if(showCustomInput)
|
$if(showCustomInput)
|
||||||
changeSort
|
changeSort
|
||||||
$end
|
$end
|
||||||
} from '@/api/${genTable.ModuleName}/${lowerBusinessName}.js';
|
} from '@/api/${tool.FirstLowerCase(genTable.ModuleName)}/${lowerBusinessName}.js';
|
||||||
import Treeselect from "@riophae/vue-treeselect";
|
import Treeselect from "@riophae/vue-treeselect";
|
||||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||||
|
|
||||||
|
|||||||
@ -70,7 +70,7 @@ $end
|
|||||||
$if(showCustomInput)
|
$if(showCustomInput)
|
||||||
changeSort
|
changeSort
|
||||||
$end
|
$end
|
||||||
} from '@/api/${genTable.ModuleName}/${lowerBusinessName}.js';
|
} from '@/api/${tool.FirstLowerCase(genTable.ModuleName)}/${lowerBusinessName}.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "${lowerBusinessName}",
|
name: "${lowerBusinessName}",
|
||||||
|
|||||||
@ -44,7 +44,7 @@ namespace ZR.CodeGenerator
|
|||||||
string PKType = "int";
|
string PKType = "int";
|
||||||
ReplaceDto replaceDto = new();
|
ReplaceDto replaceDto = new();
|
||||||
replaceDto.ModelTypeName = dto.GenTable.ClassName;//表名对应C# 实体类名
|
replaceDto.ModelTypeName = dto.GenTable.ClassName;//表名对应C# 实体类名
|
||||||
replaceDto.PermissionPrefix = $"{dto.GenTable.ModuleName}:{dto.GenTable.ClassName.ToLower()}";//权限
|
replaceDto.PermissionPrefix = $"{dto.GenTable.ModuleName.ToLower()}:{dto.GenTable.ClassName.ToLower()}";//权限
|
||||||
replaceDto.Author = dto.GenTable.FunctionAuthor;
|
replaceDto.Author = dto.GenTable.FunctionAuthor;
|
||||||
replaceDto.ShowBtnAdd = dto.CheckedBtn.Any(f => f == 1);
|
replaceDto.ShowBtnAdd = dto.CheckedBtn.Any(f => f == 1);
|
||||||
replaceDto.ShowBtnEdit = dto.CheckedBtn.Any(f => f == 2);
|
replaceDto.ShowBtnEdit = dto.CheckedBtn.Any(f => f == 2);
|
||||||
@ -171,7 +171,7 @@ namespace ZR.CodeGenerator
|
|||||||
/// 生成Vue页面
|
/// 生成Vue页面
|
||||||
private static void GenerateVueViews(ReplaceDto replaceDto, GenerateDto generateDto)
|
private static void GenerateVueViews(ReplaceDto replaceDto, GenerateDto generateDto)
|
||||||
{
|
{
|
||||||
var fullPath = Path.Combine(generateDto.GenCodePath, "ZR.Vue", "src", "views", generateDto.GenTable.ModuleName, $"{generateDto.GenTable.BusinessName}.vue");
|
var fullPath = Path.Combine(generateDto.GenCodePath, "ZR.Vue", "src", "views", FirstLowerCase(generateDto.GenTable.ModuleName), $"{generateDto.GenTable.BusinessName}.vue");
|
||||||
string fileName = string.Empty;
|
string fileName = string.Empty;
|
||||||
switch (generateDto.GenTable.TplCategory)
|
switch (generateDto.GenTable.TplCategory)
|
||||||
{
|
{
|
||||||
@ -203,7 +203,7 @@ namespace ZR.CodeGenerator
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static void GenerateVueJs(ReplaceDto replaceDto, GenerateDto generateDto)
|
public static void GenerateVueJs(ReplaceDto replaceDto, GenerateDto generateDto)
|
||||||
{
|
{
|
||||||
string fullPath = Path.Combine(generateDto.GenCodePath, "ZR.Vue", "src", "api", generateDto.GenTable.ModuleName, FirstLowerCase(generateDto.GenTable.BusinessName) + ".js");
|
string fullPath = Path.Combine(generateDto.GenCodePath, "ZR.Vue", "src", "api", FirstLowerCase(generateDto.GenTable.ModuleName), FirstLowerCase(generateDto.GenTable.BusinessName) + ".js");
|
||||||
var tpl = FileHelper.ReadJtTemplate("TplVueApi.txt");
|
var tpl = FileHelper.ReadJtTemplate("TplVueApi.txt");
|
||||||
|
|
||||||
var result = tpl.Render();
|
var result = tpl.Render();
|
||||||
|
|||||||
@ -16,8 +16,4 @@
|
|||||||
<PackageReference Include="SqlSugar.IOC" Version="1.7.0" />
|
<PackageReference Include="SqlSugar.IOC" Version="1.7.0" />
|
||||||
<PackageReference Include="SqlSugarCoreNoDrive" Version="5.0.5.1" />
|
<PackageReference Include="SqlSugarCoreNoDrive" Version="5.0.5.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<Folder Include="Repositories\" />
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@ -54,8 +54,8 @@ CREATE TABLE `sys_Tasks_log` (
|
|||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Records of sys_Tasks_log
|
-- Records of sys_Tasks_log
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
INSERT INTO `sys_Tasks_log` VALUES (196, '1410905433996136448', '测试任务', 'SYSTEM', 'Succeed', '0', NULL, '2021-08-02 15:10:00', 'ZRTasks.Job_SyncTest', 18);
|
INSERT INTO `sys_Tasks_log` VALUES (196, '1410905433996136448', '测试任务', 'SYSTEM', 'Succeed', '0', NULL, SYSDATE(), 'ZRTasks.Job_SyncTest', 18);
|
||||||
INSERT INTO `sys_Tasks_log` VALUES (197, '1410905433996136448', '测试任务', 'SYSTEM', 'Succeed', '0', NULL, '2021-08-02 15:20:00', 'ZRTasks.Job_SyncTest', 14);
|
INSERT INTO `sys_Tasks_log` VALUES (197, '1410905433996136448', '测试任务', 'SYSTEM', 'Succeed', '0', NULL, SYSDATE(), 'ZRTasks.Job_SyncTest', 14);
|
||||||
|
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
@ -197,17 +197,17 @@ CREATE TABLE `sys_dict_type` (
|
|||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Records of sys_dict_type
|
-- Records of sys_dict_type
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
INSERT INTO `sys_dict_type` VALUES (1, '用户性别', 'sys_user_sex', '0', 'Y', 'admin', '2021-02-24 10:55:26', '', NULL, '用户性别列表');
|
INSERT INTO `sys_dict_type` VALUES (1, '用户性别', 'sys_user_sex', '0', 'Y', 'admin', SYSDATE(), '', NULL, '用户性别列表');
|
||||||
INSERT INTO `sys_dict_type` VALUES (2, '菜单状态', 'sys_show_hide', '0', 'Y', 'admin', '2021-02-24 10:55:26', '', NULL, '菜单状态列表');
|
INSERT INTO `sys_dict_type` VALUES (2, '菜单状态', 'sys_show_hide', '0', 'Y', 'admin', SYSDATE(), '', NULL, '菜单状态列表');
|
||||||
INSERT INTO `sys_dict_type` VALUES (3, '系统开关', 'sys_normal_disable', '0', 'Y', 'admin', '2021-02-24 10:55:26', '', NULL, '系统开关列表');
|
INSERT INTO `sys_dict_type` VALUES (3, '系统开关', 'sys_normal_disable', '0', 'Y', 'admin', SYSDATE(), '', NULL, '系统开关列表');
|
||||||
INSERT INTO `sys_dict_type` VALUES (4, '任务状态', 'sys_job_status', '0', 'Y', 'admin', '2021-02-24 10:55:26', '', NULL, '任务状态列表');
|
INSERT INTO `sys_dict_type` VALUES (4, '任务状态', 'sys_job_status', '0', 'Y', 'admin', SYSDATE(), '', NULL, '任务状态列表');
|
||||||
INSERT INTO `sys_dict_type` VALUES (5, '任务分组', 'sys_job_group', '0', 'Y', 'admin', '2021-02-24 10:55:26', '', NULL, '任务分组列表');
|
INSERT INTO `sys_dict_type` VALUES (5, '任务分组', 'sys_job_group', '0', 'Y', 'admin', SYSDATE(), '', NULL, '任务分组列表');
|
||||||
INSERT INTO `sys_dict_type` VALUES (6, '系统是否', 'sys_yes_no', '0', 'Y', 'admin', '2021-02-24 10:55:26', '', NULL, '系统是否列表');
|
INSERT INTO `sys_dict_type` VALUES (6, '系统是否', 'sys_yes_no', '0', 'Y', 'admin', SYSDATE(), '', NULL, '系统是否列表');
|
||||||
INSERT INTO `sys_dict_type` VALUES (7, '通知类型', 'sys_notice_type', '0', 'Y', 'admin', '2021-02-24 10:55:26', '', NULL, '通知类型列表');
|
INSERT INTO `sys_dict_type` VALUES (7, '通知类型', 'sys_notice_type', '0', 'Y', 'admin', SYSDATE(), '', NULL, '通知类型列表');
|
||||||
INSERT INTO `sys_dict_type` VALUES (8, '通知状态', 'sys_notice_status', '0', 'Y', 'admin', '2021-02-24 10:55:26', '', NULL, '通知状态列表');
|
INSERT INTO `sys_dict_type` VALUES (8, '通知状态', 'sys_notice_status', '0', 'Y', 'admin', SYSDATE(), '', NULL, '通知状态列表');
|
||||||
INSERT INTO `sys_dict_type` VALUES (9, '操作类型', 'sys_oper_type', '0', 'Y', 'admin', '2021-02-24 10:55:26', '', NULL, '操作类型列表');
|
INSERT INTO `sys_dict_type` VALUES (9, '操作类型', 'sys_oper_type', '0', 'Y', 'admin', SYSDATE(), '', NULL, '操作类型列表');
|
||||||
INSERT INTO `sys_dict_type` VALUES (10, '系统状态', 'sys_common_status', '0', 'Y', 'admin', '2021-02-24 10:55:27', '', NULL, '登录状态列表');
|
INSERT INTO `sys_dict_type` VALUES (10, '系统状态', 'sys_common_status', '0', 'Y', 'admin', SYSDATE(), '', NULL, '登录状态列表');
|
||||||
INSERT INTO `sys_dict_type` VALUES (11, '文章状态', 'sys_article_status', '0', 'Y', 'admin', '2021-08-19 10:34:33', '', NULL, NULL);
|
INSERT INTO `sys_dict_type` VALUES (11, '文章状态', 'sys_article_status', '0', 'Y', 'admin', SYSDATE(), '', NULL, NULL);
|
||||||
|
|
||||||
SET FOREIGN_KEY_CHECKS = 1;
|
SET FOREIGN_KEY_CHECKS = 1;
|
||||||
|
|
||||||
@ -440,19 +440,19 @@ CREATE TABLE `sys_post` (
|
|||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Records of sys_post
|
-- Records of sys_post
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
INSERT INTO `sys_post` VALUES (1, 'CEO', '董事长', 1, '0', 'admin', '2021-04-20 20:43:23', '', NULL, '');
|
INSERT INTO `sys_post` VALUES (1, 'CEO', '董事长', 1, '0', '', SYSDATE(), '', NULL, '');
|
||||||
INSERT INTO `sys_post` VALUES (2, 'SE', '项目经理', 2, '0', 'admin', '2021-04-20 20:43:23', '', NULL, '');
|
INSERT INTO `sys_post` VALUES (2, 'SE', '项目经理', 2, '0', '', SYSDATE(), '', NULL, '');
|
||||||
INSERT INTO `sys_post` VALUES (3, 'HR', '人力资源', 3, '0', 'admin', '2021-04-20 20:43:23', '', NULL, '');
|
INSERT INTO `sys_post` VALUES (3, 'HR', '人力资源', 3, '0', '', SYSDATE(), '', NULL, '');
|
||||||
INSERT INTO `sys_post` VALUES (4, 'USER', '普通员工', 4, '0', 'admin', '2021-04-20 20:43:23', 'admin', '2021-07-07 14:56:39', '普通用户');
|
INSERT INTO `sys_post` VALUES (4, 'USER', '普通员工', 4, '0', '', SYSDATE(), '', NULL, '');
|
||||||
INSERT INTO `sys_post` VALUES (6, 'PM', '人事经理', 0, '0', NULL, '2021-07-07 15:01:20', 'admin', '2021-07-12 15:31:45', NULL);
|
INSERT INTO `sys_post` VALUES (6, 'PM', '人事经理', 0, '0', NULL, SYSDATE(), '', NULL, NULL);
|
||||||
INSERT INTO `sys_post` VALUES (7, 'GM', '总经理', 0, '0', NULL, '2021-07-09 18:29:25', '', NULL, NULL);
|
INSERT INTO `sys_post` VALUES (7, 'GM', '总经理', 0, '0', NULL, SYSDATE(), '', NULL, NULL);
|
||||||
INSERT INTO `sys_post` VALUES (8, 'COO', '首席运营官', 0, '0', NULL, '2021-07-09 18:30:06', '', NULL, NULL);
|
INSERT INTO `sys_post` VALUES (8, 'COO', '首席运营官', 0, '0', NULL, SYSDATE(), '', NULL, NULL);
|
||||||
INSERT INTO `sys_post` VALUES (9, 'CFO', '首席财务官', 0, '0', NULL, '2021-07-09 18:30:28', '', NULL, NULL);
|
INSERT INTO `sys_post` VALUES (9, 'CFO', '首席财务官', 0, '0', NULL, SYSDATE(), '', NULL, NULL);
|
||||||
INSERT INTO `sys_post` VALUES (10, 'CTO', '首席技术官', 0, '0', NULL, '2021-07-09 18:30:53', '', NULL, NULL);
|
INSERT INTO `sys_post` VALUES (10, 'CTO', '首席技术官', 0, '0', NULL, SYSDATE(), '', NULL, NULL);
|
||||||
INSERT INTO `sys_post` VALUES (11, 'HRD', '人力资源总监', 0, '0', NULL, '2021-07-09 18:31:19', '', NULL, NULL);
|
INSERT INTO `sys_post` VALUES (11, 'HRD', '人力资源总监', 0, '0', NULL, SYSDATE(), '', NULL, NULL);
|
||||||
INSERT INTO `sys_post` VALUES (12, 'VP', '副总裁', 0, '0', NULL, '2021-07-09 18:31:31', '', NULL, NULL);
|
INSERT INTO `sys_post` VALUES (12, 'VP', '副总裁', 0, '0', NULL, SYSDATE(), '', NULL, NULL);
|
||||||
INSERT INTO `sys_post` VALUES (13, 'OD', '运营总监', 0, '0', NULL, '2021-07-09 18:31:55', '', NULL, NULL);
|
INSERT INTO `sys_post` VALUES (13, 'OD', '运营总监', 0, '0', NULL, SYSDATE(), '', NULL, NULL);
|
||||||
INSERT INTO `sys_post` VALUES (14, 'MD', '市场总监', 0, '0', NULL, '2021-07-09 18:32:16', '', NULL, NULL);
|
INSERT INTO `sys_post` VALUES (14, 'MD', '市场总监', 0, '0', NULL, SYSDATE(), '', NULL, NULL);
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Table structure for sys_role
|
-- Table structure for sys_role
|
||||||
@ -479,8 +479,8 @@ CREATE TABLE `sys_role` (
|
|||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Records of sys_role
|
-- Records of sys_role
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
INSERT INTO `sys_role` VALUES (1, '超级管理员', 'admin', 1, '1', 1, 0, '0', '0', 'admin', '2020-11-26 11:53:16', '', NULL, '超级管理员');
|
INSERT INTO `sys_role` VALUES (1, '超级管理员', 'admin', 1, '1', 1, 0, '0', '0', 'admin', SYSDATE(), 'system', NULL, '超级管理员');
|
||||||
INSERT INTO `sys_role` VALUES (2, '普通角色', 'common', 2, '2', 1, 0, '0', '0', 'admin', '2020-11-26 11:53:16', 'admin', '2021-08-02 15:05:29', '普通角色');
|
INSERT INTO `sys_role` VALUES (2, '普通角色', 'common', 2, '2', 1, 0, '0', '0', 'admin', SYSDATE(), 'system', NULL, '普通角色');
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Table structure for sys_role_dept
|
-- Table structure for sys_role_dept
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user