Browse Source

关闭对欧派系统的数据回传

training
pref_mail@163.com 1 year ago
parent
commit
2a7e7e4713
  1. 15
      blade-service/logpm-factory/src/main/java/com/logpm/factory/receiver/OrderStatusHandler.java
  2. 37
      blade-service/logpm-factory/src/test/java/com/logpm/factory/TestService.java

15
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:

37
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 {

Loading…
Cancel
Save