|
@ -1,5 +1,7 @@ |
|
|
package ${packageName}.controller; |
|
|
package ${packageName}.controller; |
|
|
|
|
|
import io.swagger.annotations.ApiImplicitParam; |
|
|
|
|
|
import io.swagger.annotations.ApiImplicitParams; |
|
|
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
import java.util.List; |
|
|
import java.util.List; |
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
import org.springframework.security.access.prepost.PreAuthorize; |
|
|
import org.springframework.security.access.prepost.PreAuthorize; |
|
@ -71,10 +73,10 @@ public class ${ClassName}Controller extends BaseController |
|
|
@PreAuthorize("@ss.hasPermi('${permissionPrefix}:export')") |
|
|
@PreAuthorize("@ss.hasPermi('${permissionPrefix}:export')") |
|
|
@Log(title = "${functionName}", businessType = BusinessType.EXPORT) |
|
|
@Log(title = "${functionName}", businessType = BusinessType.EXPORT) |
|
|
@PostMapping("/export") |
|
|
@PostMapping("/export") |
|
|
public void export(HttpServletResponse response, ${ClassName} ${ClassName}) |
|
|
public void export(HttpServletResponse response,${ClassName} ${ClassName}) |
|
|
{ |
|
|
{ |
|
|
List< ${ClassName}> list = ${className}Service.select ${ClassName}List(${ClassName}); |
|
|
List<${ClassName}> list = ${className}Service.select${ClassName}List(${ClassName}); |
|
|
ExcelUtil< ${ClassName}> util = new ExcelUtil<(${ClassName}>(${ClassName}.class); |
|
|
ExcelUtil<${ClassName}> util = new ExcelUtil<${ClassName}>(${ClassName}.class); |
|
|
util.exportExcel(response, list, "${functionName}数据"); |
|
|
util.exportExcel(response, list, "${functionName}数据"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|