Showing
6 changed files
with
13 additions
and
10 deletions
@@ -6,6 +6,7 @@ import com.yohobuy.ufo.model.order.vo.GoodsVo; | @@ -6,6 +6,7 @@ import com.yohobuy.ufo.model.order.vo.GoodsVo; | ||
6 | import com.yohobuy.ufo.model.order.vo.ProductVo; | 6 | import com.yohobuy.ufo.model.order.vo.ProductVo; |
7 | import com.yohobuy.ufo.model.response.StorageDataResp; | 7 | import com.yohobuy.ufo.model.response.StorageDataResp; |
8 | import com.yohoufo.common.helper.ImageUrlAssist; | 8 | import com.yohoufo.common.helper.ImageUrlAssist; |
9 | +import com.yohoufo.common.utils.BigDecimalHelper; | ||
9 | import com.yohoufo.dal.order.model.AppraiseOrderGoods; | 10 | import com.yohoufo.dal.order.model.AppraiseOrderGoods; |
10 | import com.yohoufo.dal.order.model.AppraiseOrderStorage; | 11 | import com.yohoufo.dal.order.model.AppraiseOrderStorage; |
11 | 12 | ||
@@ -26,7 +27,7 @@ public final class ProductConvertor { | @@ -26,7 +27,7 @@ public final class ProductConvertor { | ||
26 | .sizeName(storageDataResp.getSize().getSizeName()) | 27 | .sizeName(storageDataResp.getSize().getSizeName()) |
27 | .num(num) | 28 | .num(num) |
28 | .totalEM(totalEM) | 29 | .totalEM(totalEM) |
29 | - .earnestMoney(SellerOrderConvertor.formatFee(totalEM)) | 30 | + .earnestMoney(BigDecimalHelper.formatNumber(totalEM, BigDecimalHelper.FORMAT_TWOBITAFTERPOINT)) |
30 | .build(); | 31 | .build(); |
31 | } | 32 | } |
32 | 33 |
@@ -13,6 +13,7 @@ import com.yohobuy.ufo.model.order.resp.*; | @@ -13,6 +13,7 @@ import com.yohobuy.ufo.model.order.resp.*; | ||
13 | import com.yohobuy.ufo.model.order.vo.AddressInfo; | 13 | import com.yohobuy.ufo.model.order.vo.AddressInfo; |
14 | import com.yohoufo.common.exception.UfoServiceException; | 14 | import com.yohoufo.common.exception.UfoServiceException; |
15 | import com.yohoufo.common.utils.AddressUtil; | 15 | import com.yohoufo.common.utils.AddressUtil; |
16 | +import com.yohoufo.common.utils.BigDecimalHelper; | ||
16 | import com.yohoufo.common.utils.DateUtil; | 17 | import com.yohoufo.common.utils.DateUtil; |
17 | import com.yohoufo.dal.order.AppraiseOrderGoodsMapper; | 18 | import com.yohoufo.dal.order.AppraiseOrderGoodsMapper; |
18 | import com.yohoufo.dal.order.AppraiseOrderMapper; | 19 | import com.yohoufo.dal.order.AppraiseOrderMapper; |
@@ -327,7 +328,7 @@ public class AppraiseOrderService extends AbsGoodsServiceOrderService implements | @@ -327,7 +328,7 @@ public class AppraiseOrderService extends AbsGoodsServiceOrderService implements | ||
327 | } | 328 | } |
328 | AppraiseOrderDetailResp aodResp = AppraiseOrderDetailResp.builder() | 329 | AppraiseOrderDetailResp aodResp = AppraiseOrderDetailResp.builder() |
329 | .uid(uid).orderCode(orderCode) | 330 | .uid(uid).orderCode(orderCode) |
330 | - .amount(SellerOrderConvertor.formatFee(pao.getAmount())) | 331 | + .amount(BigDecimalHelper.formatNumber(pao.getAmount(), BigDecimalHelper.FORMAT_TWOBITAFTERPOINT)) |
331 | .statusDetail(statusDetail) | 332 | .statusDetail(statusDetail) |
332 | .createTime(DateUtil.formatDate(pao.getCreateTime(), DateUtil.yyyy_MM_dd_HH_mm_SS)) | 333 | .createTime(DateUtil.formatDate(pao.getCreateTime(), DateUtil.yyyy_MM_dd_HH_mm_SS)) |
333 | .goodsInfo(AppraiseOrderGoodsConvertor.do2Bo(paog)) | 334 | .goodsInfo(AppraiseOrderGoodsConvertor.do2Bo(paog)) |
@@ -21,7 +21,6 @@ import com.yohoufo.dal.order.AppraiseOrderMapper; | @@ -21,7 +21,6 @@ import com.yohoufo.dal.order.AppraiseOrderMapper; | ||
21 | import com.yohoufo.dal.order.AppraiseOrderMetaMapper; | 21 | import com.yohoufo.dal.order.AppraiseOrderMetaMapper; |
22 | import com.yohoufo.dal.order.AppraiseOrderStorageMapper; | 22 | import com.yohoufo.dal.order.AppraiseOrderStorageMapper; |
23 | import com.yohoufo.dal.order.model.AppraiseOrder; | 23 | import com.yohoufo.dal.order.model.AppraiseOrder; |
24 | -import com.yohoufo.dal.order.model.AppraiseOrderGoods; | ||
25 | import com.yohoufo.order.convert.SellerOrderConvertor; | 24 | import com.yohoufo.order.convert.SellerOrderConvertor; |
26 | import com.yohoufo.order.model.response.AppraiseAddressResp; | 25 | import com.yohoufo.order.model.response.AppraiseAddressResp; |
27 | import com.yohoufo.order.service.impl.AbsOrderViewService; | 26 | import com.yohoufo.order.service.impl.AbsOrderViewService; |
@@ -31,7 +30,6 @@ import org.slf4j.Logger; | @@ -31,7 +30,6 @@ import org.slf4j.Logger; | ||
31 | import org.springframework.beans.factory.annotation.Autowired; | 30 | import org.springframework.beans.factory.annotation.Autowired; |
32 | import org.springframework.stereotype.Service; | 31 | import org.springframework.stereotype.Service; |
33 | 32 | ||
34 | -import java.util.Arrays; | ||
35 | import java.util.List; | 33 | import java.util.List; |
36 | 34 | ||
37 | @Service | 35 | @Service |
@@ -93,8 +91,6 @@ public class SellerDepositOrderDetailService extends AbsOrderViewService { | @@ -93,8 +91,6 @@ public class SellerDepositOrderDetailService extends AbsOrderViewService { | ||
93 | AppraiseOrder pao = appraiseOrderMapper.selectByOrderCode(orderCode); | 91 | AppraiseOrder pao = appraiseOrderMapper.selectByOrderCode(orderCode); |
94 | OrderAttributes oa = OrderAttributes.getOrderAttributes(pao.getAttributes()); | 92 | OrderAttributes oa = OrderAttributes.getOrderAttributes(pao.getAttributes()); |
95 | 93 | ||
96 | - //todo use another page list query | ||
97 | - List<AppraiseOrderGoods> paogList = appraiseOrderGoodsMapper.selectByOrderCodes(Arrays.asList(orderCode)); | ||
98 | // | 94 | // |
99 | TimeoutBo timeout = calTimeout(TabType.BUY, uid, orderCode, pao.getStatus(), | 95 | TimeoutBo timeout = calTimeout(TabType.BUY, uid, orderCode, pao.getStatus(), |
100 | pao.getCreateTime(), oa); | 96 | pao.getCreateTime(), oa); |
@@ -133,6 +129,7 @@ public class SellerDepositOrderDetailService extends AbsOrderViewService { | @@ -133,6 +129,7 @@ public class SellerDepositOrderDetailService extends AbsOrderViewService { | ||
133 | .userAddress(userAddress) | 129 | .userAddress(userAddress) |
134 | .appraiseAddress(appraiseAddressInfo) | 130 | .appraiseAddress(appraiseAddressInfo) |
135 | .addressUpgradable(addressUpgradable) | 131 | .addressUpgradable(addressUpgradable) |
132 | + .buttons(aos.detailButtons(oa)) | ||
136 | .build() | 133 | .build() |
137 | ; | 134 | ; |
138 | } | 135 | } |
@@ -11,6 +11,7 @@ import com.yohobuy.ufo.model.order.resp.SellerDepositOrderListResp; | @@ -11,6 +11,7 @@ import com.yohobuy.ufo.model.order.resp.SellerDepositOrderListResp; | ||
11 | import com.yohobuy.ufo.model.order.vo.GoodsVo; | 11 | import com.yohobuy.ufo.model.order.vo.GoodsVo; |
12 | import com.yohobuy.ufo.model.order.vo.ProductVo; | 12 | import com.yohobuy.ufo.model.order.vo.ProductVo; |
13 | import com.yohoufo.common.helper.ImageUrlAssist; | 13 | import com.yohoufo.common.helper.ImageUrlAssist; |
14 | +import com.yohoufo.common.utils.BigDecimalHelper; | ||
14 | import com.yohoufo.dal.order.AppraiseOrderGoodsMapper; | 15 | import com.yohoufo.dal.order.AppraiseOrderGoodsMapper; |
15 | import com.yohoufo.dal.order.AppraiseOrderMapper; | 16 | import com.yohoufo.dal.order.AppraiseOrderMapper; |
16 | import com.yohoufo.dal.order.AppraiseOrderMetaMapper; | 17 | import com.yohoufo.dal.order.AppraiseOrderMetaMapper; |
@@ -78,7 +79,6 @@ public class SellerDepositOrderListService { | @@ -78,7 +79,6 @@ public class SellerDepositOrderListService { | ||
78 | List<Long> orderCodes = orderList.stream().map(AppraiseOrder::getOrderCode).collect(Collectors.toList()); | 79 | List<Long> orderCodes = orderList.stream().map(AppraiseOrder::getOrderCode).collect(Collectors.toList()); |
79 | List<AppraiseOrderGoods> paogs = appraiseOrderGoodsMapper.selectByOrderCodes(orderCodes); | 80 | List<AppraiseOrderGoods> paogs = appraiseOrderGoodsMapper.selectByOrderCodes(orderCodes); |
80 | 81 | ||
81 | - | ||
82 | Map<Long,List<AppraiseOrderGoods>> orderCodeAOGMap = new HashMap<>(paogs.size()); | 82 | Map<Long,List<AppraiseOrderGoods>> orderCodeAOGMap = new HashMap<>(paogs.size()); |
83 | for (AppraiseOrderGoods paog : paogs){ | 83 | for (AppraiseOrderGoods paog : paogs){ |
84 | long orderCode; | 84 | long orderCode; |
@@ -120,6 +120,7 @@ public class SellerDepositOrderListService { | @@ -120,6 +120,7 @@ public class SellerDepositOrderListService { | ||
120 | return SellerDepositOrderListResp.builder() | 120 | return SellerDepositOrderListResp.builder() |
121 | .uid(uid) | 121 | .uid(uid) |
122 | .orderCode(orderCode) | 122 | .orderCode(orderCode) |
123 | + .earnestMoney(BigDecimalHelper.formatNumber(pao.getAmount(), BigDecimalHelper.FORMAT_TWOBITAFTERPOINT)) | ||
123 | .status(status) | 124 | .status(status) |
124 | .statuStr(appraiseOrderStatus.statusStr(oa)) | 125 | .statuStr(appraiseOrderStatus.statusStr(oa)) |
125 | .buttons(appraiseOrderStatus.listButtons(oa)) | 126 | .buttons(appraiseOrderStatus.listButtons(oa)) |
@@ -199,7 +200,7 @@ public class SellerDepositOrderListService { | @@ -199,7 +200,7 @@ public class SellerDepositOrderListService { | ||
199 | Integer storageNum; | 200 | Integer storageNum; |
200 | BigDecimal emOfSku = socr.getEarnestMoney().getEarnestMoney().multiply(new BigDecimal(storageNum=aos.getNum())); | 201 | BigDecimal emOfSku = socr.getEarnestMoney().getEarnestMoney().multiply(new BigDecimal(storageNum=aos.getNum())); |
201 | GoodsVo goodsVo = GoodsVo.builder().sizeName(aos.getSizeName()).num(storageNum) | 202 | GoodsVo goodsVo = GoodsVo.builder().sizeName(aos.getSizeName()).num(storageNum) |
202 | - .earnestMoney(SellerOrderConvertor.formatFee(emOfSku)).build(); | 203 | + .earnestMoney(BigDecimalHelper.formatNumber(emOfSku, BigDecimalHelper.FORMAT_TWOBITAFTERPOINT)).build(); |
203 | goodsList.add(goodsVo); | 204 | goodsList.add(goodsVo); |
204 | } | 205 | } |
205 | 206 |
@@ -10,6 +10,7 @@ import com.yohobuy.ufo.model.order.resp.SellerDepositOrderComputeResp; | @@ -10,6 +10,7 @@ import com.yohobuy.ufo.model.order.resp.SellerDepositOrderComputeResp; | ||
10 | import com.yohobuy.ufo.model.order.resp.SellerDepositOrderSubmitResp; | 10 | import com.yohobuy.ufo.model.order.resp.SellerDepositOrderSubmitResp; |
11 | import com.yohobuy.ufo.model.order.vo.GoodsVo; | 11 | import com.yohobuy.ufo.model.order.vo.GoodsVo; |
12 | import com.yohobuy.ufo.model.order.vo.ProductVo; | 12 | import com.yohobuy.ufo.model.order.vo.ProductVo; |
13 | +import com.yohoufo.common.utils.BigDecimalHelper; | ||
13 | import com.yohoufo.dal.order.AppraiseOrderGoodsMapper; | 14 | import com.yohoufo.dal.order.AppraiseOrderGoodsMapper; |
14 | import com.yohoufo.dal.order.AppraiseOrderMapper; | 15 | import com.yohoufo.dal.order.AppraiseOrderMapper; |
15 | import com.yohoufo.dal.order.AppraiseOrderMetaMapper; | 16 | import com.yohoufo.dal.order.AppraiseOrderMetaMapper; |
@@ -89,7 +90,7 @@ public class SellerDepositOrderService extends AbsGoodsServiceOrderService imple | @@ -89,7 +90,7 @@ public class SellerDepositOrderService extends AbsGoodsServiceOrderService imple | ||
89 | SellerDepositOrderSupport.SummaryNode summaryNode = sdos.buildList(dtNode, | 90 | SellerDepositOrderSupport.SummaryNode summaryNode = sdos.buildList(dtNode, |
90 | SellerDepositOrderSupport.buildProductVoTypeRef(), | 91 | SellerDepositOrderSupport.buildProductVoTypeRef(), |
91 | SellerDepositOrderSupport.buildgoodsVoTypeRef()); | 92 | SellerDepositOrderSupport.buildgoodsVoTypeRef()); |
92 | - String earnestMoneystr = SellerOrderConvertor.formatFee(summaryNode.earnestMoney); | 93 | + String earnestMoneystr = BigDecimalHelper.formatNumber(summaryNode.earnestMoney, BigDecimalHelper.FORMAT_TWOBITAFTERPOINT); |
93 | String tips = "温馨提示:早支付早发货早寄存早上架早出售"; | 94 | String tips = "温馨提示:早支付早发货早寄存早上架早出售"; |
94 | SellerDepositOrderComputeResp resp = SellerDepositOrderComputeResp.builder() | 95 | SellerDepositOrderComputeResp resp = SellerDepositOrderComputeResp.builder() |
95 | .earnestMoney(earnestMoneystr) | 96 | .earnestMoney(earnestMoneystr) |
@@ -105,7 +106,7 @@ public class SellerDepositOrderService extends AbsGoodsServiceOrderService imple | @@ -105,7 +106,7 @@ public class SellerDepositOrderService extends AbsGoodsServiceOrderService imple | ||
105 | SellerDepositOrderPrepareService.DTNode dtNode = sellerDepositOrderPrepareService.checkAndAckquireBySku(req); | 106 | SellerDepositOrderPrepareService.DTNode dtNode = sellerDepositOrderPrepareService.checkAndAckquireBySku(req); |
106 | SellerOrderComputeResult socr = dtNode.getStorageIdSOCRMap().get(req.getStorageId()); | 107 | SellerOrderComputeResult socr = dtNode.getStorageIdSOCRMap().get(req.getStorageId()); |
107 | BigDecimal total = socr.getEarnestMoney().getEarnestMoney().multiply(new BigDecimal(req.getNum())); | 108 | BigDecimal total = socr.getEarnestMoney().getEarnestMoney().multiply(new BigDecimal(req.getNum())); |
108 | - String earnestMoneystr = SellerOrderConvertor.formatFee(total); | 109 | + String earnestMoneystr = BigDecimalHelper.formatNumber(total, BigDecimalHelper.FORMAT_TWOBITAFTERPOINT); |
109 | SellerDepositOrderComputeResp resp = SellerDepositOrderComputeResp.builder() | 110 | SellerDepositOrderComputeResp resp = SellerDepositOrderComputeResp.builder() |
110 | .earnestMoney(earnestMoneystr) | 111 | .earnestMoney(earnestMoneystr) |
111 | .build(); | 112 | .build(); |
-
Please register or login to post a comment