From 9da3b34b9cb3d872026e86eac86e1a6f84d5ca89 Mon Sep 17 00:00:00 2001 From: shawn <1524587436@qq.com> Date: Wed, 20 Apr 2022 21:37:59 +0800 Subject: [PATCH 01/14] =?UTF-8?q?=E7=AE=80=E5=8C=96=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E5=80=BC=E9=80=BB=E8=BE=91=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java index 544b6b59..83af0023 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java @@ -152,7 +152,7 @@ public class SysDeptServiceImpl implements ISysDeptService public boolean checkDeptExistUser(Long deptId) { int result = deptMapper.checkDeptExistUser(deptId); - return result > 0 ? true : false; + return result > 0; } /** From 6644d3077dfdda8fdc56ca36731a5b2e17fbb40a Mon Sep 17 00:00:00 2001 From: abbfun <819589789@qq.com> Date: Sat, 23 Apr 2022 13:44:57 +0000 Subject: [PATCH 02/14] =?UTF-8?q?spring-boot=20=E6=9C=80=E6=96=B0=E7=89=88?= =?UTF-8?q?=E6=9C=AC=202.6.7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 83ea1903..5ad8226d 100644 --- a/pom.xml +++ b/pom.xml @@ -17,7 +17,7 @@ UTF-8 UTF-8 1.8 - 2.6.6 + 2.6.7 2021.0.1 2021.1 2.0.4 From f63a76f661e852d3b2f6cb3c5ee02d07c49e9fa9 Mon Sep 17 00:00:00 2001 From: abbfun <819589789@qq.com> Date: Sat, 23 Apr 2022 14:36:48 +0000 Subject: [PATCH 03/14] =?UTF-8?q?spring-cloud.version=202021.0.1=20?= =?UTF-8?q?=E5=AE=98=E6=96=B9=E6=8E=A8=E8=8D=90=E5=AF=B9=E5=BA=94=20spring?= =?UTF-8?q?-cloud-alibaba=202021.0.1.0=20spring-cloud.version=202021.0.1?= =?UTF-8?q?=20=E5=AF=B9=E5=BA=94=20spring-cloud-alibaba=202021.0.1.0?= =?UTF-8?q?=EF=BC=8C=20=E5=AE=98=E6=96=B9=E8=AF=B4=E6=98=8E=20https://gith?= =?UTF-8?q?ub.com/alibaba/spring-cloud-alibaba/wiki/%E7%89%88%E6%9C%AC%E8%?= =?UTF-8?q?AF%B4%E6%98%8E#%E6%AF%95%E4%B8%9A%E7%89%88%E6%9C%AC%E4%BE%9D%E8?= =?UTF-8?q?%B5%96%E5%85%B3%E7%B3%BB%E6%8E%A8%E8%8D%90%E4%BD%BF%E7%94%A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 83ea1903..d0afa05f 100644 --- a/pom.xml +++ b/pom.xml @@ -19,7 +19,7 @@ 1.8 2.6.6 2021.0.1 - 2021.1 + 2021.0.1.0 2.0.4 2.6.6 2.2.2 From 68040827e2a68eb9b5a373a1a1502c2eca97f4f4 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sun, 24 Apr 2022 19:09:44 +0800 Subject: [PATCH 04/14] =?UTF-8?q?=E6=9C=80=E6=96=B0alibaba/seata=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E6=97=A0=E9=9C=80=E5=A4=84=E7=90=86=E5=BE=AA=E7=8E=AF?= =?UTF-8?q?=E5=BC=95=E7=94=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../env/ApplicationSeataInitializer.java | 26 ------------------- .../main/resources/META-INF/spring.factories | 2 -- 2 files changed, 28 deletions(-) delete mode 100644 ruoyi-common/ruoyi-common-datasource/src/main/java/com/ruoyi/common/datasource/env/ApplicationSeataInitializer.java delete mode 100644 ruoyi-common/ruoyi-common-datasource/src/main/resources/META-INF/spring.factories diff --git a/ruoyi-common/ruoyi-common-datasource/src/main/java/com/ruoyi/common/datasource/env/ApplicationSeataInitializer.java b/ruoyi-common/ruoyi-common-datasource/src/main/java/com/ruoyi/common/datasource/env/ApplicationSeataInitializer.java deleted file mode 100644 index 28394ead..00000000 --- a/ruoyi-common/ruoyi-common-datasource/src/main/java/com/ruoyi/common/datasource/env/ApplicationSeataInitializer.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.ruoyi.common.datasource.env; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.env.EnvironmentPostProcessor; -import org.springframework.core.Ordered; -import org.springframework.core.env.ConfigurableEnvironment; - -/** - * seata 在 springboot 2.6.x 存在循环引用问题的处理 - * - * @author ruoyi - */ -public class ApplicationSeataInitializer implements EnvironmentPostProcessor, Ordered -{ - @Override - public void postProcessEnvironment(ConfigurableEnvironment environment, SpringApplication application) - { - System.setProperty("spring.main.allow-circular-references", "true"); - } - - @Override - public int getOrder() - { - return Ordered.LOWEST_PRECEDENCE; - } -} diff --git a/ruoyi-common/ruoyi-common-datasource/src/main/resources/META-INF/spring.factories b/ruoyi-common/ruoyi-common-datasource/src/main/resources/META-INF/spring.factories deleted file mode 100644 index bdfc1f69..00000000 --- a/ruoyi-common/ruoyi-common-datasource/src/main/resources/META-INF/spring.factories +++ /dev/null @@ -1,2 +0,0 @@ -org.springframework.boot.env.EnvironmentPostProcessor=\ - com.ruoyi.common.datasource.env.ApplicationSeataInitializer From 9ec4d193847afab77133613f7131ced2f20bd671 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sun, 24 Apr 2022 19:10:13 +0800 Subject: [PATCH 05/14] update ry_config.sql --- sql/{ry_config_20220114.sql => ry_config_20220424.sql} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename sql/{ry_config_20220114.sql => ry_config_20220424.sql} (95%) diff --git a/sql/ry_config_20220114.sql b/sql/ry_config_20220424.sql similarity index 95% rename from sql/ry_config_20220114.sql rename to sql/ry_config_20220424.sql index 7420ed2a..a3466f3e 100644 --- a/sql/ry_config_20220114.sql +++ b/sql/ry_config_20220424.sql @@ -32,7 +32,7 @@ CREATE TABLE `config_info` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_info'; insert into config_info(id, data_id, group_id, content, md5, gmt_create, gmt_modified, src_user, src_ip, app_name, tenant_id, c_desc, c_use, effect, type, c_schema) values -(1,'application-dev.yml','DEFAULT_GROUP','spring:\n main:\n allow-circular-references: true\n allow-bean-definition-overriding: true\n autoconfigure:\n exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure\n mvc:\n pathmatch:\n matching-strategy: ant_path_matcher\n cloud:\n sentinel:\n filter:\n # sentinel 在 springboot 2.6.x 不兼容问题的处理\n enabled: false\n\n# feign 配置\nfeign:\n sentinel:\n enabled: true\n okhttp:\n enabled: true\n httpclient:\n enabled: false\n client:\n config:\n default:\n connectTimeout: 10000\n readTimeout: 10000\n compression:\n request:\n enabled: true\n response:\n enabled: true\n\n# 暴露监控端点\nmanagement:\n endpoints:\n web:\n exposure:\n include: \'*\'\n','e6a8dafc6fcec97f777836bea3ed5028','2020-05-20 12:00:00','2022-01-14 02:20:19','nacos','0:0:0:0:0:0:0:1','','','通用配置','null','null','yaml','null'), +(1,'application-dev.yml','DEFAULT_GROUP','spring:\n autoconfigure:\n exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure\n mvc:\n pathmatch:\n matching-strategy: ant_path_matcher\n\n# feign 配置\nfeign:\n sentinel:\n enabled: true\n okhttp:\n enabled: true\n httpclient:\n enabled: false\n client:\n config:\n default:\n connectTimeout: 10000\n readTimeout: 10000\n compression:\n request:\n enabled: true\n response:\n enabled: true\n\n# 暴露监控端点\nmanagement:\n endpoints:\n web:\n exposure:\n include: \'*\'\n','aaa73b809cfd4d0058893aa13da57806','2020-05-20 12:00:00','2022-04-24 10:26:34','nacos','0:0:0:0:0:0:0:1','','','通用配置','null','null','yaml','null'), (2,'ruoyi-gateway-dev.yml','DEFAULT_GROUP','spring:\n redis:\n host: localhost\n port: 6379\n password: \n cloud:\n gateway:\n discovery:\n locator:\n lowerCaseServiceId: true\n enabled: true\n routes:\n # 认证中心\n - id: ruoyi-auth\n uri: lb://ruoyi-auth\n predicates:\n - Path=/auth/**\n filters:\n # 验证码处理\n - CacheRequestFilter\n - ValidateCodeFilter\n - StripPrefix=1\n # 代码生成\n - id: ruoyi-gen\n uri: lb://ruoyi-gen\n predicates:\n - Path=/code/**\n filters:\n - StripPrefix=1\n # 定时任务\n - id: ruoyi-job\n uri: lb://ruoyi-job\n predicates:\n - Path=/schedule/**\n filters:\n - StripPrefix=1\n # 系统模块\n - id: ruoyi-system\n uri: lb://ruoyi-system\n predicates:\n - Path=/system/**\n filters:\n - StripPrefix=1\n # 文件服务\n - id: ruoyi-file\n uri: lb://ruoyi-file\n predicates:\n - Path=/file/**\n filters:\n - StripPrefix=1\n\n# 安全配置\nsecurity:\n # 验证码\n captcha:\n enabled: true\n type: math\n # 防止XSS攻击\n xss:\n enabled: true\n excludeUrls:\n - /system/notice\n # 不校验白名单\n ignore:\n whites:\n - /auth/logout\n - /auth/login\n - /auth/register\n - /*/v2/api-docs\n - /csrf\n','2f5a6b5a4ccf20b5801c5cf842456ec6','2020-05-14 14:17:55','2021-07-30 09:07:14',NULL,'0:0:0:0:0:0:0:1','','','网关模块','null','null','yaml','null'), (3,'ruoyi-auth-dev.yml','DEFAULT_GROUP','spring: \r\n redis:\r\n host: localhost\r\n port: 6379\r\n password: \r\n','b7354e1eb62c2d846d44a796d9ec6930','2020-11-20 00:00:00','2021-02-28 21:06:58',NULL,'0:0:0:0:0:0:0:1','','','认证中心','null','null','yaml','null'), (4,'ruoyi-monitor-dev.yml','DEFAULT_GROUP','# spring\r\nspring: \r\n security:\r\n user:\r\n name: ruoyi\r\n password: 123456\r\n boot:\r\n admin:\r\n ui:\r\n title: 若依服务状态监控\r\n','d8997d0707a2fd5d9fc4e8409da38129','2020-11-20 00:00:00','2020-12-21 16:28:07',NULL,'0:0:0:0:0:0:0:1','','','监控中心','null','null','yaml','null'), From 742f3106a2967a101187af120c67aad16658a08c Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sun, 24 Apr 2022 19:10:41 +0800 Subject: [PATCH 06/14] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=95=BF=E4=B8=BB?= =?UTF-8?q?=E9=94=AE=E6=BA=A2=E5=87=BA=E9=97=AE=E9=A2=98=20=E5=B0=86?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E8=BF=94=E5=9B=9E=E7=B1=BB=E5=9E=8B=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=20Long?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/system/SysPostMapper.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml index 6ac8e7c3..2425ae05 100644 --- a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml +++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml @@ -46,7 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where post_id = #{postId} - select p.post_id from sys_post p left join sys_user_post up on up.post_id = p.post_id From 6bc77169feaae48fd61d92f19c4435fcfef6209e Mon Sep 17 00:00:00 2001 From: RuoYi Date: Mon, 25 Apr 2022 10:29:46 +0800 Subject: [PATCH 07/14] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E9=A1=BA=E5=BA=8ForderNum=E7=B1=BB=E5=9E=8B=E4=B8=BA=E6=95=B4?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/ruoyi/system/api/domain/SysDept.java | 9 +++++---- .../src/main/resources/mapper/system/SysDeptMapper.xml | 6 +++--- .../src/main/resources/mapper/system/SysMenuMapper.xml | 6 +++--- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/SysDept.java b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/SysDept.java index 04a4e1b9..0290a0af 100644 --- a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/SysDept.java +++ b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/SysDept.java @@ -4,6 +4,7 @@ import java.util.ArrayList; import java.util.List; import javax.validation.constraints.Email; import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; @@ -31,7 +32,7 @@ public class SysDept extends BaseEntity private String deptName; /** 显示顺序 */ - private String orderNum; + private Integer orderNum; /** 负责人 */ private String leader; @@ -96,13 +97,13 @@ public class SysDept extends BaseEntity this.deptName = deptName; } - @NotBlank(message = "显示顺序不能为空") - public String getOrderNum() + @NotNull(message = "显示顺序不能为空") + public Integer getOrderNum() { return orderNum; } - public void setOrderNum(String orderNum) + public void setOrderNum(Integer orderNum) { this.orderNum = orderNum; } diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml index 3f40fb1b..62aab4c4 100644 --- a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml +++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml @@ -91,7 +91,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" parent_id, dept_name, ancestors, - order_num, + order_num, leader, phone, email, @@ -103,7 +103,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{parentId}, #{deptName}, #{ancestors}, - #{orderNum}, + #{orderNum}, #{leader}, #{phone}, #{email}, @@ -119,7 +119,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" parent_id = #{parentId}, dept_name = #{deptName}, ancestors = #{ancestors}, - order_num = #{orderNum}, + order_num = #{orderNum}, leader = #{leader}, phone = #{phone}, email = #{email}, diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml index 81e7b705..f11402c7 100644 --- a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml +++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml @@ -130,7 +130,7 @@ menu_name = #{menuName}, parent_id = #{parentId}, - order_num = #{orderNum}, + order_num = #{orderNum}, path = #{path}, component = #{component}, `query` = #{query}, @@ -153,7 +153,7 @@ menu_id, parent_id, menu_name, - order_num, + order_num, path, component, `query`, @@ -171,7 +171,7 @@ #{menuId}, #{parentId}, #{menuName}, - #{orderNum}, + #{orderNum}, #{path}, #{component}, #{query}, From 70f306418ff468bff1ed593a5f74194a2cc33573 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Mon, 25 Apr 2022 10:30:02 +0800 Subject: [PATCH 08/14] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E7=94=9F=E6=88=90=E6=A0=91=E5=BD=A2=E9=80=89=E6=8B=A9=E5=99=A8?= =?UTF-8?q?=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/vm/vue/v3/index-tree.vue.vm | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/v3/index-tree.vue.vm b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/v3/index-tree.vue.vm index 11bbe52e..862297c7 100644 --- a/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/v3/index-tree.vue.vm +++ b/ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/v3/index-tree.vue.vm @@ -174,11 +174,13 @@ #set($dictType=$column.dictType) #if("" != $treeParentCode && $column.javaField == $treeParentCode) - #elseif($column.htmlType == "input") @@ -354,8 +356,8 @@ function getList() { } /** 查询${functionName}下拉树结构 */ -async function getTreeselect() { - await list${BusinessName}().then(response => { +function getTreeselect() { + list${BusinessName}().then(response => { ${businessName}Options.value = []; const data = { ${treeCode}: 0, ${treeName}: '顶级节点', children: [] }; data.children = proxy.handleTree(response.data, "${treeCode}", "${treeParentCode}"); @@ -404,9 +406,9 @@ function resetQuery() { } /** 新增按钮操作 */ -async function handleAdd(row) { +function handleAdd(row) { reset(); - await getTreeselect(); + getTreeselect(); if (row != null && row.${treeCode}) { form.value.${treeParentCode} = row.${treeCode}; } else { From 5dbed465527fc3c5578254e62bc17ea65062df1c Mon Sep 17 00:00:00 2001 From: RuoYi Date: Mon, 9 May 2022 17:48:20 +0800 Subject: [PATCH 09/14] =?UTF-8?q?=E4=BC=98=E5=8C=96excel=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E8=A1=A8=E6=A0=BC=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/core/utils/poi/ExcelUtil.java | 70 +++++++++++-------- 1 file changed, 41 insertions(+), 29 deletions(-) diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java index bfa20379..25fd5b22 100644 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java +++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/utils/poi/ExcelUtil.java @@ -553,6 +553,46 @@ public class ExcelUtil style.setFont(totalFont); styles.put("total", style); + styles.putAll(annotationStyles(wb)); + + return styles; + } + + /** + * 根据Excel注解创建表格样式 + * + * @param wb 工作薄对象 + * @return 自定义样式列表 + */ + private Map annotationStyles(Workbook wb) + { + Map styles = new HashMap(); + for (Object[] os : fields) + { + Excel excel = (Excel) os[1]; + String key = "data_" + excel.align() + "_" + excel.color(); + if (!styles.containsKey(key)) + { + CellStyle style = wb.createCellStyle(); + style = wb.createCellStyle(); + style.setAlignment(excel.align()); + style.setVerticalAlignment(VerticalAlignment.CENTER); + style.setBorderRight(BorderStyle.THIN); + style.setRightBorderColor(IndexedColors.GREY_50_PERCENT.getIndex()); + style.setBorderLeft(BorderStyle.THIN); + style.setLeftBorderColor(IndexedColors.GREY_50_PERCENT.getIndex()); + style.setBorderTop(BorderStyle.THIN); + style.setTopBorderColor(IndexedColors.GREY_50_PERCENT.getIndex()); + style.setBorderBottom(BorderStyle.THIN); + style.setBottomBorderColor(IndexedColors.GREY_50_PERCENT.getIndex()); + Font dataFont = wb.createFont(); + dataFont.setFontName("Arial"); + dataFont.setFontHeightInPoints((short) 10); + dataFont.setColor(excel.color().index); + style.setFont(dataFont); + styles.put(key, style); + } + } return styles; } @@ -674,7 +714,7 @@ public class ExcelUtil { // 创建cell cell = row.createCell(column); - setDataCell(cell, attr); + cell.setCellStyle(styles.get("data_" + attr.align() + "_" + attr.color())); // 用于读取对象中的属性 Object value = getTargetValue(vo, field, attr); @@ -712,34 +752,6 @@ public class ExcelUtil return cell; } - /** - * 设置单元格样式 - * - * @param cell 单元格 - * @param excel 注解信息 - */ - public void setDataCell(Cell cell, Excel excel) - { - CellStyle style = wb.createCellStyle(); - style.setAlignment(HorizontalAlignment.CENTER); - style.setVerticalAlignment(VerticalAlignment.CENTER); - style.setBorderRight(BorderStyle.THIN); - style.setRightBorderColor(IndexedColors.GREY_50_PERCENT.getIndex()); - style.setBorderLeft(BorderStyle.THIN); - style.setLeftBorderColor(IndexedColors.GREY_50_PERCENT.getIndex()); - style.setBorderTop(BorderStyle.THIN); - style.setTopBorderColor(IndexedColors.GREY_50_PERCENT.getIndex()); - style.setBorderBottom(BorderStyle.THIN); - style.setBottomBorderColor(IndexedColors.GREY_50_PERCENT.getIndex()); - style.setAlignment(excel.align()); - Font dataFont = wb.createFont(); - dataFont.setFontName("Arial"); - dataFont.setFontHeightInPoints((short) 10); - dataFont.setColor(excel.color().index); - style.setFont(dataFont); - cell.setCellStyle(style); - } - /** * 设置 POI XSSFSheet 单元格提示或选择框 * From 103bf66f77ba435b580d1642d773e508842c1f8e Mon Sep 17 00:00:00 2001 From: RuoYi Date: Tue, 10 May 2022 10:17:17 +0800 Subject: [PATCH 10/14] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AD=97=E5=85=B8?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=98=BE=E7=A4=BA=E4=B8=8D=E5=85=A8=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/views/system/dict/data.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ruoyi-ui/src/views/system/dict/data.vue b/ruoyi-ui/src/views/system/dict/data.vue index 2bd8cbb5..1d0be70a 100644 --- a/ruoyi-ui/src/views/system/dict/data.vue +++ b/ruoyi-ui/src/views/system/dict/data.vue @@ -191,7 +191,7 @@