🎉 3.3.1.RELEASE 升级适配代码生成器API

This commit is contained in:
smallchill 2022-04-02 00:44:30 +08:00
parent fc20b55135
commit f48954ddec
31 changed files with 54 additions and 54 deletions

View File

@ -5,7 +5,7 @@
<parent>
<groupId>org.springblade</groupId>
<artifactId>blade-tool</artifactId>
<version>3.3.0</version>
<version>3.3.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -101,7 +101,7 @@ mybatis-plus:
swagger:
title: SpringBlade 接口文档系统
description: SpringBlade 接口文档系统
version: 3.3.0
version: 3.3.1
license: Powered By SpringBlade
licenseUrl: https://bladex.vip
terms-of-service-url: https://bladex.vip

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-tool</artifactId>
<groupId>org.springblade</groupId>
<version>3.3.0</version>
<version>3.3.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-tool</artifactId>
<groupId>org.springblade</groupId>
<version>3.3.0</version>
<version>3.3.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-tool</artifactId>
<groupId>org.springblade</groupId>
<version>3.3.0</version>
<version>3.3.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -160,7 +160,7 @@ public class BladeCodeGenerator {
.packageConfig(builder -> builder.parent(packageName).controller("controller").entity("entity").service("service").serviceImpl("service.impl").mapper("mapper").xml("mapper"))
.strategyConfig(builder -> builder.addTablePrefix(tablePrefix).addInclude(includeTables).addExclude(excludeTables)
.entityBuilder().naming(NamingStrategy.underline_to_camel).columnNaming(NamingStrategy.underline_to_camel).enableLombok().superClass("org.springblade.core.mp.base.BaseEntity").addSuperEntityColumns(superEntityColumns)
.serviceBuilder().superServiceClass("org.springblade.core.mp.base.BaseService").superServiceImplClass("org.springblade.core.mp.base.BaseService").formatServiceFileName("I%sService").formatServiceImplFileName("%sServiceImpl")
.serviceBuilder().superServiceClass("org.springblade.core.mp.base.BaseService").superServiceImplClass("org.springblade.core.mp.base.BaseServiceImpl").formatServiceFileName("I%sService").formatServiceImplFileName("%sServiceImpl")
.mapperBuilder().enableMapperAnnotation().enableBaseResultMap().enableBaseColumnList().formatMapperFileName("%sMapper").formatXmlFileName("%sMapper")
.controllerBuilder().superClass("org.springblade.core.boot.ctrl.BladeController").formatFileName("%sController").enableRestStyle().enableHyphenStyle()
)
@ -169,7 +169,7 @@ public class BladeCodeGenerator {
.service("/templates/service.java.vm")
.serviceImpl("/templates/serviceImpl.java.vm")
.mapper("/templates/mapper.java.vm")
.mapperXml("/templates/mapper.xml.vm")
.xml("/templates/mapper.xml.vm")
.controller("/templates/controller.java.vm"))
.injectionConfig(builder -> builder.beforeOutputFile(
(tableInfo, objectMap) -> System.out.println("tableInfo: " + tableInfo.getEntityName() + " objectMap: " + objectMap.size())
@ -239,7 +239,7 @@ public class BladeCodeGenerator {
if (StringUtil.equals(key, "crud.vue")) {
outputPath = getOutputWebDir() + StringPool.SLASH + "views" + StringPool.SLASH + servicePackage.toLowerCase() + StringPool.SLASH + entityNameLower + ".vue";
}
outputFile(new File(String.valueOf(outputPath)), objectMap, value);
outputFile(new File(String.valueOf(outputPath)), objectMap, value, Boolean.TRUE);
});
}
})

View File

