From 6225c567da0bfeb08d97333f8b5999e5afc552ad Mon Sep 17 00:00:00 2001
From: heheng <475597332@qq.com>
Date: 星期五, 18 七月 2025 14:11:14 +0800
Subject: [PATCH] 修改权限问题
---
multi-system/src/main/java/com/gkhy/exam/system/service/impl/CompanyIndustryTemplateServiceImpl.java | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/multi-system/src/main/java/com/gkhy/exam/system/service/impl/CompanyIndustryTemplateServiceImpl.java b/multi-system/src/main/java/com/gkhy/exam/system/service/impl/CompanyIndustryTemplateServiceImpl.java
index 856bce3..627b4e0 100644
--- a/multi-system/src/main/java/com/gkhy/exam/system/service/impl/CompanyIndustryTemplateServiceImpl.java
+++ b/multi-system/src/main/java/com/gkhy/exam/system/service/impl/CompanyIndustryTemplateServiceImpl.java
@@ -1,5 +1,6 @@
package com.gkhy.exam.system.service.impl;
+import cn.hutool.core.collection.ListUtil;
import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gkhy.exam.common.api.CommonPage;
@@ -191,13 +192,17 @@
return CommonResult.failed(errorBuilder.toString());
}
+ List<List<CompanyIndustryTemplate>> split = ListUtil.split(companyIndustryTemplates, 50);
+ for (List<CompanyIndustryTemplate> industryTemplates : split) {
+ int affectedRows = companyIndustryTemplateMapper.insertIndustrys(industryTemplates);
+ }
// 8. 批量插入
- int affectedRows = companyIndustryTemplateMapper.insertIndustrys(companyIndustryTemplates);
+// int affectedRows = companyIndustryTemplateMapper.insertIndustrys(companyIndustryTemplates);
workbook.close();
- if (affectedRows < 1) {
- throw new ApiException("导入行业模版失败");
- }
+// if (affectedRows < 1) {
+// throw new ApiException("导入行业模版失败");
+// }
return CommonResult.success();
}
// 安全获取单元格值
--
Gitblit v1.9.2