模板修改
This commit is contained in:
parent
9436d7cd19
commit
98f667ce3e
|
|
@ -87,8 +87,8 @@ spring:
|
|||
redis:
|
||||
# 地址
|
||||
# host: 114.215.82.135
|
||||
# host: 127.0.0.1
|
||||
host: 13.70.28.14
|
||||
host: 127.0.0.1
|
||||
# host: 13.70.28.14
|
||||
# 端口,默认为6379
|
||||
port: 6379
|
||||
# 密码
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ import org.springframework.validation.annotation.Validated;
|
|||
@Api(value = "${functionName}管理",tags = "${functionName}管理")
|
||||
@RestController
|
||||
@RequestMapping("/${moduleName}/${businessName}")
|
||||
public class ${ClassName}Controller extends HcyBaseController {
|
||||
public class ${ClassName}Controller extends EBTSController {
|
||||
protected final Logger logger = LoggerFactory.getLogger(${ClassName}Controller.class);
|
||||
|
||||
@Autowired
|
||||
|
|
@ -57,7 +57,7 @@ public class ${ClassName}Controller extends HcyBaseController {
|
|||
*/
|
||||
@ApiOperation("查询${functionName}列表")
|
||||
@PreAuthorize("@ebts.hasPermi('${permissionPrefix}:list')")
|
||||
@PutMapping("/list")
|
||||
@PostMapping("/list")
|
||||
public Serializable list(@Validated @RequestBody ${ClassName} ${className}) {
|
||||
try {
|
||||
startPage(${className}.getPageInfo());
|
||||
|
|
@ -83,7 +83,7 @@ public class ${ClassName}Controller extends HcyBaseController {
|
|||
@ApiOperation("导出${functionName}列表")
|
||||
@PreAuthorize("@ebts.hasPermi('${permissionPrefix}:export')")
|
||||
@Log(title = "${functionName}", businessType = BusinessType.EXPORT)
|
||||
@PutMapping("/export")
|
||||
@PostMapping("/export")
|
||||
public AjaxResult export(@Validated @RequestBody ${ClassName} ${className}) {
|
||||
try {
|
||||
ServerResult<List<${ClassName}>> genServerResult = ${className}Service.select${ClassName}List(${className});
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@ import com.ebts.common.core.entity.${Entity};
|
|||
import com.ebts.common.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* ${functionName}对象 ${tableName}
|
||||
|
|
|
|||
|
|
@ -50,9 +50,9 @@ public class ${ClassName}ServiceImpl implements ${ClassName}Service {
|
|||
try {
|
||||
${ClassName} ${className} = ${className}Dao.select${ClassName}ById(${pkColumn.javaField});
|
||||
if (${className} != null){
|
||||
return new ServerResult<${ClassName}>(true,${className});
|
||||
return new ServerResult<>(true,${className});
|
||||
}else {
|
||||
return new ServerResult<${ClassName}>(false, ReturnConstants.RESULT_EMPTY);
|
||||
return new ServerResult<>(false, ReturnConstants.RESULT_EMPTY);
|
||||
}
|
||||
}catch (RuntimeException e){
|
||||
logger.error(e.getMessage());
|
||||
|
|
@ -71,13 +71,13 @@ public class ${ClassName}ServiceImpl implements ${ClassName}Service {
|
|||
try {
|
||||
List<${ClassName}> ${className}List = ${className}Dao.select${ClassName}List(${className});
|
||||
if (${className}List.size()>0){
|
||||
return new ServerResult<List<${ClassName}>>(true,${className}List);
|
||||
return new ServerResult<>(true,${className}List);
|
||||
}else {
|
||||
return new ServerResult<List<${ClassName}>>(false,ReturnConstants.RESULT_EMPTY);
|
||||
return new ServerResult<>(false,ReturnConstants.RESULT_EMPTY);
|
||||
}
|
||||
}catch (RuntimeException e){
|
||||
logger.error(e.getMessage());
|
||||
return new ServerResult<List<${ClassName}>>(false,ReturnConstants.DB_EX);
|
||||
return new ServerResult<>(false,ReturnConstants.DB_EX);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import request from '@/utils/request'
|
|||
export function list${BusinessName}(data) {
|
||||
return request({
|
||||
url: '/${moduleName}/${businessName}/list',
|
||||
method: 'put',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
|
@ -14,7 +14,7 @@ export function list${BusinessName}(data) {
|
|||
export function export${BusinessName}(data) {
|
||||
return request({
|
||||
url: '/${moduleName}/${businessName}/export',
|
||||
method: 'put',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -183,6 +183,11 @@
|
|||
|
||||
<el-table v-loading="loading" :data="${businessName}List" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="序号" type="index" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ ((queryParams.pageInfo.pageNum - 1) * queryParams.pageInfo.pageSize + scope.$index + 1)}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
#foreach($column in $columns)
|
||||
#set($javaField=$column.javaField)
|
||||
#set($parentheseIndex=$column.columnComment.indexOf("("))
|
||||
|
|
@ -191,7 +196,7 @@
|
|||
#else
|
||||
#set($comment=$column.columnComment)
|
||||
#end
|
||||
#if($column.pk)
|
||||
#if($column.pk && "" != $column.pk)
|
||||
<el-table-column label="${comment}" align="center" prop="${javaField}" />
|
||||
#elseif($column.list && $column.htmlType == "datetime")
|
||||
<el-table-column label="${comment}" align="center" prop="${javaField}" width="180">
|
||||
|
|
@ -252,8 +257,8 @@
|
|||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.params.pageNum"
|
||||
:limit.sync="queryParams.params.pageSize"
|
||||
:page.sync="queryParams.pageInfo.pageNum"
|
||||
:limit.sync="queryParams.pageInfo.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue