Commit 3511192e by zhangxingmin

Merge remote-tracking branch 'origin/test' into dev_zxm

parents 351a1fcf a2b59db9
...@@ -56,7 +56,7 @@ public class ApiEmailFileController implements ApiEmailFileFeignClient { ...@@ -56,7 +56,7 @@ public class ApiEmailFileController implements ApiEmailFileFeignClient {
* @return * @return
*/ */
@Override @Override
public Result<ApiImportContactExcelResponse> importContactExcel(MultipartFile file) { public Result importContactExcel(MultipartFile file) {
return apiEmailFileService.importContactExcel(file); return apiEmailFileService.importContactExcel(file);
} }
} }
...@@ -15,5 +15,5 @@ public interface ApiEmailFileService { ...@@ -15,5 +15,5 @@ public interface ApiEmailFileService {
Result<ApiImportVariableExcelResponse> importVariableExcel(MultipartFile file, Result<ApiImportVariableExcelResponse> importVariableExcel(MultipartFile file,
ApiImportVariableExcelRequest request); ApiImportVariableExcelRequest request);
Result<ApiImportContactExcelResponse> importContactExcel(MultipartFile file); Result importContactExcel(MultipartFile file);
} }
...@@ -360,8 +360,7 @@ public class ApiEmailFileServiceImpl implements ApiEmailFileService { ...@@ -360,8 +360,7 @@ public class ApiEmailFileServiceImpl implements ApiEmailFileService {
* @return * @return
*/ */
@Override @Override
public Result<ApiImportContactExcelResponse> importContactExcel(MultipartFile file) { public Result importContactExcel(MultipartFile file) {
ApiImportContactExcelResponse response = new ApiImportContactExcelResponse();
try { try {
// 远程调用Feign,通用Excel导入接口 // 远程调用Feign,通用Excel导入接口
Result<ImportResult> result = apiExcelFeignClient.importExcel(file, 0, 0, null); Result<ImportResult> result = apiExcelFeignClient.importExcel(file, 0, 0, null);
...@@ -380,7 +379,7 @@ public class ApiEmailFileServiceImpl implements ApiEmailFileService { ...@@ -380,7 +379,7 @@ public class ApiEmailFileServiceImpl implements ApiEmailFileService {
//导入-联系人excel-处理导入数据(处理每一行数据(包括校验)) //导入-联系人excel-处理导入数据(处理每一行数据(包括校验))
processImportContactExcelData(importResult.getData()); processImportContactExcelData(importResult.getData());
return Result.success(response); return Result.success();
} catch (Exception e) { } catch (Exception e) {
log.error("导入变量Excel异常", e); log.error("导入变量Excel异常", e);
...@@ -430,7 +429,7 @@ public class ApiEmailFileServiceImpl implements ApiEmailFileService { ...@@ -430,7 +429,7 @@ public class ApiEmailFileServiceImpl implements ApiEmailFileService {
*/ */
public Result processImportContactExcelDataCheck(List<Map<String, Object>> data) { public Result processImportContactExcelDataCheck(List<Map<String, Object>> data) {
Set<String> emailSet = new HashSet<>(); Set<String> emailSet = new HashSet<>();
int i = 1; int i = 2;
for (Map<String, Object> row : data) { for (Map<String, Object> row : data) {
String email = getStringValue(row, ContactExcelEnum.EMAIL.getItemLabel()); String email = getStringValue(row, ContactExcelEnum.EMAIL.getItemLabel());
......
...@@ -45,5 +45,5 @@ public interface ApiEmailFileFeignClient { ...@@ -45,5 +45,5 @@ public interface ApiEmailFileFeignClient {
* @return * @return
*/ */
@PostMapping(value = "/import/excel/contact", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) @PostMapping(value = "/import/excel/contact", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
Result<ApiImportContactExcelResponse> importContactExcel(@RequestParam("file") MultipartFile file); Result importContactExcel(@RequestParam("file") MultipartFile file);
} }
...@@ -33,7 +33,7 @@ public class ApiEmailFileFeignFallbackFactory implements FallbackFactory<ApiEmai ...@@ -33,7 +33,7 @@ public class ApiEmailFileFeignFallbackFactory implements FallbackFactory<ApiEmai
} }
@Override @Override
public Result<ApiImportContactExcelResponse> importContactExcel(MultipartFile file) { public Result importContactExcel(MultipartFile file) {
return null; return null;
} }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment