| @@ -3,6 +3,7 @@ package com.iformall.controller.invest; | |||||
| import com.alibaba.fastjson.JSON; | import com.alibaba.fastjson.JSON; | ||||
| import com.iformall.common.ErrorCode; | import com.iformall.common.ErrorCode; | ||||
| import com.iformall.common.InvestResultData; | import com.iformall.common.InvestResultData; | ||||
| import com.iformall.common.Result; | |||||
| import com.iformall.controller.base.BaseController; | import com.iformall.controller.base.BaseController; | ||||
| import com.iformall.domain.vo.invest.InvestUserContext; | import com.iformall.domain.vo.invest.InvestUserContext; | ||||
| import com.iformall.enums.*; | import com.iformall.enums.*; | ||||
| @@ -15,6 +16,7 @@ import org.springframework.web.bind.annotation.InitBinder; | |||||
| import java.beans.PropertyEditor; | import java.beans.PropertyEditor; | ||||
| import java.beans.PropertyEditorSupport; | import java.beans.PropertyEditorSupport; | ||||
| import java.util.Objects; | |||||
| import java.util.function.BiConsumer; | import java.util.function.BiConsumer; | ||||
| import java.util.function.Consumer; | import java.util.function.Consumer; | ||||
| import java.util.function.Function; | import java.util.function.Function; | ||||
| @@ -41,6 +43,9 @@ public class InvestBaseController extends BaseController { | |||||
| return new InvestResultData(r); | return new InvestResultData(r); | ||||
| } catch (MallinkException e) { | } catch (MallinkException e) { | ||||
| log.error("execute error", e); | log.error("execute error", e); | ||||
| if (Objects.equals(Result.SUCCESS, e.getErrorCode())) { | |||||
| return new InvestResultData(); | |||||
| } | |||||
| return new InvestResultData(e.getErrorCode(), e.getMessage()); | return new InvestResultData(e.getErrorCode(), e.getMessage()); | ||||
| } catch (NullPointerException e) { | } catch (NullPointerException e) { | ||||
| ErrorCode errorCode = ErrorCode.SYS_NULLPOINTER_ERROR ; | ErrorCode errorCode = ErrorCode.SYS_NULLPOINTER_ERROR ; | ||||
| @@ -20,7 +20,8 @@ public class UrlCheck { | |||||
| || url.contains("pvlog") | || url.contains("pvlog") | ||||
| || url.contains("/wxBillDaily/importTemplate") | || url.contains("/wxBillDaily/importTemplate") | ||||
| || url.contains("/kwMeter/import") | || url.contains("/kwMeter/import") | ||||
| || url.contains("/wxImportTemplate/importTemplate"); | |||||
| || url.contains("/wxImportTemplate/importTemplate") | |||||
| || url.contains("/invest/customer/importCustomer"); | |||||
| } | } | ||||
| } | } | ||||
| @@ -227,7 +227,6 @@ public class InvestBizServiceImpl implements InvestBizService { | |||||
| } | } | ||||
| doImport(lFile, tenantId, importKey); | doImport(lFile, tenantId, importKey); | ||||
| throw new MallinkException(Result.SUCCESS, "模板正在导入"); | |||||
| } | } | ||||
| private void doImport(File file, String tenantId, String importKey) { | private void doImport(File file, String tenantId, String importKey) { | ||||
| @@ -831,10 +830,12 @@ public class InvestBizServiceImpl implements InvestBizService { | |||||
| Map<Long, MallUserInfo> usersMap = getMap(userInfoService.getByIds(getIds(recordList, InvestOperateRecordEntity::getOperator)), MallUserInfo::getId); | Map<Long, MallUserInfo> usersMap = getMap(userInfoService.getByIds(getIds(recordList, InvestOperateRecordEntity::getOperator)), MallUserInfo::getId); | ||||
| //品牌信息 | //品牌信息 | ||||
| Map<String, WxBrand> brandMap = getBrandMap(); | |||||
| List<WxBrand> brands = brandService.listAsPage(null, 1, Integer.MAX_VALUE).getList(); | |||||
| Map<Long, WxBrand> brandMap = getMap(brands, WxBrand::getId); | |||||
| //业态信息 | //业态信息 | ||||
| Map<String, WxBusiness> businesseMap = getBusinessMap(); | |||||
| List<WxBusiness> businesses = businessService.listAsPage(null, 1, Integer.MAX_VALUE).getList(); | |||||
| Map<Integer, WxBusiness> businesseMap = getMap(businesses, WxBusiness::getId); | |||||
| List<InvestOperateRecordVo> resultList = new ArrayList<>(); | List<InvestOperateRecordVo> resultList = new ArrayList<>(); | ||||
| for (InvestOperateRecordEntity recordEntity : recordList) { | for (InvestOperateRecordEntity recordEntity : recordList) { | ||||