Commit 025e050a by zhiwj

批量导入

parent f2ca7a72
......@@ -3,7 +3,6 @@ package com.gic.store.service;
import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.store.dto.StoreTmpDTO;
import com.task.allocation.exception.TaskAllocationException;
import java.util.List;
......@@ -22,7 +21,7 @@ public interface StoreImportApiService {
void delStoreTmp(Integer enterpriseId);
ServiceResponse<String> importDataToStore(Integer enterpriseId, String userId, String uuId) throws TaskAllocationException;
ServiceResponse<String> importDataToStore(Integer enterpriseId, String userId, String uuId);
void save(StoreTmpDTO bean);
......
......@@ -7,6 +7,7 @@ import com.gic.store.dto.StoreTmpDTO;
import com.gic.store.entity.TabStoreBrand;
import com.gic.store.entity.TabStoreGroup;
import com.gic.store.service.*;
import com.gic.store.utils.ErrorCode;
import com.task.allocation.exception.TaskAllocationException;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
......@@ -109,7 +110,12 @@ public class StoreImportApiServiceImpl implements StoreImportApiService {
}
@Override
public ServiceResponse<String> importDataToStore(Integer enterpriseId, String userId, String uuId) throws TaskAllocationException {
return ServiceResponse.success(storeTaskService.importDataToStore(enterpriseId, userId, uuId));
public ServiceResponse<String> importDataToStore(Integer enterpriseId, String userId, String uuId) {
try {
return ServiceResponse.success(storeTaskService.importDataToStore(enterpriseId, userId, uuId));
} catch (TaskAllocationException e) {
logger.warn("队列错误");
}
return ServiceResponse.failure(ErrorCode.ERR_3.getCode(), "队列错误");
}
}
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