Skip to content

Commit

Permalink
🎉 3.3.1.RELEASE 升级适配代码生成器API
Browse files Browse the repository at this point in the history
  • Loading branch information
smallchill committed Apr 11, 2022
1 parent 4d2e706 commit fc1ddb4
Show file tree
Hide file tree
Showing 31 changed files with 109 additions and 83 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<p align="center">
<img src="https://img.shields.io/badge/Release-V3.3.0-green.svg" alt="Downloads">
<img src="https://img.shields.io/badge/Release-V3.3.1-green.svg" alt="Downloads">
<img src="https://img.shields.io/badge/JDK-1.8+-green.svg" alt="Build Status">
<img src="https://img.shields.io/badge/license-Apache%202-blue.svg" alt="Build Status">
<img src="https://img.shields.io/badge/Spring%20Cloud-2021-blue.svg" alt="Coverage Status">
<img src="https://img.shields.io/badge/Spring%20Boot-2.6.3-blue.svg" alt="Downloads">
<img src="https://img.shields.io/badge/Spring%20Boot-2.6.6-blue.svg" alt="Downloads">
<a target="_blank" href="https://bladex.vip">
<img src="https://img.shields.io/badge/Author-Small%20Chill-ff69b4.svg" alt="Downloads">
</a>
Expand All @@ -14,7 +14,7 @@

