Commit d1d4bbde zshaohui

qty解析失败,bug修改

1 个父辈 bed9f2e9
package com.neotel.smfcore.custom.neotel; package com.neotel.smfcore.custom.neotel;
import cn.hutool.core.util.NumberUtil;
import com.neotel.smfcore.common.exception.ValidateException; import com.neotel.smfcore.common.exception.ValidateException;
import com.neotel.smfcore.common.utils.DateUtil; import com.neotel.smfcore.common.utils.DateUtil;
import com.neotel.smfcore.common.utils.HttpHelper; import com.neotel.smfcore.common.utils.HttpHelper;
...@@ -178,7 +179,7 @@ public class NeotelApi extends BaseSmfApiListener { ...@@ -178,7 +179,7 @@ public class NeotelApi extends BaseSmfApiListener {
String qtyStr = getData(dataMap, "qty"); String qtyStr = getData(dataMap, "qty");
if (Strings.isNotBlank(qtyStr)) { if (Strings.isNotBlank(qtyStr)) {
int qty = Integer.valueOf(qtyStr); int qty = NumberUtil.parseInt(qtyStr);
if (qty > 0) { if (qty > 0) {
barcode.setAmount(qty); barcode.setAmount(qty);
} }
...@@ -260,7 +261,7 @@ public class NeotelApi extends BaseSmfApiListener { ...@@ -260,7 +261,7 @@ public class NeotelApi extends BaseSmfApiListener {
String qtyStr = getData(dataMap, "qty"); String qtyStr = getData(dataMap, "qty");
if (Strings.isNotBlank(qtyStr)) { if (Strings.isNotBlank(qtyStr)) {
int qty = Integer.valueOf(qtyStr); int qty = NumberUtil.parseInt(qtyStr);
if (qty > 0) { if (qty > 0) {
barcode.setAmount(qty); barcode.setAmount(qty);
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!