代码生成优化

pull/1/head
zhaochencheng 3 years ago
parent e977a2922f
commit 0dd4888b9f

@ -239,6 +239,7 @@ public class GenTableServiceImpl implements IGenTableService {
genContext.prop2path.put("ClassName", table.getClassName());
genContext.prop2path.put("className", StrUtil.lowerFirst(table.getClassName()));
genContext.prop2path.put("tableName", table.getTableName());
genContext.prop2path.put("moduleName", table.getModuleName());
// 初始化模板
VelocityInitializer.initVelocity();

@ -1,6 +1,6 @@
-- 菜单 SQL
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
values('${functionName}', '${parentMenuId}', '1', '${className}', '${moduleName}/${className}/index', 1, 0, 'C', '0', '0', '${permissionPrefix}:list', '#', 1, sysdate(), '', null, '${functionName}菜单');
values('${functionName}', '${parentMenuId}', '1', '${className}', '${rootPermission}/${moduleName}/${className}/index', 1, 0, 'C', '0', '0', '${permissionPrefix}:list', '#', 1, sysdate(), '', null, '${functionName}菜单');
-- 按钮父菜单ID
SELECT @parentId := LAST_INSERT_ID();

@ -143,7 +143,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row>
<WmsTable v-loading="loading" :data="${businessName}List" @selection-change="handleSelectionChange">
<el-table v-loading="loading" :data="${businessName}List" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
#set($count0 = 0)
#foreach($column in $columns)
@ -199,7 +199,7 @@
>删除</el-button>
</template>
</el-table-column>
</WmsTable>
</el-table>
<pagination
v-show="total>0"
@ -354,7 +354,7 @@
</template>
<script>
import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName}, export${BusinessName} } from "@/api/${moduleName}/${className}";
import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName}, export${BusinessName} } from "@/api/${env.projectName}/${moduleName}/${className}";
export default {
name: "${BusinessName}",

@ -80,6 +80,7 @@ CREATE TABLE `mall_pms_sku`
`price` decimal(10, 2) NULL DEFAULT NULL,
`pic` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '展示图片',
`sp_data` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '商品销售属性json格式',
`del_flag` tinyint(4) NOT NULL DEFAULT '0' COMMENT '删除标识',
`create_by` bigint(20) DEFAULT NULL COMMENT '创建人',
`create_time` datetime(3) DEFAULT NULL COMMENT '创建时间',
`update_by` bigint(20) DEFAULT NULL COMMENT '修改人',

Loading…
Cancel
Save