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 {
@IgnoreSession
@IgnoreSignature
@RequestMapping(value = "/qualityCheckPass")
@Deprecated
public ApiResponse qualityCheckPass(@RequestBody OrderRequest request) {
LOG.info("method ufo.depot.qualityCheckPass in, req is {}", request);
buyerOrderService.qualityCheckPass(request.getOrderCode());
... ...
... ... @@ -20,8 +20,6 @@ public interface IGoodsService {
int platformReceiveGoods(long orderCode);
int platformChecking(long orderCode);
/**
* 鉴定通过
* @param appraiseOrder
... ...
... ... @@ -67,18 +67,20 @@ public abstract class AbsGoodsServiceOrderService implements IGoodsService {
return rows;
}
/**
* 质检通过
* @param orderCode
* @return
* 鉴别为假
* @param appraiseOrder
*/
@Override
public int platformChecking(long orderCode){
AppraiseOrderStatus targetStatus = AppraiseOrderStatus.PLATFORM_CHECKING,
public int appraiseFake(AppraiseOrder appraiseOrder){
long orderCode = appraiseOrder.getOrderCode();
AppraiseOrderStatus targetStatus = AppraiseOrderStatus.CHECKING_FAKE,
expectedStatus = AppraiseOrderStatus.PLATFORM_RECEIVE;
int rows = triggerStatusChange(orderCode, targetStatus, expectedStatus);
logger.info("appraise order platformChecking update status, orderCode {} rows {}", orderCode, rows);
logger.info("appraise order appraiseFake update status, orderCode {} rows {}", orderCode, rows);
return rows;
}
... ... @@ -90,7 +92,7 @@ public abstract class AbsGoodsServiceOrderService implements IGoodsService {
public int appraisePass(AppraiseOrder appraiseOrder){
long orderCode = appraiseOrder.getOrderCode();
AppraiseOrderStatus targetStatus = AppraiseOrderStatus.JUDGE_PASS,
expectedStatus = AppraiseOrderStatus.PLATFORM_CHECKING;
expectedStatus = AppraiseOrderStatus.PLATFORM_RECEIVE;
int rows = triggerStatusChange(orderCode, targetStatus, expectedStatus);
logger.info("appraise order appraisePass update status, orderCode {} rows {}", orderCode, rows);
... ... @@ -98,21 +100,6 @@ public abstract class AbsGoodsServiceOrderService implements IGoodsService {
}
/**
* 鉴别为假
* @param appraiseOrder
*/
@Override
public int appraiseFake(AppraiseOrder appraiseOrder){
long orderCode = appraiseOrder.getOrderCode();
AppraiseOrderStatus targetStatus = AppraiseOrderStatus.CHECKING_FAKE,
expectedStatus = AppraiseOrderStatus.PLATFORM_CHECKING;
int rows = triggerStatusChange(orderCode, targetStatus, expectedStatus);
logger.info("appraise order appraiseFake update status, orderCode {} rows {}", orderCode, rows);
return rows;
}
/**
* 无法鉴别
* @param appraiseOrder
*/
... ...
... ... @@ -102,8 +102,8 @@ public class AppraiseOrderCreateService {
//meta
AddressInfo noHiddenBackAddress = ctx.getBackAddress(),
hiddenBackAddress = ctx.getBackHiddenAddress();
final String key = MetaKey.BUYER_DELIVERY_ADDRESS,
hidden_key = MetaKey.BUYER_DELIVERY_HIDDEN_ADDRESS;
final String key = MetaKey.RECALL_ADDRESS,
hidden_key = MetaKey.RECALL_HIDDEN_ADDRESS;
AppraiseOrderMeta noHiddenAddressMeta = new AppraiseOrderMeta();
noHiddenAddressMeta.setUid(uid);
noHiddenAddressMeta.setOrderCode(orderCode);
... ...
... ... @@ -737,13 +737,10 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService {
// 质检通过,不需要记录物流调拨信息
@Override
@Deprecated
public void qualityCheckPass(long orderCode){
logger.info("in qualityCheckPass, orderCode {}", orderCode);
if(serviceOrderProcessor.isGoodsServiceOrder(orderCode)){
logger.info("in qualityCheckPass order is GoodsServiceOrder orderCode {}", orderCode);
serviceOrderProcessor.findGoodsServiceInstance(orderCode).platformChecking(orderCode);
return;
}
OrderStatus expectStatus = OrderStatus.PLATFORM_RECEIVE;
... ...
... ... @@ -644,10 +644,12 @@ public abstract class AlipayServiceAbstract extends AbstractPayService {
bizJson.put("seller_id", "");
bizJson.put("product_code", "QUICK_MSECURITY_PAY");
bizJson.put("total_amount", amount.toPlainString());
bizJson.put("goods_type", "0");
String subject = "ufoOrder-" + tradeNo;
bizJson.put("subject", subject);
bizJson.put("body", subject);
bizJson.put("out_trade_no", tradeNo);
params.put("biz_content", bizJson.toJSONString());
... ...
... ... @@ -22,7 +22,7 @@ public class AppraiseOrderMetaService {
public AddressInfo getHidderUserAddress(long orderCode){
final String metaKey = MetaKey.BUYER_DELIVERY_HIDDEN_ADDRESS;
final String metaKey = MetaKey.RECALL_HIDDEN_ADDRESS;
AppraiseOrderMeta condition = new AppraiseOrderMeta();
condition.setOrderCode(orderCode);
condition.setMetaKey(metaKey);
... ...
... ... @@ -22,7 +22,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.order.convert.SellerOrderConvertor;
import com.yohoufo.order.model.response.AppraiseAddressResp;
import com.yohoufo.order.service.impl.AbsOrderViewService;
import com.yohoufo.order.service.impl.AppraiseAddressService;
... ...
package com.yohoufo.order.service.seller.deposit;
import com.alibaba.fastjson.JSONObject;
import com.yohobuy.ufo.model.order.bo.TimeoutBo;
import com.yohobuy.ufo.model.order.common.AppraiseOrderStatus;
import com.yohobuy.ufo.model.order.common.OrderAttributes;
import com.yohobuy.ufo.model.order.common.TabType;
import com.yohobuy.ufo.model.order.constants.SellerDepositOrderListType;
import com.yohobuy.ufo.model.order.constants.SkupType;
import com.yohobuy.ufo.model.order.req.SellerDepositOrderListReq;
import com.yohobuy.ufo.model.order.req.SellerDepositOrderPrdListReq;
import com.yohobuy.ufo.model.order.resp.DepositOrderInStorePrdListResp;
... ... @@ -25,6 +28,7 @@ import com.yohoufo.order.constants.MetaKey;
import com.yohoufo.order.convert.ProductConvertor;
import com.yohoufo.order.convert.SellerOrderConvertor;
import com.yohoufo.order.model.dto.SellerOrderComputeResult;
import com.yohoufo.order.service.impl.AbsOrderViewService;
import com.yohoufo.order.utils.LoggerUtils;
import lombok.Builder;
import org.slf4j.Logger;
... ... @@ -37,7 +41,7 @@ import java.util.function.Function;
import java.util.stream.Collectors;
@Service
public class SellerDepositOrderListService {
public class SellerDepositOrderListService extends AbsOrderViewService {
private final Logger logger = LoggerUtils.getSellerOrderLogger();
@Autowired
... ... @@ -118,12 +122,16 @@ public class SellerDepositOrderListService {
.imgUrl(ImageUrlAssist.getAllProductPicUrl(paog.getImageUrl(), "goodsimg", "center", "d2hpdGU="))
.build())
.collect(Collectors.toCollection(()->new ArrayList<>(aogList.size())));
TimeoutBo timeout = calTimeout(TabType.BUY, uid, orderCode, pao.getStatus(),
pao.getCreateTime(), oa);
return SellerDepositOrderListResp.builder()
.uid(uid)
.orderCode(orderCode)
.earnestMoney(BigDecimalHelper.formatNumber(pao.getAmount(), BigDecimalHelper.FORMAT_TWOBITAFTERPOINT))
.status(status)
.statuStr(appraiseOrderStatus.statusStr(oa))
.timeout(timeout)
.buttons(appraiseOrderStatus.listButtons(oa))
.productList(productList)
.build();
... ... @@ -268,6 +276,16 @@ public class SellerDepositOrderListService {
.collect(Collectors.toCollection(()->new ArrayList<>(paogs.size())));
}
@Override
public Logger getLogger() {
return logger;
}
@Override
protected String buildOrderTypeTag(Integer orderAttr, SkupType skupType) {
return null;
}
@Builder
static class OrderDataNode{
int sknNum;
... ...