diff --git a/src/main/java/org/yangliu/codegenerate/Main.java b/src/main/java/org/yangliu/codegenerate/Main.java index df8a306..4ad8154 100644 --- a/src/main/java/org/yangliu/codegenerate/Main.java +++ b/src/main/java/org/yangliu/codegenerate/Main.java @@ -69,7 +69,8 @@ public class Main { String user = "enjoy"; String password = "Nomi1234"; //2.选择表配置 - String json="{\"oqc_spot_check_record\":\"抽检记录\",\"oqc_shipment_record\":\"成品出货记录\",\"oqc_1008_record\":\"1008仓台账\",\"oqc_after_sales_record\":\"售后记录\",\"oqc_special_sample\":\"特殊样件\",\"oqc_product_record\":\"产品追溯\",\"oqc_ncr_record\":\"NCR明细\",\"oqc_qrqc_record\":\"QRQC明细\"}"; + //String json="{\"oqc_spot_check_record\":\"抽检记录\",\"oqc_shipment_record\":\"成品出货记录\",\"oqc_1008_record\":\"1008仓台账\",\"oqc_after_sales_record\":\"售后记录\",\"oqc_special_sample\":\"特殊样件\",\"oqc_product_record\":\"产品追溯\",\"oqc_ncr_record\":\"NCR明细\",\"oqc_qrqc_record\":\"QRQC明细\"}"; + String json="{\"oqc_lnspection_template\":\"检验模板\",\"oqc_sampling_plan\":\"抽样方案\",\"oqc_report_template\":\"报告模板\"}"; JSONObject tables = JSONObject.parseObject(json); for (String table : tables.keySet()) { String entityName = TableFieldUtil.tableNameToEntityName(table); diff --git a/src/main/resources/yangliu/XXXController.javai b/src/main/resources/yangliu/XXXController.javai index ba98e7f..fcc6f19 100644 --- a/src/main/resources/yangliu/XXXController.javai +++ b/src/main/resources/yangliu/XXXController.javai @@ -139,6 +139,7 @@ public class ${entityName}Controller extends BaseController { /** * 导入模板 */ + @ApiOperation( value ="导入模板", notes ="导入模板", httpMethod ="POST") @PostMapping("/importTemplate") public void importTemplate(HttpServletResponse response) throws IOException { ${entityName?uncap_first}Service.importTemplateExcel(response); diff --git a/src/main/resources/yangliu/XXXEntity.javai b/src/main/resources/yangliu/XXXEntity.javai index d9b4f56..7b35b1f 100644 --- a/src/main/resources/yangliu/XXXEntity.javai +++ b/src/main/resources/yangliu/XXXEntity.javai @@ -32,6 +32,10 @@ public class ${entityName} extends BaseEntity{ <#if po.fieldName == primaryKeyField> @TableId(type = IdType.ASSIGN_ID) <#else> +<#if po.fieldComment !=''> + /**${po.fieldComment}*/ + @ApiModelProperty(value = "${po.fieldComment}") + <#if po.fieldType =='Date'> <#if po.fieldDbType =='date'> @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") @@ -43,13 +47,6 @@ public class ${entityName} extends BaseEntity{ <#else> - - <#if po.fieldComment !=''> - /**${po.fieldComment}*/ - @Excel(name = "${po.fieldComment}", width = 15) - @ExcelImport("${po.fieldComment}") - @ApiModelProperty(value = "${po.fieldComment}") - @TableField(value="${po.fieldColumn}") <#if po.fieldName == 'delFlag'> @TableLogic