Authored by tanling

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

@@ -130,6 +130,7 @@ public class ErpGWOrderController { @@ -130,6 +130,7 @@ public class ErpGWOrderController {
130 @IgnoreSession 130 @IgnoreSession
131 @IgnoreSignature 131 @IgnoreSignature
132 @RequestMapping(value = "/qualityCheckPass") 132 @RequestMapping(value = "/qualityCheckPass")
  133 + @Deprecated
133 public ApiResponse qualityCheckPass(@RequestBody OrderRequest request) { 134 public ApiResponse qualityCheckPass(@RequestBody OrderRequest request) {
134 LOG.info("method ufo.depot.qualityCheckPass in, req is {}", request); 135 LOG.info("method ufo.depot.qualityCheckPass in, req is {}", request);
135 buyerOrderService.qualityCheckPass(request.getOrderCode()); 136 buyerOrderService.qualityCheckPass(request.getOrderCode());
@@ -20,8 +20,6 @@ public interface IGoodsService { @@ -20,8 +20,6 @@ public interface IGoodsService {
20 int platformReceiveGoods(long orderCode); 20 int platformReceiveGoods(long orderCode);
21 21
22 22
23 - int platformChecking(long orderCode);  
24 -  
25 /** 23 /**
26 * 鉴定通过 24 * 鉴定通过
27 * @param appraiseOrder 25 * @param appraiseOrder
@@ -67,18 +67,20 @@ public abstract class AbsGoodsServiceOrderService implements IGoodsService { @@ -67,18 +67,20 @@ public abstract class AbsGoodsServiceOrderService implements IGoodsService {
67 return rows; 67 return rows;
68 } 68 }
69 69
  70 +
  71 +
70 /** 72 /**
71 - * 质检通过  
72 - * @param orderCode  
73 - * @return 73 + * 鉴别为假
  74 + * @param appraiseOrder
74 */ 75 */
75 @Override 76 @Override
76 - public int platformChecking(long orderCode){  
77 - AppraiseOrderStatus targetStatus = AppraiseOrderStatus.PLATFORM_CHECKING, 77 + public int appraiseFake(AppraiseOrder appraiseOrder){
  78 + long orderCode = appraiseOrder.getOrderCode();
  79 + AppraiseOrderStatus targetStatus = AppraiseOrderStatus.CHECKING_FAKE,
78 expectedStatus = AppraiseOrderStatus.PLATFORM_RECEIVE; 80 expectedStatus = AppraiseOrderStatus.PLATFORM_RECEIVE;
79 81
80 int rows = triggerStatusChange(orderCode, targetStatus, expectedStatus); 82 int rows = triggerStatusChange(orderCode, targetStatus, expectedStatus);
81 - logger.info("appraise order platformChecking update status, orderCode {} rows {}", orderCode, rows); 83 + logger.info("appraise order appraiseFake update status, orderCode {} rows {}", orderCode, rows);
82 return rows; 84 return rows;
83 } 85 }
84 86
@@ -90,7 +92,7 @@ public abstract class AbsGoodsServiceOrderService implements IGoodsService { @@ -90,7 +92,7 @@ public abstract class AbsGoodsServiceOrderService implements IGoodsService {
90 public int appraisePass(AppraiseOrder appraiseOrder){ 92 public int appraisePass(AppraiseOrder appraiseOrder){
91 long orderCode = appraiseOrder.getOrderCode(); 93 long orderCode = appraiseOrder.getOrderCode();
92 AppraiseOrderStatus targetStatus = AppraiseOrderStatus.JUDGE_PASS, 94 AppraiseOrderStatus targetStatus = AppraiseOrderStatus.JUDGE_PASS,
93 - expectedStatus = AppraiseOrderStatus.PLATFORM_CHECKING; 95 + expectedStatus = AppraiseOrderStatus.PLATFORM_RECEIVE;
94 96
95 int rows = triggerStatusChange(orderCode, targetStatus, expectedStatus); 97 int rows = triggerStatusChange(orderCode, targetStatus, expectedStatus);
96 logger.info("appraise order appraisePass update status, orderCode {} rows {}", orderCode, rows); 98 logger.info("appraise order appraisePass update status, orderCode {} rows {}", orderCode, rows);
@@ -98,21 +100,6 @@ public abstract class AbsGoodsServiceOrderService implements IGoodsService { @@ -98,21 +100,6 @@ public abstract class AbsGoodsServiceOrderService implements IGoodsService {
98 } 100 }
99 101
100 /** 102 /**
101 - * 鉴别为假  
102 - * @param appraiseOrder  
103 - */  
104 - @Override  
105 - public int appraiseFake(AppraiseOrder appraiseOrder){  
106 - long orderCode = appraiseOrder.getOrderCode();  
107 - AppraiseOrderStatus targetStatus = AppraiseOrderStatus.CHECKING_FAKE,  
108 - expectedStatus = AppraiseOrderStatus.PLATFORM_CHECKING;  
109 -  
110 - int rows = triggerStatusChange(orderCode, targetStatus, expectedStatus);  
111 - logger.info("appraise order appraiseFake update status, orderCode {} rows {}", orderCode, rows);  
112 - return rows;  
113 - }  
114 -  
115 - /**  
116 * 无法鉴别 103 * 无法鉴别
117 * @param appraiseOrder 104 * @param appraiseOrder
118 */ 105 */
@@ -102,8 +102,8 @@ public class AppraiseOrderCreateService { @@ -102,8 +102,8 @@ public class AppraiseOrderCreateService {
102 //meta 102 //meta
103 AddressInfo noHiddenBackAddress = ctx.getBackAddress(), 103 AddressInfo noHiddenBackAddress = ctx.getBackAddress(),
104 hiddenBackAddress = ctx.getBackHiddenAddress(); 104 hiddenBackAddress = ctx.getBackHiddenAddress();
105 - final String key = MetaKey.BUYER_DELIVERY_ADDRESS,  
106 - hidden_key = MetaKey.BUYER_DELIVERY_HIDDEN_ADDRESS; 105 + final String key = MetaKey.RECALL_ADDRESS,
  106 + hidden_key = MetaKey.RECALL_HIDDEN_ADDRESS;
107 AppraiseOrderMeta noHiddenAddressMeta = new AppraiseOrderMeta(); 107 AppraiseOrderMeta noHiddenAddressMeta = new AppraiseOrderMeta();
108 noHiddenAddressMeta.setUid(uid); 108 noHiddenAddressMeta.setUid(uid);
109 noHiddenAddressMeta.setOrderCode(orderCode); 109 noHiddenAddressMeta.setOrderCode(orderCode);
@@ -737,13 +737,10 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { @@ -737,13 +737,10 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
737 737
738 // 质检通过,不需要记录物流调拨信息 738 // 质检通过,不需要记录物流调拨信息
739 @Override 739 @Override
  740 + @Deprecated
740 public void qualityCheckPass(long orderCode){ 741 public void qualityCheckPass(long orderCode){
741 logger.info("in qualityCheckPass, orderCode {}", orderCode); 742 logger.info("in qualityCheckPass, orderCode {}", orderCode);
742 - if(serviceOrderProcessor.isGoodsServiceOrder(orderCode)){  
743 - logger.info("in qualityCheckPass order is GoodsServiceOrder orderCode {}", orderCode);  
744 - serviceOrderProcessor.findGoodsServiceInstance(orderCode).platformChecking(orderCode);  
745 - return;  
746 - } 743 +
747 744
748 745
749 OrderStatus expectStatus = OrderStatus.PLATFORM_RECEIVE; 746 OrderStatus expectStatus = OrderStatus.PLATFORM_RECEIVE;
@@ -644,10 +644,12 @@ public abstract class AlipayServiceAbstract extends AbstractPayService { @@ -644,10 +644,12 @@ public abstract class AlipayServiceAbstract extends AbstractPayService {
644 bizJson.put("seller_id", ""); 644 bizJson.put("seller_id", "");
645 bizJson.put("product_code", "QUICK_MSECURITY_PAY"); 645 bizJson.put("product_code", "QUICK_MSECURITY_PAY");
646 bizJson.put("total_amount", amount.toPlainString()); 646 bizJson.put("total_amount", amount.toPlainString());
  647 + bizJson.put("goods_type", "0");
647 648
648 String subject = "ufoOrder-" + tradeNo; 649 String subject = "ufoOrder-" + tradeNo;
649 bizJson.put("subject", subject); 650 bizJson.put("subject", subject);
650 bizJson.put("body", subject); 651 bizJson.put("body", subject);
  652 +
651 bizJson.put("out_trade_no", tradeNo); 653 bizJson.put("out_trade_no", tradeNo);
652 654
653 params.put("biz_content", bizJson.toJSONString()); 655 params.put("biz_content", bizJson.toJSONString());
@@ -22,7 +22,7 @@ public class AppraiseOrderMetaService { @@ -22,7 +22,7 @@ public class AppraiseOrderMetaService {
22 22
23 public AddressInfo getHidderUserAddress(long orderCode){ 23 public AddressInfo getHidderUserAddress(long orderCode){
24 24
25 - final String metaKey = MetaKey.BUYER_DELIVERY_HIDDEN_ADDRESS; 25 + final String metaKey = MetaKey.RECALL_HIDDEN_ADDRESS;
26 AppraiseOrderMeta condition = new AppraiseOrderMeta(); 26 AppraiseOrderMeta condition = new AppraiseOrderMeta();
27 condition.setOrderCode(orderCode); 27 condition.setOrderCode(orderCode);
28 condition.setMetaKey(metaKey); 28 condition.setMetaKey(metaKey);
@@ -22,7 +22,6 @@ import com.yohoufo.dal.order.AppraiseOrderMapper; @@ -22,7 +22,6 @@ import com.yohoufo.dal.order.AppraiseOrderMapper;
22 import com.yohoufo.dal.order.AppraiseOrderMetaMapper; 22 import com.yohoufo.dal.order.AppraiseOrderMetaMapper;
23 import com.yohoufo.dal.order.AppraiseOrderStorageMapper; 23 import com.yohoufo.dal.order.AppraiseOrderStorageMapper;
24 import com.yohoufo.dal.order.model.AppraiseOrder; 24 import com.yohoufo.dal.order.model.AppraiseOrder;
25 -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;
28 import com.yohoufo.order.service.impl.AppraiseAddressService; 27 import com.yohoufo.order.service.impl.AppraiseAddressService;
1 package com.yohoufo.order.service.seller.deposit; 1 package com.yohoufo.order.service.seller.deposit;
2 2
3 import com.alibaba.fastjson.JSONObject; 3 import com.alibaba.fastjson.JSONObject;
  4 +import com.yohobuy.ufo.model.order.bo.TimeoutBo;
4 import com.yohobuy.ufo.model.order.common.AppraiseOrderStatus; 5 import com.yohobuy.ufo.model.order.common.AppraiseOrderStatus;
5 import com.yohobuy.ufo.model.order.common.OrderAttributes; 6 import com.yohobuy.ufo.model.order.common.OrderAttributes;
  7 +import com.yohobuy.ufo.model.order.common.TabType;
6 import com.yohobuy.ufo.model.order.constants.SellerDepositOrderListType; 8 import com.yohobuy.ufo.model.order.constants.SellerDepositOrderListType;
  9 +import com.yohobuy.ufo.model.order.constants.SkupType;
7 import com.yohobuy.ufo.model.order.req.SellerDepositOrderListReq; 10 import com.yohobuy.ufo.model.order.req.SellerDepositOrderListReq;
8 import com.yohobuy.ufo.model.order.req.SellerDepositOrderPrdListReq; 11 import com.yohobuy.ufo.model.order.req.SellerDepositOrderPrdListReq;
9 import com.yohobuy.ufo.model.order.resp.DepositOrderInStorePrdListResp; 12 import com.yohobuy.ufo.model.order.resp.DepositOrderInStorePrdListResp;
@@ -25,6 +28,7 @@ import com.yohoufo.order.constants.MetaKey; @@ -25,6 +28,7 @@ import com.yohoufo.order.constants.MetaKey;
25 import com.yohoufo.order.convert.ProductConvertor; 28 import com.yohoufo.order.convert.ProductConvertor;
26 import com.yohoufo.order.convert.SellerOrderConvertor; 29 import com.yohoufo.order.convert.SellerOrderConvertor;
27 import com.yohoufo.order.model.dto.SellerOrderComputeResult; 30 import com.yohoufo.order.model.dto.SellerOrderComputeResult;
  31 +import com.yohoufo.order.service.impl.AbsOrderViewService;
28 import com.yohoufo.order.utils.LoggerUtils; 32 import com.yohoufo.order.utils.LoggerUtils;
29 import lombok.Builder; 33 import lombok.Builder;
30 import org.slf4j.Logger; 34 import org.slf4j.Logger;
@@ -37,7 +41,7 @@ import java.util.function.Function; @@ -37,7 +41,7 @@ import java.util.function.Function;
37 import java.util.stream.Collectors; 41 import java.util.stream.Collectors;
38 42
39 @Service 43 @Service
40 -public class SellerDepositOrderListService { 44 +public class SellerDepositOrderListService extends AbsOrderViewService {
41 private final Logger logger = LoggerUtils.getSellerOrderLogger(); 45 private final Logger logger = LoggerUtils.getSellerOrderLogger();
42 46
43 @Autowired 47 @Autowired
@@ -118,12 +122,16 @@ public class SellerDepositOrderListService { @@ -118,12 +122,16 @@ public class SellerDepositOrderListService {
118 .imgUrl(ImageUrlAssist.getAllProductPicUrl(paog.getImageUrl(), "goodsimg", "center", "d2hpdGU=")) 122 .imgUrl(ImageUrlAssist.getAllProductPicUrl(paog.getImageUrl(), "goodsimg", "center", "d2hpdGU="))
119 .build()) 123 .build())
120 .collect(Collectors.toCollection(()->new ArrayList<>(aogList.size()))); 124 .collect(Collectors.toCollection(()->new ArrayList<>(aogList.size())));
  125 +
  126 + TimeoutBo timeout = calTimeout(TabType.BUY, uid, orderCode, pao.getStatus(),
  127 + pao.getCreateTime(), oa);
121 return SellerDepositOrderListResp.builder() 128 return SellerDepositOrderListResp.builder()
122 .uid(uid) 129 .uid(uid)
123 .orderCode(orderCode) 130 .orderCode(orderCode)
124 .earnestMoney(BigDecimalHelper.formatNumber(pao.getAmount(), BigDecimalHelper.FORMAT_TWOBITAFTERPOINT)) 131 .earnestMoney(BigDecimalHelper.formatNumber(pao.getAmount(), BigDecimalHelper.FORMAT_TWOBITAFTERPOINT))
125 .status(status) 132 .status(status)
126 .statuStr(appraiseOrderStatus.statusStr(oa)) 133 .statuStr(appraiseOrderStatus.statusStr(oa))
  134 + .timeout(timeout)
127 .buttons(appraiseOrderStatus.listButtons(oa)) 135 .buttons(appraiseOrderStatus.listButtons(oa))
128 .productList(productList) 136 .productList(productList)
129 .build(); 137 .build();
@@ -268,6 +276,16 @@ public class SellerDepositOrderListService { @@ -268,6 +276,16 @@ public class SellerDepositOrderListService {
268 .collect(Collectors.toCollection(()->new ArrayList<>(paogs.size()))); 276 .collect(Collectors.toCollection(()->new ArrayList<>(paogs.size())));
269 } 277 }
270 278
  279 + @Override
  280 + public Logger getLogger() {
  281 + return logger;
  282 + }
  283 +
  284 + @Override
  285 + protected String buildOrderTypeTag(Integer orderAttr, SkupType skupType) {
  286 + return null;
  287 + }
  288 +
271 @Builder 289 @Builder
272 static class OrderDataNode{ 290 static class OrderDataNode{
273 int sknNum; 291 int sknNum;