Skip to content

Commit 2f43331

Browse files
committed
📝 更新 README.md
1 parent cc98514 commit 2f43331

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

spring-boot-demo-codegen/src/main/resources/template/Controller.java.vm

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ public class ${className}Controller {
4444
*/
4545
@GetMapping("")
4646
@ApiOperation(value = "分页查询${comments}", notes = "分页查询${comments}")
47-
@ApiImplicitParams({@ApiImplicitParam(name = "page", value = "分页参数", required = true), @ApiImplicitParam(name = "${classname}", value = "查询条件", required = true)})
47+
@ApiImplicitParams({
48+
@ApiImplicitParam(name = "page", value = "分页参数", required = true),
49+
@ApiImplicitParam(name = "${classname}", value = "查询条件", required = true)
50+
})
4851
public R list${className}(Page page, ${className} ${classname}) {
4952
return new R<>(${classname}Service.page(page,Wrappers.query(${classname})));
5053
}
@@ -57,7 +60,9 @@ public class ${className}Controller {
5760
*/
5861
@GetMapping("/{${pk.lowerAttrName}}")
5962
@ApiOperation(value = "通过id查询${comments}", notes = "通过id查询${comments}")
60-
@ApiImplicitParams({@ApiImplicitParam(name = "${pk.lowerAttrName}", value = "主键id", required = true)})
63+
@ApiImplicitParams({
64+
@ApiImplicitParam(name = "${pk.lowerAttrName}", value = "主键id", required = true)
65+
})
6166
public R get${className}(@PathVariable("${pk.lowerAttrName}") ${pk.attrType} ${pk.lowerAttrName}){
6267
return new R<>(${classname}Service.getById(${pk.lowerAttrName}));
6368
}
@@ -83,7 +88,9 @@ public class ${className}Controller {
8388
@ApiLog("修改${comments}")
8489
@PutMapping("/{${pk.lowerAttrName}}")
8590
@ApiOperation(value = "修改${comments}", notes = "修改${comments}")
86-
@ApiImplicitParams({@ApiImplicitParam(name = "${pk.lowerAttrName}", value = "主键id", required = true)})
91+
@ApiImplicitParams({
92+
@ApiImplicitParam(name = "${pk.lowerAttrName}", value = "主键id", required = true)
93+
})
8794
public R update${className}(@PathVariable ${pk.attrType} ${pk.lowerAttrName}, @RequestBody ${className} ${classname}){
8895
return new R<>(${classname}Service.updateById(${classname}));
8996
}
@@ -96,7 +103,9 @@ public class ${className}Controller {
96103
@ApiLog("删除${comments}")
97104
@DeleteMapping("/{${pk.lowerAttrName}}")
98105
@ApiOperation(value = "删除${comments}", notes = "删除${comments}")
99-
@ApiImplicitParams({@ApiImplicitParam(name = "${pk.lowerAttrName}", value = "主键id", required = true)})
106+
@ApiImplicitParams({
107+
@ApiImplicitParam(name = "${pk.lowerAttrName}", value = "主键id", required = true)
108+
})
100109
public R delete${className}(@PathVariable ${pk.attrType} ${pk.lowerAttrName}){
101110
return new R<>(${classname}Service.removeById(${pk.lowerAttrName}));
102111
}

spring-boot-demo-codegen/src/main/resources/template/Entity.java.vm

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import lombok.Data;
77
import lombok.EqualsAndHashCode;
88

99
.${moduleName}.entity;
10-
#if(${hasBigDecimal})
11-
#end
10+
#if(${hasBigDecimal})
11+
#end
1212

1313
/**
1414
* <p>
@@ -24,7 +24,8 @@ import lombok.EqualsAndHashCode;
2424
* @modified: ${author}
2525
*/
2626
@Data
27-
@TableName("${tableName}") @ApiModel(description = "${comments}")
27+
@TableName("${tableName}")
28+
@ApiModel(description = "${comments}")
2829
@EqualsAndHashCode(callSuper = true)
2930
public class ${className} extends Model<${className}> {
3031
private static final long serialVersionUID = 1L;
@@ -36,7 +37,7 @@ public class ${className} extends Model<${className}> {
3637
#if($column.columnName == $pk.columnName)
3738
@TableId
3839
#end
39-
@ApiModelProperty(value = "$column.comments")
40+
@ApiModelProperty(value = "$column.comments")
4041
private $column.attrType $column.lowerAttrName;
4142
#end
4243

0 commit comments

Comments
 (0)