| | |
| | | import lombok.RequiredArgsConstructor; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.constraints.*; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import cn.dev33.satoken.annotation.SaCheckPermission; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.validation.annotation.Validated; |
| | |
| | | * 查询${functionName}列表 |
| | | */ |
| | | @ApiOperation("查询${functionName}列表") |
| | | @PreAuthorize("@ss.hasPermi('${permissionPrefix}:list')") |
| | | @SaCheckPermission("${permissionPrefix}:list") |
| | | @GetMapping("/list") |
| | | #if($table.crud || $table.sub) |
| | | public TableDataInfo<${ClassName}Vo> list(@Validated(QueryGroup.class) ${ClassName}Bo bo, PageQuery pageQuery) { |
| | |
| | | * 导出${functionName}列表 |
| | | */ |
| | | @ApiOperation("导出${functionName}列表") |
| | | @PreAuthorize("@ss.hasPermi('${permissionPrefix}:export')") |
| | | @SaCheckPermission("${permissionPrefix}:export") |
| | | @Log(title = "${functionName}", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(@Validated ${ClassName}Bo bo, HttpServletResponse response) { |
| | |
| | | * 获取${functionName}详细信息 |
| | | */ |
| | | @ApiOperation("获取${functionName}详细信息") |
| | | @PreAuthorize("@ss.hasPermi('${permissionPrefix}:query')") |
| | | @SaCheckPermission("${permissionPrefix}:query") |
| | | @GetMapping("/{${pkColumn.javaField}}") |
| | | public AjaxResult<${ClassName}Vo> getInfo(@ApiParam("主键") |
| | | @NotNull(message = "主键不能为空") |
| | |
| | | * 新增${functionName} |
| | | */ |
| | | @ApiOperation("新增${functionName}") |
| | | @PreAuthorize("@ss.hasPermi('${permissionPrefix}:add')") |
| | | @SaCheckPermission("${permissionPrefix}:add") |
| | | @Log(title = "${functionName}", businessType = BusinessType.INSERT) |
| | | @RepeatSubmit() |
| | | @PostMapping() |
| | |
| | | * 修改${functionName} |
| | | */ |
| | | @ApiOperation("修改${functionName}") |
| | | @PreAuthorize("@ss.hasPermi('${permissionPrefix}:edit')") |
| | | @SaCheckPermission("${permissionPrefix}:edit") |
| | | @Log(title = "${functionName}", businessType = BusinessType.UPDATE) |
| | | @RepeatSubmit() |
| | | @PutMapping() |
| | |
| | | * 删除${functionName} |
| | | */ |
| | | @ApiOperation("删除${functionName}") |
| | | @PreAuthorize("@ss.hasPermi('${permissionPrefix}:remove')") |
| | | @SaCheckPermission("${permissionPrefix}:remove") |
| | | @Log(title = "${functionName}" , businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{${pkColumn.javaField}s}") |
| | | public AjaxResult<Void> remove(@ApiParam("主键串") |