| | |
| | | GoodsOtherInfoDTO other = new GoodsOtherInfoDTO();
|
| | | other.setOwner(owner); // 是否自营
|
| | | other.setPinGouInfo( goods.getPinGouInfo()); // 拼购信息
|
| | | other.setIsFreeShipping(goods.getIsFreeShipping()); // 是否包邮
|
| | | cg.setOtherInfo(JSONObject.toJSON(other).toString());
|
| | |
|
| | | // 保留字段
|
| | |
| | | String salesTip = goods.getSalesTip();
|
| | | if (StringUtil.isNullOrEmpty(salesTip)) {
|
| | | salesTip = "0";
|
| | | } else {
|
| | | int indexOf = salesTip.indexOf("+");
|
| | | if (indexOf > 0) {
|
| | | salesTip = salesTip.substring(0, indexOf);
|
| | | }
|
| | | }
|
| | |
|
| | | int totalSales = 0;
|
| | | if (salesTip.contains("万")) {
|
| | | salesTip = salesTip.replace("万", "") + "0000";
|
| | | salesTip = salesTip.substring(0, salesTip.indexOf("万"));
|
| | | totalSales= (int) (Float.parseFloat(salesTip) * 10000);
|
| | | } else {
|
| | | totalSales = Integer.parseInt(salesTip);
|
| | | }
|
| | | cg.setSales(Integer.parseInt(salesTip));
|
| | | cg.setSales(totalSales);
|
| | | cg.setRate(MoneyBigDecimalUtil.div(new BigDecimal(goods.getPromotionRate()), new BigDecimal(10)));
|
| | | cg.setSellerId(goods.getMallId());
|
| | | cg.setSellerName(goods.getMallName());
|