|
@@ -442,31 +442,30 @@ public class promotionItems extends Controller {
|
|
|
}
|
|
|
Row item = itemRowsMap.get(itemno).get(0);
|
|
|
row.put("itemid", item.getLong("itemid"));
|
|
|
- if (StringUtils.isEmpty(orderminqty) || orderminqty.equals("0")) {
|
|
|
+ if (StringUtils.isEmpty(orderminqty) || (new BigDecimal(orderminqty)).compareTo(BigDecimal.ZERO)==0) {
|
|
|
row.put("orderminqty", item.getDouble("orderminqty"));
|
|
|
}
|
|
|
- if (StringUtils.isEmpty(orderaddqty) || orderaddqty.equals("0")) {
|
|
|
+ if (StringUtils.isEmpty(orderaddqty) || (new BigDecimal(orderaddqty)).compareTo(BigDecimal.ZERO)==0) {
|
|
|
row.put("orderaddqty", item.getDouble("orderaddqty"));
|
|
|
}
|
|
|
- if (StringUtils.isEmpty(groupqty) || groupqty.equals("0")) {
|
|
|
- row.put("groupqty", "0");
|
|
|
+ if (StringUtils.isEmpty(groupqty) || (new BigDecimal(groupqty)).compareTo(BigDecimal.ZERO)==0) {
|
|
|
row.put("islimit", "0");
|
|
|
}else {
|
|
|
row.put("islimit", "1");
|
|
|
}
|
|
|
- if (StringUtils.isEmpty(price1) || price1.equals("0")) {
|
|
|
+ if (StringUtils.isEmpty(price1) || (new BigDecimal(price1)).compareTo(BigDecimal.ZERO)==0) {
|
|
|
row.put("price1", item.getDouble("price1"));
|
|
|
}
|
|
|
- if (StringUtils.isEmpty(price2) || price2.equals("0")) {
|
|
|
+ if (StringUtils.isEmpty(price2) || (new BigDecimal(price2)).compareTo(BigDecimal.ZERO)==0) {
|
|
|
row.put("price2", item.getDouble("price2"));
|
|
|
}
|
|
|
- if (StringUtils.isEmpty(price3) || price3.equals("0")) {
|
|
|
+ if (StringUtils.isEmpty(price3) || (new BigDecimal(price3)).compareTo(BigDecimal.ZERO)==0) {
|
|
|
row.put("price3", item.getDouble("price3"));
|
|
|
}
|
|
|
- if (StringUtils.isEmpty(price4) || price4.equals("0")) {
|
|
|
+ if (StringUtils.isEmpty(price4) || (new BigDecimal(price4)).compareTo(BigDecimal.ZERO)==0) {
|
|
|
row.put("price4", item.getDouble("price4"));
|
|
|
}
|
|
|
- if (StringUtils.isEmpty(price5) || price5.equals("0")) {
|
|
|
+ if (StringUtils.isEmpty(price5) || (new BigDecimal(price5)).compareTo(BigDecimal.ZERO)==0) {
|
|
|
row.put("price5", item.getDouble("price5"));
|
|
|
}
|
|
|
row.put("oldprice1", item.getDouble("price1"));
|