修改商户导入接口异步

This commit is contained in:
Chujinwang 2024-07-15 09:03:00 +08:00
parent cece6186cf
commit a7bd8a00bd
3 changed files with 4 additions and 4 deletions

View File

@ -78,7 +78,8 @@ public class StoreImportController {
@RequiresPermissions("store:import:save")
public AjaxResult importStore(@RequestBody List<StoreImportDTO> lists)
{
return AjaxResult.success(storeImportService.saveList(lists));
storeImportService.saveList(lists);
return AjaxResult.success();
}

View File

@ -23,6 +23,6 @@ public interface StoreImportService extends IService<StoreImport> {
int confimImport(Long[] ids);
int saveList(List<StoreImportDTO> dtoList);
void saveList(List<StoreImportDTO> dtoList);
}

View File

@ -96,7 +96,7 @@ public class StoreImportServiceImpl extends ServiceImpl<StoreImportMapper, Store
@Override
@Async
public int saveList(List<StoreImportDTO> dtoList) {
public void saveList(List<StoreImportDTO> dtoList) {
for (StoreImportDTO storeImportDTO : dtoList) {
StoreImport copy = BeanCopyUtils.copy(storeImportDTO, StoreImport.class);
copy.setDeptId(SecurityUtils.getDeptId());
@ -108,7 +108,6 @@ public class StoreImportServiceImpl extends ServiceImpl<StoreImportMapper, Store
log.error("商户导入异常:{}", copy.getStoreName());
}
}
return 1;
}