|
@@ -3,6 +3,9 @@ package ${packageName}.controller;
|
|
|
import java.util.List;
|
|
|
import javax.annotation.Resource;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
+
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
@@ -30,6 +33,7 @@ import com.doc.common.core.page.TableDataInfo;
|
|
|
* @author ${author}
|
|
|
* @date ${datetime}
|
|
|
*/
|
|
|
+@Api("${functionName}")
|
|
|
@RestController
|
|
|
@RequestMapping("/${moduleName}/${businessName}")
|
|
|
public class ${ClassName}Controller extends BaseController
|
|
@@ -40,6 +44,7 @@ public class ${ClassName}Controller extends BaseController
|
|
|
/**
|
|
|
* 查询${functionName}列表
|
|
|
*/
|
|
|
+ @ApiOperation("查询${functionName}列表")
|
|
|
@PreAuthorize("@ss.hasPermi('${permissionPrefix}:list')")
|
|
|
@GetMapping("/list")
|
|
|
#if($table.crud || $table.sub)
|
|
@@ -60,6 +65,7 @@ public class ${ClassName}Controller extends BaseController
|
|
|
/**
|
|
|
* 导出${functionName}列表
|
|
|
*/
|
|
|
+ @ApiOperation("导出${functionName}列表")
|
|
|
@PreAuthorize("@ss.hasPermi('${permissionPrefix}:export')")
|
|
|
@Log(title = "${functionName}", businessType = BusinessType.EXPORT)
|
|
|
@PostMapping("/export")
|
|
@@ -73,6 +79,7 @@ public class ${ClassName}Controller extends BaseController
|
|
|
/**
|
|
|
* 获取${functionName}详细信息
|
|
|
*/
|
|
|
+ @ApiOperation("获取${functionName}详细信息")
|
|
|
@PreAuthorize("@ss.hasPermi('${permissionPrefix}:query')")
|
|
|
@GetMapping(value = "/{${pkColumn.javaField}}")
|
|
|
public AjaxResult getInfo(@PathVariable("${pkColumn.javaField}") ${pkColumn.javaType} ${pkColumn.javaField})
|
|
@@ -83,6 +90,7 @@ public class ${ClassName}Controller extends BaseController
|
|
|
/**
|
|
|
* 新增${functionName}
|
|
|
*/
|
|
|
+ @ApiOperation("新增${functionName}")
|
|
|
@PreAuthorize("@ss.hasPermi('${permissionPrefix}:add')")
|
|
|
@Log(title = "${functionName}", businessType = BusinessType.INSERT)
|
|
|
@PostMapping
|
|
@@ -94,6 +102,7 @@ public class ${ClassName}Controller extends BaseController
|
|
|
/**
|
|
|
* 修改${functionName}
|
|
|
*/
|
|
|
+ @ApiOperation("修改${functionName}")
|
|
|
@PreAuthorize("@ss.hasPermi('${permissionPrefix}:edit')")
|
|
|
@Log(title = "${functionName}", businessType = BusinessType.UPDATE)
|
|
|
@PutMapping
|
|
@@ -105,6 +114,7 @@ public class ${ClassName}Controller extends BaseController
|
|
|
/**
|
|
|
* 删除${functionName}
|
|
|
*/
|
|
|
+ @ApiOperation("删除${functionName}")
|
|
|
@PreAuthorize("@ss.hasPermi('${permissionPrefix}:remove')")
|
|
|
@Log(title = "${functionName}", businessType = BusinessType.DELETE)
|
|
|
@DeleteMapping("/{${pkColumn.javaField}s}")
|