From a4617332167372254e77f60640dc494c99e6d8cb Mon Sep 17 00:00:00 2001 From: wangxuanran <3055088966@qq.com> Date: Fri, 30 Jun 2023 15:14:57 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3map=E4=B8=AD=E5=80=BC?= =?UTF-8?q?=E4=B8=BAnull=E8=BD=AC=E6=88=90''=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/aiyh/utils/recordset/SqlHandler.java | 3 +- .../xuanran/wang/common/util/CusData2OA.java | 29 ++-- .../xuanran/wang/cssc/cms/WorkflowToCms.java | 4 +- .../wang/cssc/cms/entity/CusSuccess.java | 2 - .../impl/WorkFlowToCmsServiceImpl.java | 23 ++- .../cssc/cms/util/RequestMasterPlate.java | 7 +- .../data_async/mapper/DataAsyncMapper.java | 4 + .../service/DataAsyncServiceImpl.java | 160 +++++------------- .../eny/data_async/util/ValueRuleMethod.java | 9 +- .../config/util/ValueRuleMethod.java | 2 +- .../java/xuanran/wang/eny/DataAsyncTest.java | 1 + 11 files changed, 99 insertions(+), 145 deletions(-) diff --git a/src/main/java/aiyh/utils/recordset/SqlHandler.java b/src/main/java/aiyh/utils/recordset/SqlHandler.java index 7049cbf..b1f9363 100644 --- a/src/main/java/aiyh/utils/recordset/SqlHandler.java +++ b/src/main/java/aiyh/utils/recordset/SqlHandler.java @@ -268,7 +268,8 @@ public class SqlHandler { } Object o = ((Map) arg).get(key); if (null == o) { - return ""; + // 如果值是null 则直接返回hull + return null; } if (o instanceof Character || o instanceof String) { // 处理字符类型 diff --git a/src/main/java/weaver/xuanran/wang/common/util/CusData2OA.java b/src/main/java/weaver/xuanran/wang/common/util/CusData2OA.java index a35cf3e..a121bc2 100644 --- a/src/main/java/weaver/xuanran/wang/common/util/CusData2OA.java +++ b/src/main/java/weaver/xuanran/wang/common/util/CusData2OA.java @@ -10,15 +10,13 @@ import org.apache.axis2.databinding.types.xsd._float; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.apache.log4j.Logger; +import org.apache.tools.ant.taskdefs.Pack; import weaver.formmode.data.ModeDataIdUpdate; import weaver.formmode.setup.ModeRightInfo; import weaver.xuanran.wang.common.mapper.CommonMapper; import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutorService; @@ -102,7 +100,10 @@ public class CusData2OA { return modelDataList; } - public static void baseInsertAndUpdate(String modelId, List> params, CountDownLatch latch){ + public static boolean baseInsertAndUpdate(String modelId, List> params, CountDownLatch latch){ + if(CollectionUtils.isEmpty(params)){ + return true; + } int modelIdInt = Util.getIntValue(modelId, -1); String tableName = CommonUtil.checkModelId(modelIdInt); if(modelIdInt < 0 || StringUtils.isBlank(tableName)){ @@ -127,21 +128,23 @@ public class CusData2OA { updateSql = buildUpdateSql(tableName, param); } if(StringUtils.isBlank(insertSql)){ - insertSql = buildInsertSql(tableName, modelId, param); + insertSql = buildInsertSql(tableName, param); } } try { if(CollectionUtils.isNotEmpty(updateParams)){ - if (!commonMapper.updateModelInfoList(updateSql, params)) { + if (!commonMapper.updateModelInfoList(updateSql, updateParams)) { throw new CustomerException("update model data sql execute error!"); } } if(CollectionUtils.isNotEmpty(insertParams)){ - if (!commonMapper.batchInsertModel(insertSql, params)) { + if (!commonMapper.batchInsertModel(insertSql, insertParams)) { throw new CustomerException("insert model data sql execute error!"); } } + return true; }catch (Exception e){ + log.error("更新数据失败! : " + e.getMessage()); throw new CustomerException(e); }finally { if(latch != null){ @@ -153,10 +156,12 @@ public class CusData2OA { } public static String buildUpdateSql(String tableName, Map params) { + Map copy = new HashMap<>(params); + copy.remove("id"); StringBuilder sqlSb = new StringBuilder("update ") .append(tableName) .append(" set "); - for (Map.Entry entry : params.entrySet()) { + for (Map.Entry entry : copy.entrySet()) { sqlSb.append(entry.getKey()) .append(" = #{item.") .append(entry.getKey()) @@ -167,13 +172,15 @@ public class CusData2OA { return sqlSb.toString(); } - public static String buildInsertSql(String tableName, String modelId,Map params) { + public static String buildInsertSql(String tableName, Map params) { + Map copy = new HashMap<>(params); + copy.remove("id"); StringBuilder sqlSb = new StringBuilder("insert into ") .append(tableName) .append(" ("); StringBuilder fields = new StringBuilder(); StringBuilder values = new StringBuilder(); - for (Map.Entry entry : params.entrySet()) { + for (Map.Entry entry : copy.entrySet()) { fields.append(entry.getKey()).append(","); values.append("#{item.") .append(entry.getKey()) diff --git a/src/main/java/weaver/xuanran/wang/cssc/cms/WorkflowToCms.java b/src/main/java/weaver/xuanran/wang/cssc/cms/WorkflowToCms.java index b1eded5..dba527a 100644 --- a/src/main/java/weaver/xuanran/wang/cssc/cms/WorkflowToCms.java +++ b/src/main/java/weaver/xuanran/wang/cssc/cms/WorkflowToCms.java @@ -6,6 +6,7 @@ import aiyh.utils.annotation.ActionDesc; import aiyh.utils.annotation.ActionOptionalParam; import aiyh.utils.annotation.PrintParamMark; import aiyh.utils.annotation.RequiredMark; +import com.alibaba.fastjson.JSONObject; import weaver.hrm.User; import weaver.soa.workflow.request.RequestInfo; import weaver.xuanran.wang.cssc.cms.entity.CusSuccess; @@ -59,7 +60,7 @@ public class WorkflowToCms extends SafeCusBaseAction { .errorMsg(Util.null2DefaultStr(msg, "error")) .dataKey(Util.null2DefaultStr(dataKey, "")) .build(); - log.info(""); + log.info("cmsResponseVoField : " + JSONObject.toJSONString(cmsResponseVoField)); CusSuccess tokenSuccess = CusSuccess .builder() @@ -68,6 +69,7 @@ public class WorkflowToCms extends SafeCusBaseAction { .errorMsg(Util.null2DefaultStr(tokenMsg, "error")) .dataKey(Util.null2DefaultStr(tokenDataKey,"")) .build(); + log.info("tokenSuccess : " + JSONObject.toJSONString(tokenSuccess)); workflowToCmsService.workflowToCms(onlyMark,tokenOnlyMark, billTable, requestId,cmsResponseVoField, tokenSuccess); } diff --git a/src/main/java/weaver/xuanran/wang/cssc/cms/entity/CusSuccess.java b/src/main/java/weaver/xuanran/wang/cssc/cms/entity/CusSuccess.java index ef44af1..282ea57 100644 --- a/src/main/java/weaver/xuanran/wang/cssc/cms/entity/CusSuccess.java +++ b/src/main/java/weaver/xuanran/wang/cssc/cms/entity/CusSuccess.java @@ -4,7 +4,6 @@ import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import weaver.xuanran.wang.sh_bigdata.common.service.CusDataDecipher; /** @@ -23,5 +22,4 @@ public class CusSuccess { private String errorMsg; private String dataKey; private Object response; - private CusDataDecipher cusDataDecipher; } diff --git a/src/main/java/weaver/xuanran/wang/cssc/cms/service/impl/WorkFlowToCmsServiceImpl.java b/src/main/java/weaver/xuanran/wang/cssc/cms/service/impl/WorkFlowToCmsServiceImpl.java index f3f65e7..bf7d5b2 100644 --- a/src/main/java/weaver/xuanran/wang/cssc/cms/service/impl/WorkFlowToCmsServiceImpl.java +++ b/src/main/java/weaver/xuanran/wang/cssc/cms/service/impl/WorkFlowToCmsServiceImpl.java @@ -1,17 +1,24 @@ package weaver.xuanran.wang.cssc.cms.service.impl; import aiyh.utils.Util; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.collections.MapUtils; import org.apache.commons.lang3.StringUtils; import org.apache.log4j.Logger; import weaver.conn.RecordSet; import weaver.xiao.commons.config.entity.RequestMappingConfig; +import weaver.xiao.commons.config.entity.ResponseMapping; import weaver.xiao.commons.config.service.DealWithMapping; +import weaver.xiao.commons.utils.SqlUtil; import weaver.xuanran.wang.common.util.CommonUtil; import weaver.xuanran.wang.cssc.cms.entity.CusSuccess; import weaver.xuanran.wang.cssc.cms.service.WorkflowToCmsService; import weaver.xuanran.wang.cssc.cms.util.RequestMasterPlate; import java.util.HashMap; +import java.util.List; import java.util.Map; /** @@ -24,6 +31,7 @@ public class WorkFlowToCmsServiceImpl implements WorkflowToCmsService { private final DealWithMapping dealWithMapping = new DealWithMapping(); private final Logger log = Util.getLogger(); // 获取日志对象 private final RequestMasterPlate requestMasterPlate = new RequestMasterPlate(); + private final SqlUtil sqlUtil = new SqlUtil(); @Override public String getToken(String onlyMark,String billTable, String requestId, CusSuccess cusSuccess) { @@ -57,7 +65,20 @@ public class WorkFlowToCmsServiceImpl implements WorkflowToCmsService { String url = requestMappingConfig.getRequestUrl(); dealWithMapping.setMainTable(billTable); Map param = dealWithMapping.getRequestParam(recordSet, requestMappingConfig); - requestMasterPlate.apiPost(url, param, headers, cusSuccess); + Map result = requestMasterPlate.apiPost(url, param, headers, cusSuccess); + List responseMappingList = requestMappingConfig.getResponseMappingList(); + if(CollectionUtils.isEmpty(responseMappingList) || MapUtils.isEmpty(result)){ + return; + } + Map> writeBackMessage = dealWithMapping.dealResponse(responseMappingList, result); + log.info("回写信息 writeBackMessage ==>"+ JSON.toJSONString(writeBackMessage)); + Map updateMsg = writeBackMessage.get(billTable); + Map whereParam = new HashMap<>(); + whereParam.put("requestid",requestId); + boolean success = sqlUtil.updateMode(billTable, updateMsg, whereParam); + if(!success){ + log.error("数据回写表单失败!"); + } } public RecordSet initRs( RequestMappingConfig requestMappingConfig, String billTable, String requestId){ diff --git a/src/main/java/weaver/xuanran/wang/cssc/cms/util/RequestMasterPlate.java b/src/main/java/weaver/xuanran/wang/cssc/cms/util/RequestMasterPlate.java index d2ed309..eb479ac 100644 --- a/src/main/java/weaver/xuanran/wang/cssc/cms/util/RequestMasterPlate.java +++ b/src/main/java/weaver/xuanran/wang/cssc/cms/util/RequestMasterPlate.java @@ -53,12 +53,7 @@ public class RequestMasterPlate { responseVo.getEntityString())); // 相应内容 throw new CustomerException(Util.logStr("can not fetch [{}]", url)); // 自定义异常类 create 2022/3/9 2:20 PM 构建日志字符串 } - Map response; - if(cusSuccess.getCusDataDecipher() != null){ - response = cusSuccess.getCusDataDecipher().decoder(responseVo); - }else { - response = responseVo.getResponseMap(); // 根据相应结果转化为map集合 - } + Map response = responseVo.getResponseMap(); // 根据相应结果转化为map集合 cusSuccess.setResponse(response); String responseValue = Util.null2DefaultStr(response.get(cusSuccess.getSuccessField()), ""); if (!cusSuccess.getSuccessValue().equals(responseValue)) { diff --git a/src/main/java/weaver/xuanran/wang/eny/data_async/mapper/DataAsyncMapper.java b/src/main/java/weaver/xuanran/wang/eny/data_async/mapper/DataAsyncMapper.java index 3716c54..f0e6658 100644 --- a/src/main/java/weaver/xuanran/wang/eny/data_async/mapper/DataAsyncMapper.java +++ b/src/main/java/weaver/xuanran/wang/eny/data_async/mapper/DataAsyncMapper.java @@ -55,4 +55,8 @@ public interface DataAsyncMapper { @Select(custom = true) String selectCustomerSql(@SqlString String sql, Map map); + + @Select("select id from $t{tableName} where modedatacreatedate = #{date}") + List selectDataIdListByCreateDate(@ParamMapper("tableName") String tableName, + @ParamMapper("date") String date); } diff --git a/src/main/java/weaver/xuanran/wang/eny/data_async/service/DataAsyncServiceImpl.java b/src/main/java/weaver/xuanran/wang/eny/data_async/service/DataAsyncServiceImpl.java index 920dfe1..eb9e28a 100644 --- a/src/main/java/weaver/xuanran/wang/eny/data_async/service/DataAsyncServiceImpl.java +++ b/src/main/java/weaver/xuanran/wang/eny/data_async/service/DataAsyncServiceImpl.java @@ -4,17 +4,14 @@ import aiyh.utils.ThreadPoolConfig; import aiyh.utils.Util; import aiyh.utils.excention.CustomerException; import com.alibaba.fastjson.JSONObject; -import com.engine.common.util.ServiceUtil; -import com.engine.cube.service.ModeAppService; -import com.engine.cube.service.impl.ModeAppServiceImpl; +import io.swagger.models.auth.In; import lombok.Setter; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.MapUtils; import org.apache.commons.lang3.StringUtils; import org.apache.log4j.Logger; -import weaver.formmode.setup.ModeRightInfoThread; +import weaver.formmode.setup.ModeRightInfo; import weaver.general.TimeUtil; -import weaver.hrm.User; import weaver.xuanran.wang.common.entity.CusSuccess; import weaver.xuanran.wang.common.util.CommonUtil; import weaver.xuanran.wang.common.util.CusData2OA; @@ -24,10 +21,6 @@ import weaver.xuanran.wang.eny.data_async.entity.DataAsyncConfigMain; import weaver.xuanran.wang.eny.data_async.mapper.DataAsyncMapper; import weaver.xuanran.wang.eny.data_async.util.EyDataAsyncTokenUtil; import weaver.xuanran.wang.eny.data_async.util.ValueRuleMethod; - -import javax.servlet.ServletContext; -import javax.servlet.http.HttpSession; -import javax.servlet.http.HttpSessionContext; import java.util.*; import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutorService; @@ -56,6 +49,8 @@ public class DataAsyncServiceImpl { .errorMsg("msg") .build(); + private static final ModeRightInfo moderightinfo = new ModeRightInfo(); + private int pageSize = 100; private int pageNo = 1; @@ -155,7 +150,8 @@ public class DataAsyncServiceImpl { threadPoolInstance.execute(()->{ log.info("======================================================================================="); log.info(Thread.currentThread().getName() + " 入库之前信号数量 : " + finalLatch.getCount()); - CusData2OA.baseInsertAndUpdate(config.getModel_id(), maps, finalLatch); + boolean success = CusData2OA.baseInsertAndUpdate(config.getModel_id(), maps, finalLatch); + log.info("数据库更新标识 : " + success); log.info(Thread.currentThread().getName() + " 入库之后信号数量 : " + finalLatch.getCount()); log.info("======================================================================================="); }); @@ -171,9 +167,17 @@ public class DataAsyncServiceImpl { if(!await){ throw new CustomerException("线程等待时间超过最大时间限制!"); } - long endTime = System.currentTimeMillis(); + // 查询当天同步的数据 + // 应该在上面 每一批数据处理完直接权限重构 + List dataIdList = asyncMapper.selectDataIdListByCreateDate(config.getTable_name(), TimeUtil.getCurrentDateString()); + if(CollectionUtils.isNotEmpty(dataIdList)){ + log.info("需要权限重构的数据条数 : " + dataIdList.size()); + for (Integer id : dataIdList) { + moderightinfo.rebuildModeDataShareByEdit(1, Util.getIntValue(config.getModel_id(),-1), id); + } + } log.info("数据结束同步时间 : " + TimeUtil.getCurrentTimeString()); - rebuildRight(Util.getIntValue(config.getModel_id())); + long endTime = System.currentTimeMillis(); log.info("同步耗时时间 " + (endTime - startTime) / 1000 + " s");// 等待所有转换操作完成 } } catch (Exception e) { @@ -194,24 +198,24 @@ public class DataAsyncServiceImpl { List> maps = new ArrayList<>(); if(CollectionUtils.isNotEmpty(primaryKey)){ // 模版-接口外键 - String modelFieldName = primaryKey.get(0).getModel_field_name(); + String primaryKeyModelFieldName = primaryKey.get(0).getModel_field_name(); maps = data.stream().map(item -> convert(item, primaryKey.get(0).getInterface_field(), configDetailList)).filter(MapUtils::isNotEmpty).collect(Collectors.toList()); // 进行排序 Optional minClassId = maps.stream() - .map(map -> Util.getIntValue(Util.null2DefaultStr(map.get(modelFieldName),""),-1)) + .map(map -> Util.getIntValue(Util.null2DefaultStr(map.get(primaryKeyModelFieldName),""),-1)) .min(Comparator.naturalOrder()); Optional maxClassId = maps.stream() - .map(map -> Util.getIntValue(Util.null2DefaultStr(map.get(modelFieldName),""),-1)) + .map(map -> Util.getIntValue(Util.null2DefaultStr(map.get(primaryKeyModelFieldName),""),-1)) .max(Comparator.naturalOrder()); Integer min = minClassId.orElse(0); Integer max = maxClassId.orElse(0); // 按照外键排序并且在oa中范围查询出外键与oa数据的对应关系 - List> dataIdList = asyncMapper.selectDataIds(modelFieldName, config.getTable_name(), min, max); + List> dataIdList = asyncMapper.selectDataIds(primaryKeyModelFieldName, config.getTable_name(), min, max); if("1".equals(debug)){ log.info("dataIdList : " + JSONObject.toJSONString(dataIdList)); } if(CollectionUtils.isNotEmpty(dataIdList)){ - HashMap idMap = parseListMap2Map(modelFieldName, "id", dataIdList); + HashMap idMap = parseListMap2Map(primaryKeyModelFieldName, "id", dataIdList); if("1".equals(debug)){ log.info("idMap : " + JSONObject.toJSONString(idMap)); } @@ -219,7 +223,7 @@ public class DataAsyncServiceImpl { if("1".equals(debug)){ log.info("item : " + JSONObject.toJSONString(item)); } - String id = Util.null2DefaultStr(item.get(modelFieldName),""); + String id = Util.null2DefaultStr(item.get(primaryKeyModelFieldName),""); if("1".equals(debug)){ log.info("id : " + id); } @@ -233,6 +237,24 @@ public class DataAsyncServiceImpl { return maps; } + public Map parseMaxAndMin(List> maps, DataAsyncConfigDetail primaryKey){ + String primaryKeyModelFieldName = primaryKey.getModel_field_name(); + // 进行排序 + Optional minClassId = maps.stream() + .map(map -> Util.getIntValue(Util.null2DefaultStr(map.get(primaryKeyModelFieldName),""),-1)) + .min(Comparator.naturalOrder()); + Optional maxClassId = maps.stream() + .map(map -> Util.getIntValue(Util.null2DefaultStr(map.get(primaryKeyModelFieldName),""),-1)) + .max(Comparator.naturalOrder()); + Integer min = minClassId.orElse(0); + Integer max = maxClassId.orElse(0); + Map map = new HashMap<>(); + map.put("max", max); + map.put("min", min); + return map; + } + + /** *

将数据进行转换

* @author xuanran.wang @@ -277,108 +299,6 @@ public class DataAsyncServiceImpl { return res; } - public static ModeAppService modeAppService = ServiceUtil.getService(ModeAppServiceImpl.class, new User(1)); - - /** - *

模块数据全量权限重构

- * @author xuanran.wang - * @dateTime 2023/6/9 13:28 - * @param modeId 模块id - **/ - public static void rebuildRight(int modeId){ - ModeRightInfoThread var5 = new ModeRightInfoThread(); - var5.setModeId(modeId); - var5.setRebulidFlag("1"); - var5.setSession(new HttpSession() { - @Override - public String getId() { - return null; - } - - @Override - public boolean isNew() { - return false; - } - - @Override - public long getCreationTime() { - return 0; - } - - @Override - public long getLastAccessedTime() { - return 0; - } - - @Override - public void setMaxInactiveInterval(int i) { - - } - - @Override - public int getMaxInactiveInterval() { - return 0; - } - - @Override - public Object getAttribute(String s) { - return null; - } - - @Override - public Enumeration getAttributeNames() { - return null; - } - - @Override - public void setAttribute(String s, Object o) { - - } - - @Override - public void removeAttribute(String s) { - - } - - @Override - public void invalidate() { - - } - - @Override - public HttpSessionContext getSessionContext() { - return null; - } - - @Override - public ServletContext getServletContext() { - return null; - } - - @Override - public Object getValue(String s) { - return null; - } - - @Override - public String[] getValueNames() { - return new String[0]; - } - - @Override - public void putValue(String s, Object o) { - - } - - @Override - public void removeValue(String s) { - - } - }); - var5.setUser(new User(1)); - var5.resetModeRight(); - } - diff --git a/src/main/java/weaver/xuanran/wang/eny/data_async/util/ValueRuleMethod.java b/src/main/java/weaver/xuanran/wang/eny/data_async/util/ValueRuleMethod.java index 9c0e610..8e9d819 100644 --- a/src/main/java/weaver/xuanran/wang/eny/data_async/util/ValueRuleMethod.java +++ b/src/main/java/weaver/xuanran/wang/eny/data_async/util/ValueRuleMethod.java @@ -52,7 +52,12 @@ public class ValueRuleMethod { @ValueRuleMethodNo(value = 0, desc = "不转换") public Object getFixValue(DataAsyncConfigDetail configDetail,Map map) { - return Util.null2DefaultStr(map.get(configDetail.getInterface_field()),""); + String interfaceField = configDetail.getInterface_field(); + String value = Util.null2DefaultStr(map.get(interfaceField),""); + if(StringUtils.isBlank(value)){ + return null; + } + return map.get(interfaceField); } @@ -90,7 +95,7 @@ public class ValueRuleMethod { try { Class clazz = Class.forName(cusText); if(!CusAsyncConvert.class.isAssignableFrom(clazz)){ - throw new CustomerException(cusText + " not implements weaver.xuanran.wang.sh_bigdata.org_hrm_async.annotations.CusOrgHrmAsyncConvert"); + throw new CustomerException(cusText + " not implements weaver.xuanran.wang.eny.data_async.service.convert.CusAsyncConvert!"); } CusAsyncConvert o = (CusAsyncConvert) clazz.newInstance(); Map pathParam = Util.parseCusInterfacePathParam(cusText); diff --git a/src/main/java/weaver/youhong/ai/haripijiu/action/sapdocking/config/util/ValueRuleMethod.java b/src/main/java/weaver/youhong/ai/haripijiu/action/sapdocking/config/util/ValueRuleMethod.java index 9bde767..587b3dd 100644 --- a/src/main/java/weaver/youhong/ai/haripijiu/action/sapdocking/config/util/ValueRuleMethod.java +++ b/src/main/java/weaver/youhong/ai/haripijiu/action/sapdocking/config/util/ValueRuleMethod.java @@ -72,7 +72,7 @@ public class ValueRuleMethod { } if (!sapConfigDetail.getCustomerValue().trim().split(" ")[0].equalsIgnoreCase("select")) { log.error(Util.logStr("intercept danger customer sql in " + - "[weaver.youhong.ai.haripijiu.action.sapdocking.config.util.ValueRuleMethod]. " + + "[weaver.youhong.ai.haripijiu.action.sapdocking.config.util.EyCusModelFieldValueRuleMethod]. " + "sql [{}]", sapConfigDetail.getCustomerValue())); return ""; } diff --git a/src/test/java/xuanran/wang/eny/DataAsyncTest.java b/src/test/java/xuanran/wang/eny/DataAsyncTest.java index b3330e2..356b937 100644 --- a/src/test/java/xuanran/wang/eny/DataAsyncTest.java +++ b/src/test/java/xuanran/wang/eny/DataAsyncTest.java @@ -55,6 +55,7 @@ public class DataAsyncTest extends BaseTest { @Test public void testb(){ + String json = "[{\"interfaceForeignKey\":\"12001\",\"id\":386455},{\"interfaceForeignKey\":\"12002\",\"id\":386457},{\"interfaceForeignKey\":\"12003\",\"id\":386459},{\"interfaceForeignKey\":\"12004\",\"id\":386460},{\"interfaceForeignKey\":\"12005\",\"id\":386462},{\"interfaceForeignKey\":\"12006\",\"id\":386464},{\"interfaceForeignKey\":\"12007\",\"id\":386466},{\"interfaceForeignKey\":\"12008\",\"id\":386468},{\"interfaceForeignKey\":\"12009\",\"id\":386469},{\"interfaceForeignKey\":\"12010\",\"id\":386471}]"; // List> maps = asyncMapper.selectDataIds("classId", "uf_class", 1, 10); List> list = JSONObject.parseObject(json, List.class);