Authored by LUOXC

Merge branch 'test6.9.8' of http://git.yoho.cn/ufo/yohoufo-fore into test6.9.8

@@ -102,6 +102,9 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService { @@ -102,6 +102,9 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService {
102 @Autowired 102 @Autowired
103 private IExpressInfoService expressInfoService; 103 private IExpressInfoService expressInfoService;
104 104
  105 + @Autowired
  106 + private DepositService depositService;
  107 +
105 private boolean isDepositWithQuickDeliverGoods(int uid, long orderCode, Integer oa){ 108 private boolean isDepositWithQuickDeliverGoods(int uid, long orderCode, Integer oa){
106 BuyerOrderGoods pbog = buyerOrderGoodsMapper.selectOnlyByOrderCode(orderCode); 109 BuyerOrderGoods pbog = buyerOrderGoodsMapper.selectOnlyByOrderCode(orderCode);
107 SellerOrderGoods psog = sellerOrderGoodsMapper.selectByPrimaryKey(pbog.getSkup()); 110 SellerOrderGoods psog = sellerOrderGoodsMapper.selectByPrimaryKey(pbog.getSkup());
@@ -125,7 +128,8 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService { @@ -125,7 +128,8 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService {
125 OrderStatus targetOrderStatus = OrderStatus.HAS_PAYED; 128 OrderStatus targetOrderStatus = OrderStatus.HAS_PAYED;
126 boolean isQuickDeliver = false; 129 boolean isQuickDeliver = false;
127 boolean isDepositWithQuickDeliverGoods = false; 130 boolean isDepositWithQuickDeliverGoods = false;
128 - boolean isDerectPass = false; 131 + //是否直接鉴定通过
  132 + boolean isDirectPass = false;
129 133
130 //门店订单支付后直接完成 134 //门店订单支付后直接完成
131 if (BuyerOrderUtils.isOffline(orderInfo)) { 135 if (BuyerOrderUtils.isOffline(orderInfo)) {
@@ -134,11 +138,12 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService { @@ -134,11 +138,12 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService {
134 // 闪购发货 138 // 闪购发货
135 else if (isQuickDeliver = BuyerOrderUtils.isQuickDeliver(orderInfo.getAttributes())) { 139 else if (isQuickDeliver = BuyerOrderUtils.isQuickDeliver(orderInfo.getAttributes())) {
136 targetOrderStatus = OrderStatus.JUDGE_PASS; 140 targetOrderStatus = OrderStatus.JUDGE_PASS;
  141 + isDirectPass = true;
137 } 142 }
138 // 闪购寄存 143 // 闪购寄存
139 else if ((isDepositWithQuickDeliverGoods = isDepositWithQuickDeliverGoods(uid, orderCode, orderInfo.getAttributes()))) { 144 else if ((isDepositWithQuickDeliverGoods = isDepositWithQuickDeliverGoods(uid, orderCode, orderInfo.getAttributes()))) {
140 targetOrderStatus = OrderStatus.DONE; 145 targetOrderStatus = OrderStatus.DONE;
141 - isDerectPass = true; 146 + isDirectPass = true;
142 } 147 }
143 logger.info("after paid updateOrderStatusPaid uid {} orderCode {} isQuickDeliver {} isDepositWithQuickDeliverGoods {} ", 148 logger.info("after paid updateOrderStatusPaid uid {} orderCode {} isQuickDeliver {} isDepositWithQuickDeliverGoods {} ",
144 uid, orderCode, isQuickDeliver, isDepositWithQuickDeliverGoods); 149 uid, orderCode, isQuickDeliver, isDepositWithQuickDeliverGoods);
@@ -156,7 +161,8 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService { @@ -156,7 +161,8 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService {
156 logger.info("in updateOrderStatusPaid record status change, orderCode {}, status: {}", 161 logger.info("in updateOrderStatusPaid record status change, orderCode {}, status: {}",
157 orderCode, orderStatusCode); 162 orderCode, orderStatusCode);
158 orderStatusFlowService.addAsy(orderCode, orderStatusCode); 163 orderStatusFlowService.addAsy(orderCode, orderStatusCode);
159 - if (isDerectPass){ 164 + //打货款, 物权转移
  165 + if (isDirectPass){
160 boolean isDepositRequired = isDepositWithQuickDeliverGoods; 166 boolean isDepositRequired = isDepositWithQuickDeliverGoods;
161 appraiseService.processQuickDeliverOrderAfterPaid(orderCode, uid, isDepositRequired); 167 appraiseService.processQuickDeliverOrderAfterPaid(orderCode, uid, isDepositRequired);
162 } 168 }
@@ -253,12 +259,13 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService { @@ -253,12 +259,13 @@ public class BuyerOrderPaymentService extends AbstractOrderPaymentService {
253 * @param sellerOrderGoods 259 * @param sellerOrderGoods
254 */ 260 */
255 private void processQuickDeliverOrder(BuyerOrder buyerOrder, SellerOrderGoods sellerOrderGoods){ 261 private void processQuickDeliverOrder(BuyerOrder buyerOrder, SellerOrderGoods sellerOrderGoods){
256 - // notice  
257 - inBoxFacade.noticeWhenQuickDeliverOrderPaid(buyerOrder.getUid(), buyerOrder.getOrderCode(), sellerOrderGoods);  
258 Integer sellerUid = buyerOrder.getSellerUid(); 262 Integer sellerUid = buyerOrder.getSellerUid();
259 Integer buyerUid = buyerOrder.getUid(); 263 Integer buyerUid = buyerOrder.getUid();
260 Long orderCode = buyerOrder.getOrderCode(); 264 Long orderCode = buyerOrder.getOrderCode();
261 Integer skup = sellerOrderGoods.getId(); 265 Integer skup = sellerOrderGoods.getId();
  266 + // notice
  267 + inBoxFacade.noticeWhenQuickDeliverOrderPaid(buyerOrder.getUid(), buyerOrder.getOrderCode(), sellerOrderGoods);
  268 +
262 try { 269 try {
263 // 插入物流调拨信息 270 // 插入物流调拨信息
264 expressInfoService.saveOperateTransferExpressInfo(OperateTransferExpressInfo.builder() 271 expressInfoService.saveOperateTransferExpressInfo(OperateTransferExpressInfo.builder()
@@ -194,6 +194,9 @@ public class AppraiseService { @@ -194,6 +194,9 @@ public class AppraiseService {
194 @Autowired 194 @Autowired
195 private YhProducer yhProducer; 195 private YhProducer yhProducer;
196 196
  197 + @Autowired
  198 + private DepositService depositService;
  199 +
197 /** 200 /**
198 * 触发物流 201 * 触发物流
199 */ 202 */
@@ -1570,8 +1573,14 @@ public class AppraiseService { @@ -1570,8 +1573,14 @@ public class AppraiseService {
1570 } 1573 }
1571 } 1574 }
1572 } 1575 }
1573 - @Autowired  
1574 - private DepositService depositService; 1576 +
  1577 + /**
  1578 + * 1. 货款-> seller
  1579 + * 2. 寄存-> 物权转移
  1580 + * @param orderCode
  1581 + * @param uid
  1582 + * @param isDeposit
  1583 + */
1575 public void processQuickDeliverOrderAfterPaid(long orderCode,int uid, boolean isDeposit){ 1584 public void processQuickDeliverOrderAfterPaid(long orderCode,int uid, boolean isDeposit){
1576 BuyerOrderGoods pbog = buyerOrderGoodsMapper.selectOnlyByOrderCode(orderCode); 1585 BuyerOrderGoods pbog = buyerOrderGoodsMapper.selectOnlyByOrderCode(orderCode);
1577 BuyerOrder pbo = buyerOrderMapper.selectOnlyByOrderCode(orderCode); 1586 BuyerOrder pbo = buyerOrderMapper.selectOnlyByOrderCode(orderCode);
@@ -351,6 +351,8 @@ public class DepositServiceImpl implements DepositService { @@ -351,6 +351,8 @@ public class DepositServiceImpl implements DepositService {
351 } 351 }
352 352
353 public void clearCache(Integer uid, Integer productId, Integer storageId) { 353 public void clearCache(Integer uid, Integer productId, Integer storageId) {
  354 + LOGGER.info("clearCache execute in, uid is {}, productId is {}, storageId is {}", uid, productId, storageId);
  355 +
354 if (uid == null) { 356 if (uid == null) {
355 return; 357 return;
356 } 358 }
@@ -214,6 +214,8 @@ public class ShoppingSupport { @@ -214,6 +214,8 @@ public class ShoppingSupport {
214 }else if (SellerGoodsHelper.isImperfectGoods(skupType)){ 214 }else if (SellerGoodsHelper.isImperfectGoods(skupType)){
215 damagesDesc = 215 damagesDesc =
216 new String(OrderDetailDesc.PaymentTips.DAMAGES_DESC_OF_IMPERFECT.toCharArray()); 216 new String(OrderDetailDesc.PaymentTips.DAMAGES_DESC_OF_IMPERFECT.toCharArray());
  217 + }else if(SellerGoodsHelper.isQuickDeliver(skupType)){
  218 + damagesDesc = new String(OrderDetailDesc.PaymentTips.DAMAGES_DESC_OF_QUICK_DELIVER.toCharArray());
217 }else { 219 }else {
218 damagesDesc = 220 damagesDesc =
219 new String(OrderDetailDesc.PaymentTips.DAMAGES_DESC.toCharArray()); 221 new String(OrderDetailDesc.PaymentTips.DAMAGES_DESC.toCharArray());