|
@@ -161,7 +161,12 @@ public class ItempriceadjustItemprice extends Controller {
|
|
|
sqlList.add("update sa_itempriceadjust_items set marketprice=" + marketprice + " where siteid='" + siteid + "' and sa_itempriceadjust_itemsid=" + sa_itempriceadjust_itemsid);
|
|
|
for (Object object : sa_itempriceadjust_itemprice) {
|
|
|
JSONObject jsonObject = (JSONObject) object;
|
|
|
- BigDecimal price = jsonObject.getBigDecimal("price");
|
|
|
+ BigDecimal price;
|
|
|
+ try {
|
|
|
+ price = jsonObject.getBigDecimal("price");
|
|
|
+ } catch (NumberFormatException e) {
|
|
|
+ return getErrReturnObject().setErrMsg("价格填写格式异常").toString();
|
|
|
+ }
|
|
|
if (price.compareTo(new BigDecimal("0")) == -1) {
|
|
|
price = new BigDecimal("0");
|
|
|
}
|