Authored by chenchao

fix money show format

... ... @@ -11,4 +11,6 @@ public class PriceFormater {
}
}
... ...
... ... @@ -6,6 +6,7 @@ import com.yohobuy.ufo.model.order.vo.GoodsVo;
import com.yohobuy.ufo.model.order.vo.ProductVo;
import com.yohobuy.ufo.model.response.StorageDataResp;
import com.yohoufo.common.helper.ImageUrlAssist;
import com.yohoufo.common.utils.BigDecimalHelper;
import com.yohoufo.dal.order.model.AppraiseOrderGoods;
import com.yohoufo.dal.order.model.AppraiseOrderStorage;
... ... @@ -26,7 +27,7 @@ public final class ProductConvertor {
.sizeName(storageDataResp.getSize().getSizeName())
.num(num)
.totalEM(totalEM)
.earnestMoney(SellerOrderConvertor.formatFee(totalEM))
.earnestMoney(BigDecimalHelper.formatNumber(totalEM, BigDecimalHelper.FORMAT_TWOBITAFTERPOINT))
.build();
}
... ...
... ... @@ -13,6 +13,7 @@ import com.yohobuy.ufo.model.order.resp.*;
import com.yohobuy.ufo.model.order.vo.AddressInfo;
import com.yohoufo.common.exception.UfoServiceException;
import com.yohoufo.common.utils.AddressUtil;
import com.yohoufo.common.utils.BigDecimalHelper;
import com.yohoufo.common.utils.DateUtil;
import com.yohoufo.dal.order.AppraiseOrderGoodsMapper;
import com.yohoufo.dal.order.AppraiseOrderMapper;
... ... @@ -327,7 +328,7 @@ public class AppraiseOrderService extends AbsGoodsServiceOrderService implements
}
AppraiseOrderDetailResp aodResp = AppraiseOrderDetailResp.builder()
.uid(uid).orderCode(orderCode)
.amount(SellerOrderConvertor.formatFee(pao.getAmount()))
.amount(BigDecimalHelper.formatNumber(pao.getAmount(), BigDecimalHelper.FORMAT_TWOBITAFTERPOINT))
.statusDetail(statusDetail)
.createTime(DateUtil.formatDate(pao.getCreateTime(), DateUtil.yyyy_MM_dd_HH_mm_SS))
.goodsInfo(AppraiseOrderGoodsConvertor.do2Bo(paog))
... ...
... ... @@ -21,7 +21,6 @@ import com.yohoufo.dal.order.AppraiseOrderMapper;
import com.yohoufo.dal.order.AppraiseOrderMetaMapper;
import com.yohoufo.dal.order.AppraiseOrderStorageMapper;
import com.yohoufo.dal.order.model.AppraiseOrder;
import com.yohoufo.dal.order.model.AppraiseOrderGoods;
import com.yohoufo.order.convert.SellerOrderConvertor;
import com.yohoufo.order.model.response.AppraiseAddressResp;
import com.yohoufo.order.service.impl.AbsOrderViewService;
... ... @@ -31,7 +30,6 @@ import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Arrays;
import java.util.List;
@Service
... ... @@ -93,8 +91,6 @@ public class SellerDepositOrderDetailService extends AbsOrderViewService {
AppraiseOrder pao = appraiseOrderMapper.selectByOrderCode(orderCode);
OrderAttributes oa = OrderAttributes.getOrderAttributes(pao.getAttributes());
//todo use another page list query
List<AppraiseOrderGoods> paogList = appraiseOrderGoodsMapper.selectByOrderCodes(Arrays.asList(orderCode));
//
TimeoutBo timeout = calTimeout(TabType.BUY, uid, orderCode, pao.getStatus(),
pao.getCreateTime(), oa);
... ... @@ -133,6 +129,7 @@ public class SellerDepositOrderDetailService extends AbsOrderViewService {
.userAddress(userAddress)
.appraiseAddress(appraiseAddressInfo)
.addressUpgradable(addressUpgradable)
.buttons(aos.detailButtons(oa))
.build()
;
}
... ...
... ... @@ -11,6 +11,7 @@ import com.yohobuy.ufo.model.order.resp.SellerDepositOrderListResp;
import com.yohobuy.ufo.model.order.vo.GoodsVo;
import com.yohobuy.ufo.model.order.vo.ProductVo;
import com.yohoufo.common.helper.ImageUrlAssist;
import com.yohoufo.common.utils.BigDecimalHelper;
import com.yohoufo.dal.order.AppraiseOrderGoodsMapper;
import com.yohoufo.dal.order.AppraiseOrderMapper;
import com.yohoufo.dal.order.AppraiseOrderMetaMapper;
... ... @@ -78,7 +79,6 @@ public class SellerDepositOrderListService {
List<Long> orderCodes = orderList.stream().map(AppraiseOrder::getOrderCode).collect(Collectors.toList());
List<AppraiseOrderGoods> paogs = appraiseOrderGoodsMapper.selectByOrderCodes(orderCodes);
Map<Long,List<AppraiseOrderGoods>> orderCodeAOGMap = new HashMap<>(paogs.size());
for (AppraiseOrderGoods paog : paogs){
long orderCode;
... ... @@ -120,6 +120,7 @@ public class SellerDepositOrderListService {
return SellerDepositOrderListResp.builder()
.uid(uid)
.orderCode(orderCode)
.earnestMoney(BigDecimalHelper.formatNumber(pao.getAmount(), BigDecimalHelper.FORMAT_TWOBITAFTERPOINT))
.status(status)
.statuStr(appraiseOrderStatus.statusStr(oa))
.buttons(appraiseOrderStatus.listButtons(oa))
... ... @@ -199,7 +200,7 @@ public class SellerDepositOrderListService {
Integer storageNum;
BigDecimal emOfSku = socr.getEarnestMoney().getEarnestMoney().multiply(new BigDecimal(storageNum=aos.getNum()));
GoodsVo goodsVo = GoodsVo.builder().sizeName(aos.getSizeName()).num(storageNum)
.earnestMoney(SellerOrderConvertor.formatFee(emOfSku)).build();
.earnestMoney(BigDecimalHelper.formatNumber(emOfSku, BigDecimalHelper.FORMAT_TWOBITAFTERPOINT)).build();
goodsList.add(goodsVo);
}
... ...
... ... @@ -10,6 +10,7 @@ import com.yohobuy.ufo.model.order.resp.SellerDepositOrderComputeResp;
import com.yohobuy.ufo.model.order.resp.SellerDepositOrderSubmitResp;
import com.yohobuy.ufo.model.order.vo.GoodsVo;
import com.yohobuy.ufo.model.order.vo.ProductVo;
import com.yohoufo.common.utils.BigDecimalHelper;
import com.yohoufo.dal.order.AppraiseOrderGoodsMapper;
import com.yohoufo.dal.order.AppraiseOrderMapper;
import com.yohoufo.dal.order.AppraiseOrderMetaMapper;
... ... @@ -89,7 +90,7 @@ public class SellerDepositOrderService extends AbsGoodsServiceOrderService imple
SellerDepositOrderSupport.SummaryNode summaryNode = sdos.buildList(dtNode,
SellerDepositOrderSupport.buildProductVoTypeRef(),
SellerDepositOrderSupport.buildgoodsVoTypeRef());
String earnestMoneystr = SellerOrderConvertor.formatFee(summaryNode.earnestMoney);
String earnestMoneystr = BigDecimalHelper.formatNumber(summaryNode.earnestMoney, BigDecimalHelper.FORMAT_TWOBITAFTERPOINT);
String tips = "温馨提示:早支付早发货早寄存早上架早出售";
SellerDepositOrderComputeResp resp = SellerDepositOrderComputeResp.builder()
.earnestMoney(earnestMoneystr)
... ... @@ -105,7 +106,7 @@ public class SellerDepositOrderService extends AbsGoodsServiceOrderService imple
SellerDepositOrderPrepareService.DTNode dtNode = sellerDepositOrderPrepareService.checkAndAckquireBySku(req);
SellerOrderComputeResult socr = dtNode.getStorageIdSOCRMap().get(req.getStorageId());
BigDecimal total = socr.getEarnestMoney().getEarnestMoney().multiply(new BigDecimal(req.getNum()));
String earnestMoneystr = SellerOrderConvertor.formatFee(total);
String earnestMoneystr = BigDecimalHelper.formatNumber(total, BigDecimalHelper.FORMAT_TWOBITAFTERPOINT);
SellerDepositOrderComputeResp resp = SellerDepositOrderComputeResp.builder()
.earnestMoney(earnestMoneystr)
.build();
... ...