@ -35,7 +35,7 @@ import $!{package.Entity}.$!{entity};
#set($voPackage=$package.Entity.replace("entity","vo"))
import $!{voPackage}.$!{entity}VO;
#set($wrapperPackage=$package.Entity.replace("entity","wrapper"))
#if($!{cfg.hasWrapper})
#if($!{hasWrapper})
import $!{wrapperPackage}.$!{entity}Wrapper;
#end
import $!{package.Service}.$!{table.serviceName};
@ -63,7 +63,7 @@ public class $!{table.controllerName} {
private $!{table.serviceName} $!{table.entityPath}Service;
#if($!{cfg.hasWrapper})
#if($!{hasWrapper})
/**
* 详情
*/

View File

@ -58,7 +58,7 @@ public class $!{entity} implements Serializable {
## ---------- BEGIN 字段循环遍历 ----------
#foreach($field in $!{table.fields})
#if($!{field.name}!=$!{cfg.tenantColumn})
#if($!{field.name}!=$!{tenantColumn})
#if($!{field.keyFlag})
#set($keyPropertyName=$!{field.propertyName})
#end

View File

@ -19,7 +19,7 @@
<result column="$!{field.name}" property="$!{field.propertyName}"/>
#end
#foreach($field in $!{table.fields})
#if(!$!{field.keyFlag} && $!{field.name} != $!{cfg.tenantColumn})##生成普通字段
#if(!$!{field.keyFlag} && $!{field.name} != $!{tenantColumn})##生成普通字段
<result column="$!{field.name}" property="$!{field.propertyName}"/>
#end
#end

View File

@ -2,7 +2,7 @@ import request from '@/router/axios';
export const getList = (current, size, params) => {
return request({
url: '/api/$!{cfg.serviceName}/$!{cfg.entityKey}/list',
url: '/api/$!{serviceName}/$!{entityKey}/list',
method: 'get',
params: {
...params,
@ -14,7 +14,7 @@ export const getList = (current, size, params) => {
export const getDetail = (id) => {
return request({
url: '/api/$!{cfg.serviceName}/$!{cfg.entityKey}/detail',
url: '/api/$!{serviceName}/$!{entityKey}/detail',
method: 'get',
params: {
id
@ -24,7 +24,7 @@ export const getDetail = (id) => {
export const remove = (ids) => {
return request({
url: '/api/$!{cfg.serviceName}/$!{cfg.entityKey}/remove',
url: '/api/$!{serviceName}/$!{entityKey}/remove',
method: 'post',
params: {
ids,
@ -34,7 +34,7 @@ export const remove = (ids) => {
export const add = (row) => {
return request({
url: '/api/$!{cfg.serviceName}/$!{cfg.entityKey}/submit',
url: '/api/$!{serviceName}/$!{entityKey}/submit',
method: 'post',
data: row
})
@ -42,7 +42,7 @@ export const add = (row) => {
export const update = (row) => {
return request({
url: '/api/$!{cfg.serviceName}/$!{cfg.entityKey}/submit',
url: '/api/$!{serviceName}/$!{entityKey}/submit',
method: 'post',
data: row
})

View File

@ -22,7 +22,7 @@
size="small"
icon="el-icon-delete"
plain
v-if="permission.$!{cfg.entityKey}_delete"
v-if="permission.$!{entityKey}_delete"
@click="handleDelete">删 除
</el-button>
</template>
@ -31,7 +31,7 @@
</template>
<script>
import {getList, getDetail, add, update, remove} from "@/api/$!{cfg.servicePackage}/$!{cfg.entityKey}";
import {getList, getDetail, add, update, remove} from "@/api/$!{servicePackage}/$!{entityKey}";
import {mapGetters} from "vuex";
export default {
@ -58,7 +58,7 @@
selection: true,
column: [
#foreach($field in $!{table.fields})
#if($!{field.name}!=$!{cfg.tenantColumn})
#if($!{field.name}!=$!{tenantColumn})
{
label: "$!{field.comment}",
prop: "$!{field.propertyName}",
@ -79,10 +79,10 @@
...mapGetters(["permission"]),
permissionList() {
return {
addBtn: this.vaildData(this.permission.$!{cfg.entityKey}_add, false),
viewBtn: this.vaildData(this.permission.$!{cfg.entityKey}_view, false),
delBtn: this.vaildData(this.permission.$!{cfg.entityKey}_delete, false),
editBtn: this.vaildData(this.permission.$!{cfg.entityKey}_edit, false)
addBtn: this.vaildData(this.permission.$!{entityKey}_add, false),
viewBtn: this.vaildData(this.permission.$!{entityKey}_view, false),
delBtn: this.vaildData(this.permission.$!{entityKey}_delete, false),
editBtn: this.vaildData(this.permission.$!{entityKey}_edit, false)
};
},
ids() {

View File

@ -48,11 +48,11 @@ class $!{entity}Add extends PureComponent {
);
return (
<Panel title="新增" back="/$!{cfg.servicePackage}/$!{table.entityPath}" action={action}>
<Panel title="新增" back="/$!{servicePackage}/$!{table.entityPath}" action={action}>
<Form hideRequiredMark style={{ marginTop: 8 }}>
<Card className={styles.card} bordered={false}>
#foreach($field in $!{table.fields})
#if($!{field.name}!=$!{cfg.tenantColumn})
#if($!{field.name}!=$!{tenantColumn})
<FormItem {...formItemLayout} label="$!{field.comment}">
{getFieldDecorator('$!{field.propertyName}', {
rules: [

View File

@ -71,11 +71,11 @@ class $!{entity}Edit extends PureComponent {
);
return (
<Panel title="修改" back="/$!{cfg.servicePackage}/$!{table.entityPath}" action={action}>
<Panel title="修改" back="/$!{servicePackage}/$!{table.entityPath}" action={action}>
<Form hideRequiredMark style={{ marginTop: 8 }}>
<Card className={styles.card} bordered={false}>
#foreach($field in $!{table.fields})
#if($!{field.name}!=$!{cfg.tenantColumn})
#if($!{field.name}!=$!{tenantColumn})
<FormItem {...formItemLayout} label="$!{field.comment}">
{getFieldDecorator('$!{field.propertyName}', {
rules: [

View File

@ -57,7 +57,7 @@ class $!{entity} extends PureComponent {
const columns = [
#foreach($field in $!{table.fields})
#if($!{field.name}!=$!{cfg.tenantColumn})
#if($!{field.name}!=$!{tenantColumn})
{
title: '$!{field.comment}',
dataIndex: '$!{field.propertyName}',

View File

@ -51,7 +51,7 @@ export default {
const response = yield call(submit, payload);
if (response.success) {
message.success('提交成功');
router.push('/$!{cfg.servicePackage}/$!{table.entityPath}');
router.push('/$!{servicePackage}/$!{table.entityPath}');
}
},
*remove({ payload }, { call }) {

View File

@ -4,22 +4,22 @@ import func from '../utils/Func';
import request from '../utils/request';
export async function list(params) {
return request(`/api/$!{cfg.serviceName}/$!{cfg.entityKey}/list?$!{params}`);
return request(`/api/$!{serviceName}/$!{entityKey}/list?$!{params}`);
}
export async function submit(params) {
return request('/api/$!{cfg.serviceName}/$!{cfg.entityKey}/submit', {
return request('/api/$!{serviceName}/$!{entityKey}/submit', {
method: 'POST',
body: params,
});
}
export async function detail(params) {
return request(`/api/$!{cfg.serviceName}/$!{cfg.entityKey}/detail?$!{params}`);
return request(`/api/$!{serviceName}/$!{entityKey}/detail?$!{params}`);
}
export async function remove(params) {
return request('/api/$!{cfg.serviceName}/$!{cfg.entityKey}/remove', {
return request('/api/$!{serviceName}/$!{entityKey}/remove', {
method: 'POST',
body: func.toFormData(params),
});

View File

@ -30,7 +30,7 @@ class $!{entity}View extends PureComponent {
params: { id },
},
} = this.props;
router.push(`/$!{cfg.servicePackage}/$!{table.entityPath}/edit/$!{id}`);
router.push(`/$!{servicePackage}/$!{table.entityPath}/edit/$!{id}`);
};
render() {
@ -57,11 +57,11 @@ class $!{entity}View extends PureComponent {
);
return (
<Panel title="查看" back="/$!{cfg.servicePackage}/$!{table.entityPath}" action={action}>
<Panel title="查看" back="/$!{servicePackage}/$!{table.entityPath}" action={action}>
<Form hideRequiredMark style={{ marginTop: 8 }}>
<Card className={styles.card} bordered={false}>
#foreach($field in $!{table.fields})
#if($!{field.name}!=$!{cfg.tenantColumn})
#if($!{field.name}!=$!{tenantColumn})
<FormItem {...formItemLayout} label="$!{field.comment}">
<span>{detail.$!{field.propertyName}}</span>
</FormItem>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-tool</artifactId>
<groupId>org.springblade</groupId>
<version>3.3.0</version>
<version>3.3.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -25,7 +25,7 @@ public interface AppConstant {
/**
* 应用版本
*/
String APPLICATION_VERSION = "3.3.0";
String APPLICATION_VERSION = "3.3.1";
/**
* 基础包

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-tool</artifactId>
<groupId>org.springblade</groupId>
<version>3.3.0</version>
<version>3.3.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-tool</artifactId>
<groupId>org.springblade</groupId>
<version>3.3.0</version>
<version>3.3.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-tool</artifactId>
<groupId>org.springblade</groupId>
<version>3.3.0</version>
<version>3.3.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-tool</artifactId>
<groupId>org.springblade</groupId>
<version>3.3.0</version>
<version>3.3.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-tool</artifactId>
<groupId>org.springblade</groupId>
<version>3.3.0</version>
<version>3.3.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-tool</artifactId>
<groupId>org.springblade</groupId>
<version>3.3.0</version>
<version>3.3.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-tool</artifactId>
<groupId>org.springblade</groupId>
<version>3.3.0</version>
<version>3.3.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -55,7 +55,7 @@ public class SwaggerProperties {
/**
* 版本
**/
private String version = "3.3.0";
private String version = "3.3.1";
/**
* 许可证
**/

View File

@ -5,7 +5,7 @@
<parent>
<groupId>org.springblade</groupId>
<artifactId>blade-tool</artifactId>
<version>3.3.0</version>
<version>3.3.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -6,7 +6,7 @@
<parent>
<groupId>org.springblade</groupId>
<artifactId>blade-tool</artifactId>
<version>3.3.0</version>
<version>3.3.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent>
<artifactId>blade-tool</artifactId>
<groupId>org.springblade</groupId>
<version>3.3.0</version>
<version>3.3.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<groupId>org.springblade</groupId>
<artifactId>blade-tool</artifactId>
<version>3.3.0</version>
<version>3.3.1</version>
<packaging>pom</packaging>
<name>blade-tool</name>
<description>
@ -36,7 +36,7 @@
</scm>
<properties>
<blade.tool.version>3.3.0</blade.tool.version>
<blade.tool.version>3.3.1</blade.tool.version>
<java.version>1.8</java.version>
<maven.plugin.version>3.8.1</maven.plugin.version>
@ -44,7 +44,7 @@
<swagger.models.version>1.6.2</swagger.models.version>
<knife4j.version>2.0.9</knife4j.version>
<mybatis.plus.version>3.5.1</mybatis.plus.version>
<mybatis.plus.generator.version>3.5.1</mybatis.plus.generator.version>
<mybatis.plus.generator.version>3.5.2</mybatis.plus.generator.version>
<protostuff.version>1.6.0</protostuff.version>
<disruptor.version>3.4.2</disruptor.version>
<guava.version>20.0</guava.version>
@ -55,7 +55,7 @@
<alibaba.seata.version>1.4.2</alibaba.seata.version>
<spring.plugin.version>2.0.0.RELEASE</spring.plugin.version>
<spring.boot.version>2.6.3</spring.boot.version>
<spring.boot.version>2.6.6</spring.boot.version>
<spring.cloud.version>2021.0.1</spring.cloud.version>
<spring.platform.version>Cairo-SR8</spring.platform.version>