feat信贷客户家庭关系
This commit is contained in:
@@ -25,6 +25,7 @@ import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -192,6 +193,11 @@ public class CcdiBaseStaffController extends BaseController {
|
||||
int fromIndex = (pageNum - 1) * pageSize;
|
||||
int toIndex = Math.min(fromIndex + pageSize, failures.size());
|
||||
|
||||
// 检查 fromIndex 是否超出范围
|
||||
if (fromIndex >= failures.size()) {
|
||||
return getDataTable(new ArrayList<>(), failures.size());
|
||||
}
|
||||
|
||||
List<ImportFailureVO> pageData = failures.subList(fromIndex, toIndex);
|
||||
|
||||
return getDataTable(pageData, failures.size());
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.ruoyi.ccdi.controller;
|
||||
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.ccdi.domain.dto.CcdiCustFmyRelationAddDTO;
|
||||
import com.ruoyi.ccdi.domain.dto.CcdiCustFmyRelationEditDTO;
|
||||
@@ -8,21 +7,29 @@ import com.ruoyi.ccdi.domain.dto.CcdiCustFmyRelationQueryDTO;
|
||||
import com.ruoyi.ccdi.domain.excel.CcdiCustFmyRelationExcel;
|
||||
import com.ruoyi.ccdi.domain.vo.CcdiCustFmyRelationVO;
|
||||
import com.ruoyi.ccdi.domain.vo.CustFmyRelationImportFailureVO;
|
||||
import com.ruoyi.ccdi.domain.vo.ImportResultVO;
|
||||
import com.ruoyi.ccdi.domain.vo.ImportStatusVO;
|
||||
import com.ruoyi.ccdi.service.ICcdiCustFmyRelationImportService;
|
||||
import com.ruoyi.ccdi.service.ICcdiCustFmyRelationService;
|
||||
import com.ruoyi.ccdi.utils.EasyExcelUtil;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.PageDomain;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.page.TableSupport;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -40,7 +47,7 @@ public class CcdiCustFmyRelationController extends BaseController {
|
||||
private ICcdiCustFmyRelationService relationService;
|
||||
|
||||
@Resource
|
||||
private RedisTemplate<String, Object> redisTemplate;
|
||||
private ICcdiCustFmyRelationImportService relationImportService;
|
||||
|
||||
/**
|
||||
* 查询信贷客户家庭关系列表
|
||||
@@ -49,8 +56,9 @@ public class CcdiCustFmyRelationController extends BaseController {
|
||||
@PreAuthorize("@ss.hasPermi('ccdi:custFmyRelation:query')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(CcdiCustFmyRelationQueryDTO query) {
|
||||
startPage();
|
||||
Page<CcdiCustFmyRelationVO> page = relationService.selectRelationPage(query, getPageNum(), getPageSize());
|
||||
PageDomain pageDomain = TableSupport.buildPageRequest();
|
||||
Page<CcdiCustFmyRelationVO> page = relationService.selectRelationPage(
|
||||
query, pageDomain.getPageNum(), pageDomain.getPageSize());
|
||||
return getDataTable(page.getRecords(), page.getTotal());
|
||||
}
|
||||
|
||||
@@ -100,35 +108,49 @@ public class CcdiCustFmyRelationController extends BaseController {
|
||||
*/
|
||||
@Operation(summary = "导出信贷客户家庭关系")
|
||||
@PreAuthorize("@ss.hasPermi('ccdi:custFmyRelation:export')")
|
||||
@Log(title = "信贷客户家庭关系", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, CcdiCustFmyRelationQueryDTO query) {
|
||||
relationService.exportRelations(query, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 下载导入模板
|
||||
* 下载带字典下拉框的导入模板
|
||||
* 使用@DictDropdown注解自动添加下拉框
|
||||
*/
|
||||
@Operation(summary = "下载导入模板")
|
||||
@PreAuthorize("@ss.hasPermi('ccdi:custFmyRelation:import')")
|
||||
@PostMapping("/importTemplate")
|
||||
public void importTemplate(HttpServletResponse response) {
|
||||
relationService.importTemplate(response);
|
||||
EasyExcelUtil.importTemplateWithDictDropdown(response, CcdiCustFmyRelationExcel.class, "信贷客户家庭关系");
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入信贷客户家庭关系
|
||||
* 异步导入信贷客户家庭关系
|
||||
*/
|
||||
@Operation(summary = "导入信贷客户家庭关系")
|
||||
@Operation(summary = "异步导入信贷客户家庭关系")
|
||||
@PreAuthorize("@ss.hasPermi('ccdi:custFmyRelation:import')")
|
||||
@Log(title = "信贷客户家庭关系", businessType = BusinessType.IMPORT)
|
||||
@PostMapping("/importData")
|
||||
public AjaxResult importData(@RequestParam("file") MultipartFile file) throws IOException {
|
||||
List<CcdiCustFmyRelationExcel> excels = EasyExcel.read(file.getInputStream())
|
||||
.head(CcdiCustFmyRelationExcel.class)
|
||||
.sheet()
|
||||
.doReadSync();
|
||||
List<CcdiCustFmyRelationExcel> excels = EasyExcelUtil.importExcel(
|
||||
file.getInputStream(),
|
||||
CcdiCustFmyRelationExcel.class
|
||||
);
|
||||
|
||||
if (excels == null || excels.isEmpty()) {
|
||||
return error("至少需要一条数据");
|
||||
}
|
||||
|
||||
// 提交异步任务
|
||||
String taskId = relationService.importRelations(excels);
|
||||
return success("导入任务已提交,任务ID: " + taskId);
|
||||
|
||||
// 立即返回,不等待后台任务完成
|
||||
ImportResultVO result = new ImportResultVO();
|
||||
result.setTaskId(taskId);
|
||||
result.setStatus("PROCESSING");
|
||||
result.setMessage("导入任务已提交,正在后台处理");
|
||||
|
||||
return AjaxResult.success("导入任务已提交,正在后台处理", result);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -138,9 +160,8 @@ public class CcdiCustFmyRelationController extends BaseController {
|
||||
@PreAuthorize("@ss.hasPermi('ccdi:custFmyRelation:query')")
|
||||
@GetMapping("/importStatus/{taskId}")
|
||||
public AjaxResult getImportStatus(@PathVariable("taskId") String taskId) {
|
||||
// 从Redis获取任务状态
|
||||
Object status = redisTemplate.opsForValue().get("import:custFmyRelation:" + taskId);
|
||||
return success(status);
|
||||
ImportStatusVO statusVO = relationImportService.getImportStatus(taskId);
|
||||
return success(statusVO);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -150,9 +171,23 @@ public class CcdiCustFmyRelationController extends BaseController {
|
||||
@PreAuthorize("@ss.hasPermi('ccdi:custFmyRelation:query')")
|
||||
@GetMapping("/importFailures/{taskId}")
|
||||
public TableDataInfo getImportFailures(
|
||||
@PathVariable("taskId") String taskId) {
|
||||
startPage();
|
||||
List<CustFmyRelationImportFailureVO> failures = relationService.getImportFailures(taskId);
|
||||
return getDataTable(failures, (long) failures.size());
|
||||
@PathVariable("taskId") String taskId,
|
||||
@RequestParam(defaultValue = "1") Integer pageNum,
|
||||
@RequestParam(defaultValue = "10") Integer pageSize) {
|
||||
|
||||
List<CustFmyRelationImportFailureVO> failures = relationImportService.getImportFailures(taskId);
|
||||
|
||||
// 手动分页
|
||||
int fromIndex = (pageNum - 1) * pageSize;
|
||||
int toIndex = Math.min(fromIndex + pageSize, failures.size());
|
||||
|
||||
// 检查 fromIndex 是否超出范围
|
||||
if (fromIndex >= failures.size()) {
|
||||
return getDataTable(new ArrayList<>(), failures.size());
|
||||
}
|
||||
|
||||
List<CustFmyRelationImportFailureVO> pageData = failures.subList(fromIndex, toIndex);
|
||||
|
||||
return getDataTable(pageData, failures.size());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -262,6 +263,11 @@ public class CcdiIntermediaryController extends BaseController {
|
||||
int fromIndex = (pageNum - 1) * pageSize;
|
||||
int toIndex = Math.min(fromIndex + pageSize, failures.size());
|
||||
|
||||
// 检查 fromIndex 是否超出范围
|
||||
if (fromIndex >= failures.size()) {
|
||||
return getDataTable(new ArrayList<>(), failures.size());
|
||||
}
|
||||
|
||||
List<IntermediaryPersonImportFailureVO> pageData = failures.subList(fromIndex, toIndex);
|
||||
|
||||
return getDataTable(pageData, failures.size());
|
||||
@@ -300,6 +306,11 @@ public class CcdiIntermediaryController extends BaseController {
|
||||
int fromIndex = (pageNum - 1) * pageSize;
|
||||
int toIndex = Math.min(fromIndex + pageSize, failures.size());
|
||||
|
||||
// 检查 fromIndex 是否超出范围
|
||||
if (fromIndex >= failures.size()) {
|
||||
return getDataTable(new ArrayList<>(), failures.size());
|
||||
}
|
||||
|
||||
List<IntermediaryEntityImportFailureVO> pageData = failures.subList(fromIndex, toIndex);
|
||||
|
||||
return getDataTable(pageData, failures.size());
|
||||
|
||||
@@ -29,6 +29,7 @@ import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -188,6 +189,11 @@ public class CcdiPurchaseTransactionController extends BaseController {
|
||||
int fromIndex = (pageNum - 1) * pageSize;
|
||||
int toIndex = Math.min(fromIndex + pageSize, failures.size());
|
||||
|
||||
// 检查 fromIndex 是否超出范围
|
||||
if (fromIndex >= failures.size()) {
|
||||
return getDataTable(new ArrayList<>(), failures.size());
|
||||
}
|
||||
|
||||
List<PurchaseTransactionImportFailureVO> pageData = failures.subList(fromIndex, toIndex);
|
||||
|
||||
return getDataTable(pageData, failures.size());
|
||||
|
||||
@@ -29,6 +29,7 @@ import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -188,6 +189,11 @@ public class CcdiStaffEnterpriseRelationController extends BaseController {
|
||||
int fromIndex = (pageNum - 1) * pageSize;
|
||||
int toIndex = Math.min(fromIndex + pageSize, failures.size());
|
||||
|
||||
// 检查 fromIndex 是否超出范围
|
||||
if (fromIndex >= failures.size()) {
|
||||
return getDataTable(new ArrayList<>(), failures.size());
|
||||
}
|
||||
|
||||
List<StaffEnterpriseRelationImportFailureVO> pageData = failures.subList(fromIndex, toIndex);
|
||||
|
||||
return getDataTable(pageData, failures.size());
|
||||
|
||||
@@ -29,6 +29,7 @@ import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -188,6 +189,11 @@ public class CcdiStaffFmyRelationController extends BaseController {
|
||||
int fromIndex = (pageNum - 1) * pageSize;
|
||||
int toIndex = Math.min(fromIndex + pageSize, failures.size());
|
||||
|
||||
// 检查 fromIndex 是否超出范围
|
||||
if (fromIndex >= failures.size()) {
|
||||
return getDataTable(new ArrayList<>(), failures.size());
|
||||
}
|
||||
|
||||
List<StaffFmyRelationImportFailureVO> pageData = failures.subList(fromIndex, toIndex);
|
||||
|
||||
return getDataTable(pageData, failures.size());
|
||||
|
||||
@@ -29,6 +29,7 @@ import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -186,6 +187,11 @@ public class CcdiStaffRecruitmentController extends BaseController {
|
||||
int fromIndex = (pageNum - 1) * pageSize;
|
||||
int toIndex = Math.min(fromIndex + pageSize, failures.size());
|
||||
|
||||
// 检查 fromIndex 是否超出范围
|
||||
if (fromIndex >= failures.size()) {
|
||||
return getDataTable(new ArrayList<>(), failures.size());
|
||||
}
|
||||
|
||||
List<RecruitmentImportFailureVO> pageData = failures.subList(fromIndex, toIndex);
|
||||
|
||||
return getDataTable(pageData, failures.size());
|
||||
|
||||
@@ -29,6 +29,7 @@ import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -188,6 +189,11 @@ public class CcdiStaffTransferController extends BaseController {
|
||||
int fromIndex = (pageNum - 1) * pageSize;
|
||||
int toIndex = Math.min(fromIndex + pageSize, failures.size());
|
||||
|
||||
// 检查 fromIndex 是否超出范围
|
||||
if (fromIndex >= failures.size()) {
|
||||
return getDataTable(new ArrayList<>(), failures.size());
|
||||
}
|
||||
|
||||
List<StaffTransferImportFailureVO> pageData = failures.subList(fromIndex, toIndex);
|
||||
|
||||
return getDataTable(pageData, failures.size());
|
||||
|
||||
@@ -33,6 +33,10 @@ public class CcdiCustFmyRelationVO implements Serializable {
|
||||
@Schema(description = "关系类型")
|
||||
private String relationType;
|
||||
|
||||
/** 关系类型名称 */
|
||||
@Schema(description = "关系类型名称")
|
||||
private String relationTypeName;
|
||||
|
||||
/** 关系人姓名 */
|
||||
@Schema(description = "关系人姓名")
|
||||
private String relationName;
|
||||
@@ -54,6 +58,10 @@ public class CcdiCustFmyRelationVO implements Serializable {
|
||||
@Schema(description = "关系人证件类型")
|
||||
private String relationCertType;
|
||||
|
||||
/** 关系人证件类型名称 */
|
||||
@Schema(description = "关系人证件类型名称")
|
||||
private String relationCertTypeName;
|
||||
|
||||
/** 关系人证件号码 */
|
||||
@Schema(description = "关系人证件号码")
|
||||
private String relationCertNo;
|
||||
|
||||
@@ -62,4 +62,13 @@ public interface CcdiCustFmyRelationMapper extends BaseMapper<CcdiCustFmyRelatio
|
||||
* @return 关系数量
|
||||
*/
|
||||
int countByCertNo(@Param("relationCertNo") String relationCertNo);
|
||||
|
||||
/**
|
||||
* 批量查询已存在的关系组合(性能优化)
|
||||
* 一次性查询所有 person_id + relation_type + relation_cert_no 组合
|
||||
*
|
||||
* @param combinations 组合列表,格式为 "personId|relationType|relationCertNo"
|
||||
* @return 已存在的组合列表
|
||||
*/
|
||||
List<String> batchExistsByCombinations(@Param("combinations") List<String> combinations);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.ruoyi.ccdi.service;
|
||||
|
||||
import com.ruoyi.ccdi.domain.excel.CcdiCustFmyRelationExcel;
|
||||
import com.ruoyi.ccdi.domain.vo.CustFmyRelationImportFailureVO;
|
||||
import com.ruoyi.ccdi.domain.vo.ImportStatusVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -18,8 +19,9 @@ public interface ICcdiCustFmyRelationImportService {
|
||||
*
|
||||
* @param excels Excel数据列表
|
||||
* @param taskId 任务ID
|
||||
* @param userName 用户名
|
||||
*/
|
||||
void importRelationsAsync(List<CcdiCustFmyRelationExcel> excels, String taskId);
|
||||
void importRelationsAsync(List<CcdiCustFmyRelationExcel> excels, String taskId, String userName);
|
||||
|
||||
/**
|
||||
* 校验单条数据
|
||||
@@ -37,4 +39,12 @@ public interface ICcdiCustFmyRelationImportService {
|
||||
* @return 失败记录列表
|
||||
*/
|
||||
List<CustFmyRelationImportFailureVO> getImportFailures(String taskId);
|
||||
|
||||
/**
|
||||
* 查询导入状态
|
||||
*
|
||||
* @param taskId 任务ID
|
||||
* @return 导入状态信息
|
||||
*/
|
||||
ImportStatusVO getImportStatus(String taskId);
|
||||
}
|
||||
|
||||
@@ -1,33 +1,37 @@
|
||||
package com.ruoyi.ccdi.service.impl;
|
||||
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.ruoyi.ccdi.domain.CcdiCustFmyRelation;
|
||||
import com.ruoyi.ccdi.domain.excel.CcdiCustFmyRelationExcel;
|
||||
import com.ruoyi.ccdi.domain.vo.CustFmyRelationImportFailureVO;
|
||||
import com.ruoyi.ccdi.domain.vo.ImportResult;
|
||||
import com.ruoyi.ccdi.domain.vo.ImportStatusVO;
|
||||
import com.ruoyi.ccdi.mapper.CcdiCustFmyRelationMapper;
|
||||
import com.ruoyi.ccdi.service.ICcdiCustFmyRelationImportService;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.ccdi.utils.ImportLogUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.scheduling.annotation.EnableAsync;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 信贷客户家庭关系导入Service实现
|
||||
* 信贷客户家庭关系异步导入服务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-02-11
|
||||
*/
|
||||
@Service
|
||||
@EnableAsync
|
||||
public class CcdiCustFmyRelationImportServiceImpl implements ICcdiCustFmyRelationImportService {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(CcdiCustFmyRelationImportServiceImpl.class);
|
||||
@@ -38,128 +42,261 @@ public class CcdiCustFmyRelationImportServiceImpl implements ICcdiCustFmyRelatio
|
||||
@Resource
|
||||
private RedisTemplate<String, Object> redisTemplate;
|
||||
|
||||
private static final String IMPORT_TASK_KEY_PREFIX = "import:custFmyRelation:";
|
||||
private static final String IMPORT_FAILURE_KEY_PREFIX = "import:custFmyRelation:failures:";
|
||||
|
||||
@Async
|
||||
@Override
|
||||
@Async
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void importRelationsAsync(List<CcdiCustFmyRelationExcel> excels, String taskId) {
|
||||
List<CcdiCustFmyRelation> validRelations = new ArrayList<>();
|
||||
public void importRelationsAsync(List<CcdiCustFmyRelationExcel> excels, String taskId, String userName) {
|
||||
long startTime = System.currentTimeMillis();
|
||||
|
||||
// 记录导入开始
|
||||
ImportLogUtils.logImportStart(log, taskId, "信贷客户家庭关系", excels.size(), userName);
|
||||
|
||||
List<CcdiCustFmyRelation> newRecords = new ArrayList<>();
|
||||
List<CustFmyRelationImportFailureVO> failures = new ArrayList<>();
|
||||
|
||||
try {
|
||||
for (int i = 0; i < excels.size(); i++) {
|
||||
CcdiCustFmyRelationExcel excel = excels.get(i);
|
||||
Integer rowNum = i + 2; // Excel行号从2开始(第1行是表头)
|
||||
// 批量查询已存在的 person_id + relation_type + relation_cert_no 组合
|
||||
ImportLogUtils.logBatchQueryStart(log, taskId, "已存在的客户家庭关系组合", excels.size());
|
||||
Set<String> existingCombinations = getExistingCombinations(excels);
|
||||
ImportLogUtils.logBatchQueryComplete(log, taskId, "客户家庭关系组合", existingCombinations.size());
|
||||
|
||||
String errorMessage = validateExcelRow(excel, rowNum);
|
||||
if (errorMessage != null) {
|
||||
CustFmyRelationImportFailureVO failure = new CustFmyRelationImportFailureVO();
|
||||
failure.setRowNum(rowNum);
|
||||
failure.setPersonId(excel.getPersonId());
|
||||
failure.setRelationType(excel.getRelationType());
|
||||
failure.setRelationName(excel.getRelationName());
|
||||
failure.setErrorMessage(errorMessage);
|
||||
failures.add(failure);
|
||||
continue;
|
||||
// 用于跟踪Excel文件内已处理的组合
|
||||
Set<String> processedCombinations = new HashSet<>();
|
||||
|
||||
// 分类数据
|
||||
for (int i = 0; i < excels.size(); i++) {
|
||||
CcdiCustFmyRelationExcel excel = excels.get(i);
|
||||
|
||||
try {
|
||||
// 验证数据
|
||||
validateExcelRow(excel);
|
||||
|
||||
String combination = excel.getPersonId() + "|" + excel.getRelationType() + "|" + excel.getRelationCertNo();
|
||||
|
||||
CcdiCustFmyRelation relation = new CcdiCustFmyRelation();
|
||||
BeanUtils.copyProperties(excel, relation);
|
||||
|
||||
if (existingCombinations.contains(combination)) {
|
||||
// 组合已存在,直接报错
|
||||
throw new RuntimeException(String.format(
|
||||
"信贷客户身份证号[%s]、关系类型[%s]和关系人证件号码[%s]的组合已存在,请勿重复导入",
|
||||
excel.getPersonId(), excel.getRelationType(), excel.getRelationCertNo()));
|
||||
} else if (processedCombinations.contains(combination)) {
|
||||
// Excel文件内部重复
|
||||
throw new RuntimeException(String.format(
|
||||
"信贷客户身份证号[%s]、关系类型[%s]和关系人证件号码[%s]的组合在导入文件中重复,已跳过此条记录",
|
||||
excel.getPersonId(), excel.getRelationType(), excel.getRelationCertNo()));
|
||||
} else {
|
||||
relation.setCreatedBy(userName);
|
||||
relation.setUpdatedBy(userName);
|
||||
|
||||
// 设置默认值
|
||||
relation.setStatus(1); // 默认有效状态
|
||||
relation.setIsEmpFamily(false);
|
||||
relation.setIsCustFamily(true);
|
||||
relation.setDataSource("IMPORT");
|
||||
|
||||
newRecords.add(relation);
|
||||
processedCombinations.add(combination); // 标记为已处理
|
||||
}
|
||||
|
||||
CcdiCustFmyRelation relation = convertToRelation(excel);
|
||||
validRelations.add(relation);
|
||||
// 记录进度
|
||||
ImportLogUtils.logProgress(log, taskId, i + 1, excels.size(),
|
||||
newRecords.size(), failures.size());
|
||||
|
||||
} catch (Exception e) {
|
||||
CustFmyRelationImportFailureVO failure = new CustFmyRelationImportFailureVO();
|
||||
BeanUtils.copyProperties(excel, failure);
|
||||
failure.setErrorMessage(e.getMessage());
|
||||
failures.add(failure);
|
||||
|
||||
// 记录验证失败日志
|
||||
String keyData = String.format("信贷客户身份证号=%s, 关系类型=%s, 关系人姓名=%s, 关系人证件号码=%s",
|
||||
excel.getPersonId(), excel.getRelationType(), excel.getRelationName(), excel.getRelationCertNo());
|
||||
ImportLogUtils.logValidationError(log, taskId, i + 1, e.getMessage(), keyData);
|
||||
}
|
||||
}
|
||||
|
||||
// 批量插入有效数据
|
||||
if (!validRelations.isEmpty()) {
|
||||
mapper.insertBatch(validRelations);
|
||||
// 批量插入新数据
|
||||
if (!newRecords.isEmpty()) {
|
||||
ImportLogUtils.logBatchOperationStart(log, taskId, "插入",
|
||||
(newRecords.size() + 499) / 500, 500);
|
||||
saveBatch(newRecords, 500);
|
||||
}
|
||||
|
||||
// 保存失败记录到Redis
|
||||
if (!failures.isEmpty()) {
|
||||
try {
|
||||
String failuresKey = "import:custFmyRelation:" + taskId + ":failures";
|
||||
redisTemplate.opsForValue().set(failuresKey, failures, 7, TimeUnit.DAYS);
|
||||
ImportLogUtils.logRedisOperation(log, taskId, "保存失败记录", failures.size());
|
||||
} catch (Exception e) {
|
||||
ImportLogUtils.logRedisError(log, taskId, "保存失败记录", e);
|
||||
}
|
||||
}
|
||||
|
||||
// 保存失败记录到Redis(24小时过期)
|
||||
if (!failures.isEmpty()) {
|
||||
redisTemplate.opsForValue().set(
|
||||
IMPORT_FAILURE_KEY_PREFIX + taskId,
|
||||
failures,
|
||||
24,
|
||||
TimeUnit.HOURS
|
||||
);
|
||||
}
|
||||
ImportResult result = new ImportResult();
|
||||
result.setTotalCount(excels.size());
|
||||
result.setSuccessCount(newRecords.size());
|
||||
result.setFailureCount(failures.size());
|
||||
|
||||
// 更新任务状态
|
||||
redisTemplate.opsForValue().set(
|
||||
IMPORT_TASK_KEY_PREFIX + taskId,
|
||||
"COMPLETED:" + validRelations.size() + ":" + failures.size(),
|
||||
1,
|
||||
TimeUnit.HOURS
|
||||
);
|
||||
// 更新最终状态
|
||||
String finalStatus = result.getFailureCount() == 0 ? "SUCCESS" : "PARTIAL_SUCCESS";
|
||||
updateImportStatus(taskId, finalStatus, result);
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("导入失败", e);
|
||||
redisTemplate.opsForValue().set(
|
||||
IMPORT_TASK_KEY_PREFIX + taskId,
|
||||
"FAILED:" + e.getMessage(),
|
||||
1,
|
||||
TimeUnit.HOURS
|
||||
);
|
||||
// 记录导入完成
|
||||
long duration = System.currentTimeMillis() - startTime;
|
||||
ImportLogUtils.logImportComplete(log, taskId, "信贷客户家庭关系",
|
||||
excels.size(), result.getSuccessCount(), result.getFailureCount(), duration);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量查询已存在的 person_id + relation_type + relation_cert_no 组合
|
||||
* 性能优化:一次性查询所有组合,避免N+1查询问题
|
||||
*
|
||||
* @param excels Excel导入数据列表
|
||||
* @return 已存在的组合集合
|
||||
*/
|
||||
private Set<String> getExistingCombinations(List<CcdiCustFmyRelationExcel> excels) {
|
||||
// 提取所有的 person_id + relation_type + relation_cert_no 组合
|
||||
List<String> combinations = excels.stream()
|
||||
.map(excel -> excel.getPersonId() + "|" + excel.getRelationType() + "|" + excel.getRelationCertNo())
|
||||
.filter(Objects::nonNull)
|
||||
.distinct() // 去重
|
||||
.collect(Collectors.toList());
|
||||
|
||||
if (combinations.isEmpty()) {
|
||||
return Collections.emptySet();
|
||||
}
|
||||
|
||||
// 一次性查询所有已存在的组合
|
||||
// 优化前:循环调用selectExistingRelations,N次数据库查询
|
||||
// 优化后:批量查询,1次数据库查询
|
||||
return new HashSet<>(mapper.batchExistsByCombinations(combinations));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量保存
|
||||
*/
|
||||
private void saveBatch(List<CcdiCustFmyRelation> list, int batchSize) {
|
||||
// 使用真正的批量插入,分批次执行以提高性能
|
||||
for (int i = 0; i < list.size(); i += batchSize) {
|
||||
int end = Math.min(i + batchSize, list.size());
|
||||
List<CcdiCustFmyRelation> subList = list.subList(i, end);
|
||||
mapper.insertBatch(subList);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证Excel行数据
|
||||
*
|
||||
* @param excel Excel数据
|
||||
*/
|
||||
private void validateExcelRow(CcdiCustFmyRelationExcel excel) {
|
||||
// 验证必填字段
|
||||
if (StringUtils.isEmpty(excel.getPersonId())) {
|
||||
throw new RuntimeException("信贷客户身份证号不能为空");
|
||||
}
|
||||
if (StringUtils.isEmpty(excel.getRelationType())) {
|
||||
throw new RuntimeException("关系类型不能为空");
|
||||
}
|
||||
if (StringUtils.isEmpty(excel.getRelationName())) {
|
||||
throw new RuntimeException("关系人姓名不能为空");
|
||||
}
|
||||
if (StringUtils.isEmpty(excel.getRelationCertType())) {
|
||||
throw new RuntimeException("关系人证件类型不能为空");
|
||||
}
|
||||
if (StringUtils.isEmpty(excel.getRelationCertNo())) {
|
||||
throw new RuntimeException("关系人证件号码不能为空");
|
||||
}
|
||||
|
||||
// 验证身份证号格式(18位)
|
||||
if (!excel.getPersonId().matches("^[1-9]\\d{5}(18|19|20)\\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\\d|3[01])\\d{3}[0-9Xx]$")) {
|
||||
throw new RuntimeException("信贷客户身份证号格式不正确,必须为18位有效身份证号");
|
||||
}
|
||||
|
||||
// 验证字段长度
|
||||
if (excel.getRelationName().length() > 50) {
|
||||
throw new RuntimeException("关系人姓名长度不能超过50个字符");
|
||||
}
|
||||
if (excel.getRelationType().length() > 20) {
|
||||
throw new RuntimeException("关系类型长度不能超过20个字符");
|
||||
}
|
||||
if (excel.getRelationCertNo().length() > 50) {
|
||||
throw new RuntimeException("关系人证件号码长度不能超过50个字符");
|
||||
}
|
||||
if (StringUtils.isNotEmpty(excel.getRelationDesc()) && excel.getRelationDesc().length() > 500) {
|
||||
throw new RuntimeException("关系描述长度不能超过500个字符");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新导入状态
|
||||
*/
|
||||
private void updateImportStatus(String taskId, String status, ImportResult result) {
|
||||
String key = "import:custFmyRelation:" + taskId;
|
||||
Map<String, Object> statusData = new HashMap<>();
|
||||
statusData.put("status", status);
|
||||
statusData.put("successCount", result.getSuccessCount());
|
||||
statusData.put("failureCount", result.getFailureCount());
|
||||
statusData.put("progress", 100);
|
||||
statusData.put("endTime", System.currentTimeMillis());
|
||||
|
||||
if ("SUCCESS".equals(status)) {
|
||||
statusData.put("message", "全部成功!共导入" + result.getTotalCount() + "条数据");
|
||||
} else {
|
||||
statusData.put("message", "成功" + result.getSuccessCount() + "条,失败" + result.getFailureCount() + "条");
|
||||
}
|
||||
|
||||
redisTemplate.opsForHash().putAll(key, statusData);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CustFmyRelationImportFailureVO> getImportFailures(String taskId) {
|
||||
String key = "import:custFmyRelation:" + taskId + ":failures";
|
||||
Object failuresObj = redisTemplate.opsForValue().get(key);
|
||||
|
||||
if (failuresObj == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
return JSON.parseArray(JSON.toJSONString(failuresObj), CustFmyRelationImportFailureVO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ImportStatusVO getImportStatus(String taskId) {
|
||||
String key = "import:custFmyRelation:" + taskId;
|
||||
Boolean hasKey = redisTemplate.hasKey(key);
|
||||
|
||||
if (Boolean.FALSE.equals(hasKey)) {
|
||||
throw new RuntimeException("任务不存在或已过期");
|
||||
}
|
||||
|
||||
Map<Object, Object> statusMap = redisTemplate.opsForHash().entries(key);
|
||||
|
||||
ImportStatusVO statusVO = new ImportStatusVO();
|
||||
statusVO.setTaskId((String) statusMap.get("taskId"));
|
||||
statusVO.setStatus((String) statusMap.get("status"));
|
||||
statusVO.setTotalCount((Integer) statusMap.get("totalCount"));
|
||||
statusVO.setSuccessCount((Integer) statusMap.get("successCount"));
|
||||
statusVO.setFailureCount((Integer) statusMap.get("failureCount"));
|
||||
statusVO.setProgress((Integer) statusMap.get("progress"));
|
||||
statusVO.setStartTime((Long) statusMap.get("startTime"));
|
||||
statusVO.setEndTime((Long) statusMap.get("endTime"));
|
||||
statusVO.setMessage((String) statusMap.get("message"));
|
||||
|
||||
return statusVO;
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证Excel行数据(兼容旧接口)
|
||||
*/
|
||||
@Override
|
||||
public String validateExcelRow(CcdiCustFmyRelationExcel excel, Integer rowNum) {
|
||||
if (excel.getPersonId() == null || excel.getPersonId().trim().isEmpty()) {
|
||||
return "信贷客户身份证号不能为空";
|
||||
try {
|
||||
validateExcelRow(excel);
|
||||
return null; // 校验通过
|
||||
} catch (Exception e) {
|
||||
return e.getMessage();
|
||||
}
|
||||
|
||||
if (excel.getRelationType() == null || excel.getRelationType().trim().isEmpty()) {
|
||||
return "关系类型不能为空";
|
||||
}
|
||||
|
||||
if (excel.getRelationName() == null || excel.getRelationName().trim().isEmpty()) {
|
||||
return "关系人姓名不能为空";
|
||||
}
|
||||
|
||||
if (excel.getRelationCertType() == null || excel.getRelationCertType().trim().isEmpty()) {
|
||||
return "关系人证件类型不能为空";
|
||||
}
|
||||
|
||||
if (excel.getRelationCertNo() == null || excel.getRelationCertNo().trim().isEmpty()) {
|
||||
return "关系人证件号码不能为空";
|
||||
}
|
||||
|
||||
// 检查是否已存在相同的关系
|
||||
CcdiCustFmyRelation existing = mapper.selectExistingRelations(
|
||||
excel.getPersonId(),
|
||||
excel.getRelationType(),
|
||||
excel.getRelationCertNo()
|
||||
);
|
||||
|
||||
if (existing != null) {
|
||||
return "该关系已存在,请勿重复导入";
|
||||
}
|
||||
|
||||
return null; // 校验通过
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public List<CustFmyRelationImportFailureVO> getImportFailures(String taskId) {
|
||||
Object obj = redisTemplate.opsForValue().get(IMPORT_FAILURE_KEY_PREFIX + taskId);
|
||||
if (obj != null) {
|
||||
return (List<CustFmyRelationImportFailureVO>) obj;
|
||||
}
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
private CcdiCustFmyRelation convertToRelation(CcdiCustFmyRelationExcel excel) {
|
||||
CcdiCustFmyRelation relation = new CcdiCustFmyRelation();
|
||||
org.springframework.beans.BeanUtils.copyProperties(excel, relation);
|
||||
|
||||
relation.setIsEmpFamily(false);
|
||||
relation.setIsCustFamily(true);
|
||||
relation.setStatus(excel.getStatus() != null ? excel.getStatus() : 1);
|
||||
relation.setDataSource("IMPORT");
|
||||
relation.setCreatedBy(SecurityUtils.getUsername());
|
||||
relation.setCreateTime(new Date());
|
||||
|
||||
return relation;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.ruoyi.ccdi.service.impl;
|
||||
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.ccdi.domain.CcdiCustFmyRelation;
|
||||
import com.ruoyi.ccdi.domain.dto.CcdiCustFmyRelationAddDTO;
|
||||
@@ -11,6 +10,7 @@ import com.ruoyi.ccdi.domain.vo.CcdiCustFmyRelationVO;
|
||||
import com.ruoyi.ccdi.mapper.CcdiCustFmyRelationMapper;
|
||||
import com.ruoyi.ccdi.service.ICcdiCustFmyRelationImportService;
|
||||
import com.ruoyi.ccdi.service.ICcdiCustFmyRelationService;
|
||||
import com.ruoyi.ccdi.utils.EasyExcelUtil;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import jakarta.annotation.Resource;
|
||||
@@ -20,11 +20,9 @@ import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@@ -46,9 +44,6 @@ public class CcdiCustFmyRelationServiceImpl implements ICcdiCustFmyRelationServi
|
||||
@Resource
|
||||
private RedisTemplate<String, Object> redisTemplate;
|
||||
|
||||
private static final String IMPORT_TASK_KEY_PREFIX = "import:custFmyRelation:";
|
||||
private static final String IMPORT_FAILURE_KEY_PREFIX = "import:custFmyRelation:failures:";
|
||||
|
||||
@Override
|
||||
public Page<CcdiCustFmyRelationVO> selectRelationPage(CcdiCustFmyRelationQueryDTO query,
|
||||
Integer pageNum, Integer pageSize) {
|
||||
@@ -101,48 +96,45 @@ public class CcdiCustFmyRelationServiceImpl implements ICcdiCustFmyRelationServi
|
||||
.map(this::convertToExcel)
|
||||
.toList();
|
||||
|
||||
// 使用EasyExcel导出
|
||||
try {
|
||||
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
||||
response.setCharacterEncoding("utf-8");
|
||||
String fileName = URLEncoder.encode("信贷客户家庭关系", StandardCharsets.UTF_8)
|
||||
.replaceAll("\\+", "%20");
|
||||
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
|
||||
|
||||
EasyExcel.write(response.getOutputStream(), CcdiCustFmyRelationExcel.class)
|
||||
.sheet("信贷客户家庭关系")
|
||||
.doWrite(excels);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("导出失败", e);
|
||||
}
|
||||
// 使用EasyExcelUtil导出
|
||||
EasyExcelUtil.exportExcel(response, excels, CcdiCustFmyRelationExcel.class, "信贷客户家庭关系");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void importTemplate(HttpServletResponse response) {
|
||||
try {
|
||||
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
||||
response.setCharacterEncoding("utf-8");
|
||||
String fileName = URLEncoder.encode("信贷客户家庭关系导入模板", StandardCharsets.UTF_8)
|
||||
.replaceAll("\\+", "%20");
|
||||
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
|
||||
|
||||
EasyExcel.write(response.getOutputStream(), CcdiCustFmyRelationExcel.class)
|
||||
.sheet("模板")
|
||||
.doWrite(Collections.emptyList());
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("模板下载失败", e);
|
||||
}
|
||||
EasyExcelUtil.importTemplateWithDictDropdown(response, CcdiCustFmyRelationExcel.class, "信贷客户家庭关系");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String importRelations(List<CcdiCustFmyRelationExcel> excels) {
|
||||
if (StringUtils.isNull(excels) || excels.isEmpty()) {
|
||||
throw new RuntimeException("至少需要一条数据");
|
||||
}
|
||||
|
||||
// 生成任务ID
|
||||
String taskId = UUID.randomUUID().toString();
|
||||
long startTime = System.currentTimeMillis();
|
||||
|
||||
// 保存任务状态到Redis
|
||||
redisTemplate.opsForValue().set(IMPORT_TASK_KEY_PREFIX + taskId, "PROCESSING", 1, TimeUnit.HOURS);
|
||||
// 获取当前用户名
|
||||
String userName = SecurityUtils.getUsername();
|
||||
|
||||
// 异步导入
|
||||
importService.importRelationsAsync(excels, taskId);
|
||||
// 初始化Redis状态
|
||||
String statusKey = "import:custFmyRelation:" + taskId;
|
||||
Map<String, Object> statusData = new HashMap<>();
|
||||
statusData.put("taskId", taskId);
|
||||
statusData.put("status", "PROCESSING");
|
||||
statusData.put("totalCount", excels.size());
|
||||
statusData.put("successCount", 0);
|
||||
statusData.put("failureCount", 0);
|
||||
statusData.put("progress", 0);
|
||||
statusData.put("startTime", startTime);
|
||||
statusData.put("message", "正在处理...");
|
||||
|
||||
redisTemplate.opsForHash().putAll(statusKey, statusData);
|
||||
redisTemplate.expire(statusKey, 7, TimeUnit.DAYS);
|
||||
|
||||
// 调用异步导入服务
|
||||
importService.importRelationsAsync(excels, taskId, userName);
|
||||
|
||||
return taskId;
|
||||
}
|
||||
|
||||
@@ -43,18 +43,16 @@
|
||||
r.status, r.remark, r.data_source, r.is_emp_family, r.is_cust_family,
|
||||
r.created_by, r.create_time, r.updated_by, r.update_time
|
||||
FROM ccdi_cust_fmy_relation r
|
||||
<where>
|
||||
r.is_cust_family = 1
|
||||
<if test="query.personId != null and query.personId != ''">
|
||||
AND r.person_id = #{query.personId}
|
||||
</if>
|
||||
<if test="query.relationType != null and query.relationType != ''">
|
||||
AND r.relation_type = #{query.relationType}
|
||||
</if>
|
||||
<if test="query.relationName != null and query.relationName != ''">
|
||||
AND r.relation_name LIKE CONCAT('%', #{query.relationName}, '%')
|
||||
</if>
|
||||
</where>
|
||||
WHERE r.is_cust_family = 1
|
||||
<if test="query.personId != null and query.personId != ''">
|
||||
AND r.person_id = #{query.personId}
|
||||
</if>
|
||||
<if test="query.relationType != null and query.relationType != ''">
|
||||
AND r.relation_type = #{query.relationType}
|
||||
</if>
|
||||
<if test="query.relationName != null and query.relationName != ''">
|
||||
AND r.relation_name LIKE CONCAT('%', #{query.relationName}, '%')
|
||||
</if>
|
||||
ORDER BY r.create_time DESC
|
||||
</select>
|
||||
|
||||
@@ -68,7 +66,7 @@
|
||||
r.status, r.remark, r.data_source, r.is_emp_family, r.is_cust_family,
|
||||
r.created_by, r.create_time, r.updated_by, r.update_time
|
||||
FROM ccdi_cust_fmy_relation r
|
||||
WHERE r.id = #{id} AND r.is_cust_family = 1
|
||||
WHERE r.id = #{id} AND r.is_cust_family = 1 AND 1=1
|
||||
</select>
|
||||
|
||||
<!-- 查询已存在的关系(用于导入校验) -->
|
||||
@@ -115,4 +113,16 @@
|
||||
AND status = 1
|
||||
</select>
|
||||
|
||||
<!-- 批量查询已存在的关系组合(性能优化) -->
|
||||
<select id="batchExistsByCombinations" resultType="string">
|
||||
SELECT CONCAT(person_id, '|', relation_type, '|', relation_cert_no)
|
||||
FROM ccdi_cust_fmy_relation
|
||||
WHERE is_cust_family = 1
|
||||
AND status = 1
|
||||
AND CONCAT(person_id, '|', relation_type, '|', relation_cert_no) IN
|
||||
<foreach collection="combinations" item="combo" open="(" separator="," close=")">
|
||||
#{combo}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user