## SpringBlade微服务开发平台
* 采用前后端分离的模式,前端开源两个框架:[Sword](https://gitee.com/smallc/Sword) (基于 React、Ant Design)、[Saber](https://gitee.com/smallc/Saber) (基于 Vue、Element-UI)
* 后端采用SpringCloud全家桶,并同时对其基础组件做了高度的封装,单独开源出一个框架:[BladeTool](https://github.com/chillzhuang/blade-tool)
* 后端采用SpringCloud全家桶,并同时对其基础组件做了高度的封装,单独开源出一个框架:[BladeTool](https://gitee.com/smallc/blade-tool)
* [BladeTool](https://github.com/chillzhuang/blade-tool)已推送至Maven中央库,直接引入即可,减少了工程的臃肿,也可更注重于业务开发
* 集成Sentinel从流量控制、熔断降级、系统负载等多个维度保护服务的稳定性。
* 注册中心、配置中心选型Nacos,为工程瘦身的同时加强各模块之间的联动。
Expand Down Expand Up @@ -83,7 +83,7 @@ SpringBlade
* 后端SpringBoot版:[https://gitee.com/smallc/SpringBlade/tree/boot/](https://gitee.com/smallc/SpringBlade/tree/boot/)
* 前端框架Sword(基于React):[https://gitee.com/smallc/Sword](https://gitee.com/smallc/Sword)
* 前端框架Saber(基于Vue):[https://gitee.com/smallc/Saber](https://gitee.com/smallc/Saber)
* 核心框架项目地址:[https://github.com/chillzhuang/blade-tool](https://github.com/chillzhuang/blade-tool)
* 核心框架项目地址:[https://gitee.com/smallc/blade-tool](https://gitee.com/smallc/blade-tool)

# 开源协议
Apache Licence 2.0 ([英文原文](http://www.apache.org/licenses/LICENSE-2.0.html)
Expand Down
2 changes: 1 addition & 1 deletion blade-auth/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<artifactId>SpringBlade</artifactId>
<groupId>org.springblade</groupId>
<version>3.3.0</version>
<version>3.3.1</version>
</parent>

<artifactId>blade-auth</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion blade-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>SpringBlade</artifactId>
<groupId>org.springblade</groupId>
<version>3.3.0</version>
<version>3.3.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion blade-gateway/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>SpringBlade</artifactId>
<groupId>org.springblade</groupId>
<version>3.3.0</version>
<version>3.3.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion blade-ops/blade-admin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>blade-ops</artifactId>
<groupId>org.springblade</groupId>
<version>3.3.0</version>
<version>3.3.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion blade-ops/blade-develop/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.springblade</groupId>
<artifactId>blade-ops</artifactId>
<version>3.3.0</version>
<version>3.3.1</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 ([email protected]).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0;
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.gnu.org/licenses/lgpl.html
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
Expand Down Expand Up @@ -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};
Expand Down Expand Up @@ -63,7 +63,7 @@ public class $!{table.controllerName} {

private $!{table.serviceName} $!{table.entityPath}Service;

#if($!{cfg.hasWrapper})
#if($!{hasWrapper})
/**
* 详情
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/**
* Copyright (c) 2018-2028, Chill Zhuang 庄骞 ([email protected]).
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0;
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.gnu.org/licenses/lgpl.html
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
Expand All @@ -17,8 +17,8 @@ package $!{package.Controller};

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.ApiParam;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import lombok.AllArgsConstructor;
import javax.validation.Valid;

Expand All @@ -35,14 +35,15 @@ import $!{package.Entity}.$!{entity};
#set($voPackage=$package.Entity.replace("entity","vo"))
import $!{voPackage}.$!{entity}VO;
#set($wrapperPackage=$package.Entity.replace("entity","wrapper"))
#if($!{hasWrapper})
import $!{wrapperPackage}.$!{entity}Wrapper;
#end
import $!{package.Service}.$!{table.serviceName};
#if($!{superControllerClassPackage})
import $!{superControllerClassPackage};
#end
#if(!$!{superEntityClass})
#end
import java.util.List;

/**
* $!{table.comment} 控制器
Expand All @@ -52,7 +53,7 @@ import java.util.List;
*/
@RestController
@AllArgsConstructor
@RequestMapping("#if($!{package.ModuleName})/$!{package.ModuleName}#end/$!{cfg.entityKey}")
@RequestMapping("#if($!{package.ModuleName})$!{package.ModuleName}#end/$!{entityKey}")
@Api(value = "$!{table.comment}", tags = "$!{table.comment}接口")
#if($!{superControllerClass})
public class $!{table.controllerName} extends $!{superControllerClass} {
Expand All @@ -62,64 +63,89 @@ public class $!{table.controllerName} {

private $!{table.serviceName} $!{table.entityPath}Service;

#if($!{hasWrapper})
/**
* 详情
*/
* 详情
*/
@GetMapping("/detail")
@ApiOperationSupport(order = 1)
@ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入$!{table.entityPath}")
public R<$!{entity}VO> detail($!{entity} $!{table.entityPath}) {
$!{entity} detail = $!{table.entityPath}Service.getOne(Condition.getQueryWrapper($!{table.entityPath}));
return R.data($!{entity}Wrapper.build().entityVO(detail));
}

/**
* 分页 $!{table.comment}
*/
* 分页 $!{table.comment}
*/
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入$!{table.entityPath}")
public R<IPage<$!{entity}VO>> list($!{entity} $!{table.entityPath}, Query query) {
IPage<$!{entity}> pages = $!{table.entityPath}Service.page(Condition.getPage(query), Condition.getQueryWrapper($!{table.entityPath}));
return R.data($!{entity}Wrapper.build().pageVO(pages));
}

#else
/**
* 详情
*/
@GetMapping("/detail")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入$!{table.entityPath}")
public R<$!{entity}> detail($!{entity} $!{table.entityPath}) {
$!{entity} detail = $!{table.entityPath}Service.getOne(Condition.getQueryWrapper($!{table.entityPath}));
return R.data(detail);
}

/**
* 分页 $!{table.comment}
*/
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "传入$!{table.entityPath}")
public R<IPage<$!{entity}>> list($!{entity} $!{table.entityPath}, Query query) {
IPage<$!{entity}> pages = $!{table.entityPath}Service.page(Condition.getPage(query), Condition.getQueryWrapper($!{table.entityPath}));
return R.data(pages);
}
#end

/**
* 自定义分页 $!{table.comment}
*/
* 自定义分页 $!{table.comment}
*/
@GetMapping("/page")
@ApiOperationSupport(order = 3)
@ApiOperationSupport(order = 3)
@ApiOperation(value = "分页", notes = "传入$!{table.entityPath}")
public R<IPage<$!{entity}VO>> page($!{entity}VO $!{table.entityPath}, Query query) {
IPage<$!{entity}VO> pages = $!{table.entityPath}Service.select$!{entity}Page(Condition.getPage(query), $!{table.entityPath});
return R.data(pages);
}

/**
* 新增 $!{table.comment}
*/
* 新增 $!{table.comment}
*/
@PostMapping("/save")
@ApiOperationSupport(order = 4)
@ApiOperationSupport(order = 4)
@ApiOperation(value = "新增", notes = "传入$!{table.entityPath}")
public R save(@Valid @RequestBody $!{entity} $!{table.entityPath}) {
return R.status($!{table.entityPath}Service.save($!{table.entityPath}));
}

/**
* 修改 $!{table.comment}
*/
* 修改 $!{table.comment}
*/
@PostMapping("/update")
@ApiOperationSupport(order = 5)
@ApiOperationSupport(order = 5)
@ApiOperation(value = "修改", notes = "传入$!{table.entityPath}")
public R update(@Valid @RequestBody $!{entity} $!{table.entityPath}) {
return R.status($!{table.entityPath}Service.updateById($!{table.entityPath}));
}

/**
* 新增或修改 $!{table.comment}
*/
* 新增或修改 $!{table.comment}
*/
@PostMapping("/submit")
@ApiOperationSupport(order = 6)
@ApiOperationSupport(order = 6)
@ApiOperation(value = "新增或修改", notes = "传入$!{table.entityPath}")
public R submit(@Valid @RequestBody $!{entity} $!{table.entityPath}) {
return R.status($!{table.entityPath}Service.saveOrUpdate($!{table.entityPath}));
Expand All @@ -128,10 +154,10 @@ public class $!{table.controllerName} {
#if($!{superEntityClass})

/**
* 删除 $!{table.comment}
*/
* 删除 $!{table.comment}
*/
@PostMapping("/remove")
@ApiOperationSupport(order = 7)
@ApiOperationSupport(order = 7)
@ApiOperation(value = "逻辑删除", notes = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return R.status($!{table.entityPath}Service.deleteLogic(Func.toLongList(ids)));
Expand All @@ -140,10 +166,10 @@ public class $!{table.controllerName} {
#else

/**
* 删除 $!{table.comment}
*/
* 删除 $!{table.comment}
*/
@PostMapping("/remove")
@ApiOperationSupport(order = 7)
@ApiOperationSupport(order = 8)
@ApiOperation(value = "删除", notes = "传入ids")
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return R.status($!{table.entityPath}Service.removeByIds(Func.toLongList(ids)));
Expand Down
2 changes: 1 addition & 1 deletion blade-ops/blade-report/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.springblade</groupId>
<artifactId>blade-ops</artifactId>
<version>3.3.0</version>
<version>3.3.1</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion blade-ops/blade-resource/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>blade-ops</artifactId>
<groupId>org.springblade</groupId>
<version>3.3.0</version>
<version>3.3.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion blade-ops/blade-seata-order/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>blade-ops</artifactId>
<groupId>org.springblade</groupId>
<version>3.3.0</version>
<version>3.3.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion blade-ops/blade-seata-storage/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>blade-ops</artifactId>
<groupId>org.springblade</groupId>
<version>3.3.0</version>
<version>3.3.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion blade-ops/blade-swagger/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>blade-ops</artifactId>
<groupId>org.springblade</groupId>
<version>3.3.0</version>
<version>3.3.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
4 changes: 2 additions & 2 deletions blade-ops/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
<parent>
<artifactId>SpringBlade</artifactId>
<groupId>org.springblade</groupId>
<version>3.3.0</version>
<version>3.3.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>blade-ops</artifactId>
<name>${project.artifactId}</name>
<version>3.3.0</version>
<version>3.3.1</version>
<packaging>pom</packaging>
<modules>
<module>blade-admin</module>
Expand Down
2 changes: 1 addition & 1 deletion blade-service-api/blade-demo-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>blade-service-api</artifactId>
<groupId>org.springblade</groupId>
<version>3.3.0</version>
<version>3.3.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion blade-service-api/blade-desk-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>blade-service-api</artifactId>
<groupId>org.springblade</groupId>
<version>3.3.0</version>
<version>3.3.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion blade-service-api/blade-dict-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>blade-service-api</artifactId>
<groupId>org.springblade</groupId>
<version>3.3.0</version>
<version>3.3.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion blade-service-api/blade-scope-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>blade-service-api</artifactId>
<groupId>org.springblade</groupId>
<version>3.3.0</version>
<version>3.3.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
2 changes: 1 addition & 1 deletion blade-service-api/blade-system-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>blade-service-api</artifactId>
<groupId>org.springblade</groupId>
<version>3.3.0</version>
<version>3.3.1</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Loading

0 comments on commit fc1ddb4

Please sign in to comment.