修改单表代码生成模板

2.X
RuoYi 5 years ago
parent 6ee4efa284
commit 83460dfcb6

@ -63,12 +63,12 @@ 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)
@GetMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, ${ClassName} ${className}) throws IOException public void export(HttpServletResponse response, ${ClassName} ${className}) throws IOException
{ {
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);
return util.exportExcel(response, list, "${businessName}"); util.exportExcel(response, list, "${businessName}");
} }
/** /**

@ -5,9 +5,9 @@ import ${import};
#end #end
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.framework.aspectj.lang.annotation.Excel; import com.ruoyi.common.core.annotation.Excel;
#if($table.crud) #if($table.crud)
import com.ruoyi.framework.web.domain.BaseEntity; import com.ruoyi.common.core.web.domain.BaseEntity;
#elseif($table.tree) #elseif($table.tree)
import com.ruoyi.framework.web.domain.TreeEntity; import com.ruoyi.framework.web.domain.TreeEntity;
#end #end

Loading…
Cancel
Save