| | |
| | | import java.util.List; |
| | | import java.io.IOException; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | |
| | | * @author ${author} |
| | | * @date ${datetime} |
| | | */ |
| | | |
| | | @Tag(name = "${functionName}", description = "${functionName}接口") |
| | | @RestController |
| | | @RequestMapping("/${businessName}") |
| | | public class ${ClassName}Controller extends BaseController |
| | |
| | | /** |
| | | * 查询${functionName}列表 |
| | | */ |
| | | @Operation(summary = "查询${functionName}列表", description = "分页查询") |
| | | @RequiresPermissions("${permissionPrefix}:list") |
| | | @GetMapping("/list") |
| | | #if($table.crud || $table.sub) |
| | |
| | | /** |
| | | * 导出${functionName}列表 |
| | | */ |
| | | @Operation(summary = "导出${functionName}列表", description = "导出") |
| | | @RequiresPermissions("${permissionPrefix}:export") |
| | | @Log(title = "${functionName}", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | |
| | | /** |
| | | * 获取${functionName}详细信息 |
| | | */ |
| | | @Operation(summary = "获取${functionName}详细信息", description = "根据id获取") |
| | | @RequiresPermissions("${permissionPrefix}:query") |
| | | @GetMapping(value = "/{${pkColumn.javaField}}") |
| | | public AjaxResult getInfo(@PathVariable("${pkColumn.javaField}") ${pkColumn.javaType} ${pkColumn.javaField}) |
| | |
| | | /** |
| | | * 新增${functionName} |
| | | */ |
| | | @Operation(summary = "新增${functionName}", description = "单个新增") |
| | | @RequiresPermissions("${permissionPrefix}:add") |
| | | @Log(title = "${functionName}", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | |
| | | /** |
| | | * 修改${functionName} |
| | | */ |
| | | @Operation(summary = "修改${functionName}", description = "单个修改") |
| | | @RequiresPermissions("${permissionPrefix}:edit") |
| | | @Log(title = "${functionName}", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | |
| | | /** |
| | | * 删除${functionName} |
| | | */ |
| | | @Operation(summary = "删除${functionName}", description = "批量删除") |
| | | @RequiresPermissions("${permissionPrefix}:remove") |
| | | @Log(title = "${functionName}", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{${pkColumn.javaField}s}") |