Browse Source

修改单表代码生成模板

tags/v2.1
RuoYi 5 years ago
parent
commit
83460dfcb6
  1. 4
      ruoyi-modules/ruoyi-gen/src/main/resources/vm/java/controller.java.vm
  2. 4
      ruoyi-modules/ruoyi-gen/src/main/resources/vm/java/domain.java.vm

4
ruoyi-modules/ruoyi-gen/src/main/resources/vm/java/controller.java.vm

@ -63,12 +63,12 @@ public class ${ClassName}Controller extends BaseController @@ -63,12 +63,12 @@ public class ${ClassName}Controller extends BaseController
*/
@PreAuthorize("@ss.hasPermi('${permissionPrefix}:export')")
@Log(title = "${functionName}", businessType = BusinessType.EXPORT)
@GetMapping("/export")
@PostMapping("/export")
public void export(HttpServletResponse response, ${ClassName} ${className}) throws IOException
{
List<${ClassName}> list = ${className}Service.select${ClassName}List(${className});
ExcelUtil<${ClassName}> util = new ExcelUtil<${ClassName}>(${ClassName}.class);
return util.exportExcel(response, list, "${businessName}");
util.exportExcel(response, list, "${businessName}");
}
/**

4
ruoyi-modules/ruoyi-gen/src/main/resources/vm/java/domain.java.vm

@ -5,9 +5,9 @@ import ${import}; @@ -5,9 +5,9 @@ import ${import};
#end
import org.apache.commons.lang3.builder.ToStringBuilder;
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)
import com.ruoyi.framework.web.domain.BaseEntity;
import com.ruoyi.common.core.web.domain.BaseEntity;
#elseif($table.tree)
import com.ruoyi.framework.web.domain.TreeEntity;
#end

Loading…
Cancel
Save