|
@@ -155,6 +155,11 @@ open class ${className} {
|
|
|
private val logger = LoggerFactory.getLogger(${className}::class.java)
|
|
|
} // Companion object
|
|
|
|
|
|
+
|
|
|
+ /** 服务 */
|
|
|
+ val service = SBaseService(SMybatisDao(${this.toHump(this.table)}::class.java))
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 创建${this.tableName}
|
|
|
*
|
|
@@ -167,7 +172,7 @@ open class ${className} {
|
|
|
this.table
|
|
|
)}>): SCreateResponse<${this.toHump(this.table)}> {
|
|
|
|
|
|
- return ${this.toHump(this.table)}Service.createList( request)
|
|
|
+ return service.createList( request)
|
|
|
} // Function create()
|
|
|
|
|
|
/**
|
|
@@ -181,7 +186,7 @@ open class ${className} {
|
|
|
fun delete(@RequestBody idList: ArrayList<${this.toHump(
|
|
|
this.table
|
|
|
)}>): SBaseResponse {
|
|
|
- return ${this.toHump(this.table)}Service.deleteByKeysList(idList)
|
|
|
+ return service.deleteByKeysList(idList)
|
|
|
} // Function delete()
|
|
|
|
|
|
/**
|
|
@@ -195,7 +200,7 @@ open class ${className} {
|
|
|
fun update(@RequestBody request: SUpdateRequest<${this.toHump(
|
|
|
this.table
|
|
|
)}>): SBaseResponse {
|
|
|
- return ${this.toHump(this.table)}Service.updateList(request)
|
|
|
+ return service.updateList(request)
|
|
|
} // Function update()
|
|
|
|
|
|
/**
|
|
@@ -209,7 +214,7 @@ open class ${className} {
|
|
|
fun query(@RequestBody request: SQueryRequest): SQueryResponse<${this.toHump(
|
|
|
this.table
|
|
|
)}> {
|
|
|
- return ${this.toHump(this.table)}Service.pageQuery(request)
|
|
|
+ return service.pageQuery(request)
|
|
|
} // Function query()
|
|
|
|
|
|
/**
|
|
@@ -218,7 +223,7 @@ open class ${className} {
|
|
|
@ApiOperation(value = "根据条件查询统计数量", notes = "")
|
|
|
@PostMapping(value = ["/count"])
|
|
|
fun count(@RequestBody request: SCountRequest): SCountResponse {
|
|
|
- return ${this.toHump(this.table)}Service.count(request)
|
|
|
+ return servicee.count(request)
|
|
|
} // Function count()
|
|
|
`);
|
|
|
strBuild.append(`} // Class ${className}`);
|