From 2a7e7e4713b2fc97642e3e5f2b0b04c360956ace Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" <123456> Date: Wed, 1 Nov 2023 21:03:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=B3=E9=97=AD=E5=AF=B9=E6=AC=A7=E6=B4=BE?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E7=9A=84=E6=95=B0=E6=8D=AE=E5=9B=9E=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../factory/receiver/OrderStatusHandler.java | 15 ++++---- .../java/com/logpm/factory/TestService.java | 37 +++++++++++++++++++ 2 files changed, 45 insertions(+), 7 deletions(-) diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/OrderStatusHandler.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/OrderStatusHandler.java index 9c91623a2..9c75565c4 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/OrderStatusHandler.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/OrderStatusHandler.java @@ -97,13 +97,14 @@ public class OrderStatusHandler { break; case FactoryConstant.OUPAI: - r = ouPaiFactoryService.handleStatusData(orderStatusDTO); - if (r.getCode() == 400 || r.getCode() == 200) { - log.info("TAG {} ##################orderStatusHandler: 该条数据不用处理 orderNo={}", FactoryConstant.OUPAI, orderSelfNum); -// channel.basicAck(deliveryTag,true); - } else { - throw new CustomerException(r.getCode(), r.getMsg()); - } + // todo cangku peizhi xinxi cunzai went +// r = ouPaiFactoryService.handleStatusData(orderStatusDTO); +// if (r.getCode() == 400 || r.getCode() == 200) { +// log.info("TAG {} ##################orderStatusHandler: 该条数据不用处理 orderNo={}", FactoryConstant.OUPAI, orderSelfNum); +//// channel.basicAck(deliveryTag,true); +// } else { +// throw new CustomerException(r.getCode(), r.getMsg()); +// } default: diff --git a/blade-service/logpm-factory/src/test/java/com/logpm/factory/TestService.java b/blade-service/logpm-factory/src/test/java/com/logpm/factory/TestService.java index 6a8ae7824..8528d5231 100644 --- a/blade-service/logpm-factory/src/test/java/com/logpm/factory/TestService.java +++ b/blade-service/logpm-factory/src/test/java/com/logpm/factory/TestService.java @@ -686,6 +686,43 @@ public class TestService { } + @Test + public void test15() throws IOException { + File file = new File("F://response.json"); + + BufferedReader reader = new BufferedReader(new FileReader(file)); + + StringBuffer sb = new StringBuffer(); + + while (true) { + String ms = reader.readLine(); + if (StringUtil.isBlank(ms)) { + break; + } + sb.append(ms); + } + JSONObject object = JSONObject.parseObject(sb.toString()); + + JSONArray arrag = object.getJSONArray("value"); + + for (int i = 0; i < arrag.size(); i++) { + String sql ="update op_factory_order set business_model='opA' where shop_code= 'opB'"; + + JSONObject jsonObject = arrag.getJSONObject(i); + + String code =jsonObject.getString("Code"); + String businessModel =jsonObject.getString("BusinessModel"); + String replace = sql.replace("opA", businessModel).replace("opB", code); + System.out.println(replace); + + + } + + + + + } + public static Boolean readExcel(InputStream is, Class clazz){ BufferedInputStream bis = null; try {