Merge branch 'test6.9.10' of http://git.yoho.cn/ufo/yohoufo-fore into test6.9.10
Showing
6 changed files
with
47 additions
and
7 deletions
@@ -230,7 +230,7 @@ public class DepositHelpService { | @@ -230,7 +230,7 @@ public class DepositHelpService { | ||
230 | case CHECKING_FAKE: | 230 | case CHECKING_FAKE: |
231 | return "您的商品鉴定未通过,保证金已扣除,平台将在1-3个工作日内到付寄回,请留意物流动态"; | 231 | return "您的商品鉴定未通过,保证金已扣除,平台将在1-3个工作日内到付寄回,请留意物流动态"; |
232 | case QUALITY_CHECK_FAKE: | 232 | case QUALITY_CHECK_FAKE: |
233 | - return "商品质检未通过,保证金已赔付给买家,平台将在1-3个工作日内到付寄回,请留意物流动态"; | 233 | + return "商品质检未通过,保证金已退还,平台将在1-3个工作日内到付寄回,请留意物流动态"; |
234 | default: | 234 | default: |
235 | return ""; | 235 | return ""; |
236 | } | 236 | } |
@@ -1041,7 +1041,8 @@ public class InBoxFacade extends BaseNoticeFacade{ | @@ -1041,7 +1041,8 @@ public class InBoxFacade extends BaseNoticeFacade{ | ||
1041 | 1041 | ||
1042 | 1042 | ||
1043 | public void sellerDepositOrderNotice(int uid,long orderCode, AppraiseOrderStatus targetStatus, boolean isParent){ | 1043 | public void sellerDepositOrderNotice(int uid,long orderCode, AppraiseOrderStatus targetStatus, boolean isParent){ |
1044 | - log.info("enter sellerDepositOrderNotice uid {} orderCode {} targetStatus {}", uid, orderCode, targetStatus); | 1044 | + log.info("enter sellerDepositOrderNotice uid {} orderCode {} targetStatus {} isParent {}", |
1045 | + uid, orderCode, targetStatus, isParent); | ||
1045 | try { | 1046 | try { |
1046 | // | 1047 | // |
1047 | InboxBusinessTypeEnum inboxType = null; | 1048 | InboxBusinessTypeEnum inboxType = null; |
@@ -24,6 +24,7 @@ import com.yohoufo.order.convert.ProductConvertor; | @@ -24,6 +24,7 @@ import com.yohoufo.order.convert.ProductConvertor; | ||
24 | import com.yohoufo.order.model.dto.SellerOrderComputeResult; | 24 | import com.yohoufo.order.model.dto.SellerOrderComputeResult; |
25 | import com.yohoufo.order.service.impl.AbsOrderViewService; | 25 | import com.yohoufo.order.service.impl.AbsOrderViewService; |
26 | import com.yohoufo.order.utils.LoggerUtils; | 26 | import com.yohoufo.order.utils.LoggerUtils; |
27 | +import com.yohoufo.order.utils.SellerGoodsHelper; | ||
27 | import lombok.Builder; | 28 | import lombok.Builder; |
28 | import org.apache.commons.collections.CollectionUtils; | 29 | import org.apache.commons.collections.CollectionUtils; |
29 | import org.slf4j.Logger; | 30 | import org.slf4j.Logger; |
@@ -188,11 +189,25 @@ public class SellerDepositOrderListService extends AbsOrderViewService { | @@ -188,11 +189,25 @@ public class SellerDepositOrderListService extends AbsOrderViewService { | ||
188 | 189 | ||
189 | AppraiseOrderStatus appraiseOrderStatus = AppraiseOrderStatus.getByCode(pao.getStatus()); | 190 | AppraiseOrderStatus appraiseOrderStatus = AppraiseOrderStatus.getByCode(pao.getStatus()); |
190 | OrderAttributes oa = OrderAttributes.getOrderAttributes(pao.getAttributes()); | 191 | OrderAttributes oa = OrderAttributes.getOrderAttributes(pao.getAttributes()); |
191 | - String refundEarnestMoney = ordersPayRefund == null? null : ordersPayRefund.getAmount().toPlainString(); | 192 | + boolean notRefund = ordersPayRefund == null; |
193 | + String refundEarnestMoney = notRefund ? null : ordersPayRefund.getAmount().toPlainString(); | ||
194 | + switch (appraiseOrderStatus){ | ||
195 | + case CHECKING_FAKE: | ||
196 | + if (notRefund){ | ||
197 | + refundEarnestMoney = BigDecimal.ZERO.toPlainString(); | ||
198 | + } | ||
199 | + break; | ||
200 | + case JUDGE_PASS_WAIT_WAREHOUSE: | ||
201 | + if (notRefund){ | ||
202 | + refundEarnestMoney = BigDecimal.ZERO.toPlainString(); | ||
203 | + } | ||
204 | + break; | ||
205 | + } | ||
206 | + | ||
192 | GoodsVo goods = GoodsVo.builder() | 207 | GoodsVo goods = GoodsVo.builder() |
193 | .productName(paog.getProductName()) | 208 | .productName(paog.getProductName()) |
194 | .imgUrl(ImageUrlAssist.getProductFullPicUrlWithDefaultSetting(paog.getImageUrl())) | 209 | .imgUrl(ImageUrlAssist.getProductFullPicUrlWithDefaultSetting(paog.getImageUrl())) |
195 | - .sizeName(paos.getSizeName()) | 210 | + .sizeName(SellerGoodsHelper.appendSizeCNUnit(paos.getSizeName())) |
196 | .build(); | 211 | .build(); |
197 | DepositOrderInStorePrdListResp resp = DepositOrderInStorePrdListResp.builder() | 212 | DepositOrderInStorePrdListResp resp = DepositOrderInStorePrdListResp.builder() |
198 | .earnestMoney(BigDecimalHelper.halfUp(pao.getAmount()).toPlainString()) | 213 | .earnestMoney(BigDecimalHelper.halfUp(pao.getAmount()).toPlainString()) |
@@ -294,7 +309,7 @@ public class SellerDepositOrderListService extends AbsOrderViewService { | @@ -294,7 +309,7 @@ public class SellerDepositOrderListService extends AbsOrderViewService { | ||
294 | } | 309 | } |
295 | Integer storageNum; | 310 | Integer storageNum; |
296 | BigDecimal emOfSku = socr.getEarnestMoney().getEarnestMoney().multiply(new BigDecimal(storageNum=aos.getNum())); | 311 | BigDecimal emOfSku = socr.getEarnestMoney().getEarnestMoney().multiply(new BigDecimal(storageNum=aos.getNum())); |
297 | - GoodsVo goodsVo = GoodsVo.builder().sizeName(aos.getSizeName()).num(storageNum) | 312 | + GoodsVo goodsVo = GoodsVo.builder().sizeName(SellerGoodsHelper.appendSizeCNUnit(aos.getSizeName())).num(storageNum) |
298 | .earnestMoney(BigDecimalHelper.formatNumber(emOfSku, BigDecimalHelper.FORMAT_TWOBITAFTERPOINT)).build(); | 313 | .earnestMoney(BigDecimalHelper.formatNumber(emOfSku, BigDecimalHelper.FORMAT_TWOBITAFTERPOINT)).build(); |
299 | goodsList.add(goodsVo); | 314 | goodsList.add(goodsVo); |
300 | } | 315 | } |
@@ -462,12 +462,17 @@ public class SellerDepositOrderService extends AbsGoodsServiceOrderService imple | @@ -462,12 +462,17 @@ public class SellerDepositOrderService extends AbsGoodsServiceOrderService imple | ||
462 | // | 462 | // |
463 | Long orderCode = appraiseOrder.getOrderCode(); | 463 | Long orderCode = appraiseOrder.getOrderCode(); |
464 | Long parentOrderCode; | 464 | Long parentOrderCode; |
465 | + Long paidOrderCode; | ||
465 | boolean isParent = Objects.isNull(parentOrderCode=appraiseOrder.getParentOrderCode()); | 466 | boolean isParent = Objects.isNull(parentOrderCode=appraiseOrder.getParentOrderCode()); |
466 | AppraiseOrderStatus targetOrderStatus = AppraiseOrderStatus.SHAM_SEND_OUT; | 467 | AppraiseOrderStatus targetOrderStatus = AppraiseOrderStatus.SHAM_SEND_OUT; |
467 | AppraiseOrderStatus expectedStatus = AppraiseOrderStatus.SELLER_SEND_OUT; | 468 | AppraiseOrderStatus expectedStatus = AppraiseOrderStatus.SELLER_SEND_OUT; |
468 | if(isParent){ | 469 | if(isParent){ |
469 | - triggerStatusChangeByParentCode(parentOrderCode, targetOrderStatus, expectedStatus); | 470 | + logger.info("shamDeliver isParent orderCode {} ", orderCode); |
471 | + paidOrderCode = orderCode; | ||
472 | + triggerStatusChangeByParentCode(orderCode, targetOrderStatus, expectedStatus); | ||
470 | }else { | 473 | }else { |
474 | + logger.info("shamDeliver is not Parent orderCode {} ", orderCode); | ||
475 | + paidOrderCode = parentOrderCode; | ||
471 | //no parent | 476 | //no parent |
472 | triggerStatusConsistencyCheck(orderCode); | 477 | triggerStatusConsistencyCheck(orderCode); |
473 | } | 478 | } |
@@ -479,7 +484,7 @@ public class SellerDepositOrderService extends AbsGoodsServiceOrderService imple | @@ -479,7 +484,7 @@ public class SellerDepositOrderService extends AbsGoodsServiceOrderService imple | ||
479 | .loadUser(appraiseOrder.getUid()) | 484 | .loadUser(appraiseOrder.getUid()) |
480 | .loadActionCase(SellerWalletDetail.Type.SELLER_SHAM_SEND_OUT) | 485 | .loadActionCase(SellerWalletDetail.Type.SELLER_SHAM_SEND_OUT) |
481 | .loadRefundAction(payRefundService::refund) | 486 | .loadRefundAction(payRefundService::refund) |
482 | - .loadOrder(appraiseOrder.getOrderCode(), appraiseOrder.getParentOrderCode(), appraiseOrder.getPayment(), appraiseOrder.getAmount()) | 487 | + .loadOrder(orderCode, paidOrderCode, appraiseOrder.getPayment(), appraiseOrder.getAmount()) |
483 | .refund(); | 488 | .refund(); |
484 | return rows; | 489 | return rows; |
485 | } | 490 | } |
@@ -4,6 +4,7 @@ import com.yohobuy.ufo.model.order.common.OrderAttributes; | @@ -4,6 +4,7 @@ import com.yohobuy.ufo.model.order.common.OrderAttributes; | ||
4 | import com.yohobuy.ufo.model.order.constants.RegionEnum; | 4 | import com.yohobuy.ufo.model.order.constants.RegionEnum; |
5 | import com.yohobuy.ufo.model.order.constants.SkupType; | 5 | import com.yohobuy.ufo.model.order.constants.SkupType; |
6 | import com.yohoufo.order.service.seller.support.SkupTypeCodeSupport; | 6 | import com.yohoufo.order.service.seller.support.SkupTypeCodeSupport; |
7 | +import org.apache.commons.lang3.StringUtils; | ||
7 | 8 | ||
8 | import java.math.BigDecimal; | 9 | import java.math.BigDecimal; |
9 | import java.util.HashMap; | 10 | import java.util.HashMap; |
@@ -104,4 +105,10 @@ public final class SellerGoodsHelper { | @@ -104,4 +105,10 @@ public final class SellerGoodsHelper { | ||
104 | } | 105 | } |
105 | 106 | ||
106 | 107 | ||
108 | + public static String appendSizeCNUnit(String sizeName){ | ||
109 | + if (StringUtils.isBlank(sizeName)){ | ||
110 | + return sizeName; | ||
111 | + } | ||
112 | + return new StringBuilder(sizeName).append("码").toString(); | ||
113 | + } | ||
107 | } | 114 | } |
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject; | @@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject; | ||
4 | import com.yohobuy.ufo.model.order.bo.AppraiseOrderBo; | 4 | import com.yohobuy.ufo.model.order.bo.AppraiseOrderBo; |
5 | import com.yohoufo.order.BaseWebTest; | 5 | import com.yohoufo.order.BaseWebTest; |
6 | import com.yohoufo.order.event.OrderCancelEvent; | 6 | import com.yohoufo.order.event.OrderCancelEvent; |
7 | +import com.yohoufo.order.service.impl.ServiceOrderProcessor; | ||
7 | import org.junit.Test; | 8 | import org.junit.Test; |
8 | import org.springframework.beans.factory.annotation.Autowired; | 9 | import org.springframework.beans.factory.annotation.Autowired; |
9 | 10 | ||
@@ -13,6 +14,9 @@ public class SellerDepositOrderServiceTest extends BaseWebTest { | @@ -13,6 +14,9 @@ public class SellerDepositOrderServiceTest extends BaseWebTest { | ||
13 | @Autowired | 14 | @Autowired |
14 | private SellerDepositOrderService sellerDepositOrderService; | 15 | private SellerDepositOrderService sellerDepositOrderService; |
15 | 16 | ||
17 | + @Autowired | ||
18 | + private ServiceOrderProcessor serviceOrderProcessor; | ||
19 | + | ||
16 | @Test | 20 | @Test |
17 | public void testGetSubOrderStatistic(){ | 21 | public void testGetSubOrderStatistic(){ |
18 | //sub 36378862305176 | 22 | //sub 36378862305176 |
@@ -29,4 +33,12 @@ public class SellerDepositOrderServiceTest extends BaseWebTest { | @@ -29,4 +33,12 @@ public class SellerDepositOrderServiceTest extends BaseWebTest { | ||
29 | sellerDepositOrderService.cancelByTimeout(orderCancelEvent); | 33 | sellerDepositOrderService.cancelByTimeout(orderCancelEvent); |
30 | 34 | ||
31 | } | 35 | } |
36 | + | ||
37 | + | ||
38 | + @Test | ||
39 | + public void testshamDeliver(){ | ||
40 | + long orderCode = 36380351864658L; | ||
41 | + ServiceOrderProcessor.ExistenceNode existenceNode = serviceOrderProcessor.isAppraiseOrder(orderCode); | ||
42 | + sellerDepositOrderService.shamDeliver(existenceNode.getAppraiseOrder()); | ||
43 | + } | ||
32 | } | 44 | } |
-
Please register or login to post a comment