Authored by sailing-PC\sailing

fix

package com.yohoufo.order.common;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
... ...
... ... @@ -35,22 +35,30 @@ public enum SkupStatus {
OrderDetailDesc.PaymentTips.AUTO_RETURN_SELLER
)
),
SELF_CANCEL_PAY(20, "上架关闭(卖家取消支付)",
/**
* (卖家取消支付)
*/
SELF_CANCEL_PAY(20, "上架关闭",
new Node(
Arrays.asList(ButtonShow.SOLD_AGAIN.getBo(), ButtonShow.DEL_ORDER.getBo(), ButtonShow.SHOW_DETAIL.getBo()),
Arrays.asList(ButtonShow.DEL_ORDER.getBo(), ButtonShow.SOLD_AGAIN.getBo()),
OrderDetailDesc.Seller.SELF_CANCEL_BEFORE_PAY
)
),
TIMEOUT_CANCEL(21, "上架关闭(卖家支付超时)",
/**
* (卖家支付超时)
*/
TIMEOUT_CANCEL(21, "上架关闭",
new Node(
Arrays.asList(ButtonShow.SOLD_AGAIN.getBo(), ButtonShow.DEL_ORDER.getBo(), ButtonShow.SHOW_DETAIL.getBo()),
Arrays.asList(ButtonShow.DEL_ORDER.getBo(), ButtonShow.SOLD_AGAIN.getBo()),
OrderDetailDesc.Seller.TIME_OUT_CANCEL
)
),
SELLER_CANCEL_SELL(22, "上架关闭(卖家取消出售)",
/**
* (卖家取消出售)
*/
SELLER_CANCEL_SELL(22, "上架关闭",
new Node(
Arrays.asList(ButtonShow.SOLD_AGAIN.getBo(), ButtonShow.DEL_ORDER.getBo(), ButtonShow.SHOW_DETAIL.getBo()),
Arrays.asList(ButtonShow.DEL_ORDER.getBo(), ButtonShow.SOLD_AGAIN.getBo()),
... ... @@ -58,7 +66,10 @@ public enum SkupStatus {
OrderDetailDesc.PaymentTips.FINISH_RETURN_SELLER
)
),
YOHO_CANCEL_SELL(23, "上架关闭(平台取消出售)",
/**
* (平台取消出售)
*/
YOHO_CANCEL_SELL(23, "上架关闭",
new Node(
Arrays.asList(ButtonShow.SOLD_AGAIN.getBo(), ButtonShow.DEL_ORDER.getBo(), ButtonShow.SHOW_DETAIL.getBo()),
Arrays.asList(ButtonShow.DEL_ORDER.getBo(), ButtonShow.SOLD_AGAIN.getBo()),
... ...
... ... @@ -86,6 +86,8 @@ public class PaymentController {
@RequestParam(name = "payment") int payment){
PaymentRequest request = PaymentRequest.builder().uid(uid).orderCode(orderCode).payment(payment).build();
logger.info("ufo.order.confirm req {}", request);
PaymentConfirmRsp payConfirm = paymentService.payConfirm(request);
return new ApiResponse.ApiResponseBuilder().code(PrepayResponse.SUCCESS).data(payConfirm).message("订单支付结果确认").build();
... ... @@ -102,7 +104,7 @@ public class PaymentController {
@RequestParam(name = "refundAmount") double refundAmount){
PaymentRequest request = PaymentRequest.builder().orderCode(orderCode).refundAmount(refundAmount).build();
logger.info("ufo.order.refund {}", request);
PayRefundBo payRefundBo = paymentService.refund(request);
if (payRefundBo.getRefundStatus() == RefundContant.PAYMENT_REFUND_RESULTCODE_SUCCESS){
... ...
... ... @@ -49,6 +49,7 @@ public class SellerOrderPaymentService extends AbstractOrderPaymentService {
* @param orderInfo
*/
public void updateOrderStatusPaid(OrderInfo orderInfo){
//TODO
logger.info("in update seller OrderStatus after Paid, orderInfo {}",orderInfo);
SellerOrder sellerOrder = new SellerOrder();
sellerOrder.setOrderCode(orderInfo.getOrderCode());
... ...
... ... @@ -258,37 +258,7 @@ public class ExpressInfoServiceImpl implements IExpressInfoService {
return ExpressInfoConstant.EXPRESS_TYPE_2;
}
return 0;
/*Integer uid = null;
boolean buyer = true;
//根据订单号判断是买家还是卖家
CodeMeta codeMeta = orderCodeGenerator.expId(orderCode);
if (Objects.isNull(codeMeta)){
LOGGER.warn("getExpressType orderCode illegal, req {}", orderCode);
throw new ServiceException(ServiceError.ORDER_REQUEST_PARM_IS_EMPTY);
}
//卖家
if(OrderCodeType.SELLER_TYPE.getType() == codeMeta.getType()){
buyer=false;
}
if (buyer) {
return ExpressInfoConstant.EXPRESS_TYPE_2;
} else {
SellerOrder sellerOrder = sellerOrderMapper.selectByOrderCodeUid(orderCode, uid);
if (sellerOrder == null) {
LOGGER.warn("query seller order is null.orderCode = {}, uid = {}", sellerOrder, uid);
throw new ServiceException(400, "卖家订单信息不存在!");
}
if (SellerOrderStatus.HAS_PAYED.getCode() == sellerOrder.getStatus()) {
// 查询卖家发货到鉴定中心的物流信息
return ExpressInfoConstant.EXPRESS_TYPE_1;
} else if (SellerOrderStatus.APPRAISAL_FAIL_COMPENSATE.getCode() == sellerOrder.getStatus()) {
// 查询鉴定中心发货给卖家的物流信息
return ExpressInfoConstant.EXPRESS_TYPE_3;
}
}
return 0;*/
}
/**
... ...
... ... @@ -164,7 +164,7 @@ public class SellerOrderDetailService extends AbsOrderDetailService implements I
goodsInfo.setColorName(sellerOrderGoods.getColorName());
goodsInfo.setSizeName(sellerOrderGoods.getSizeName());
goodsInfo.setGoodImg(sellerOrderGoods.getImageUrl());
goodsInfo.setGoodPrice(PriceFormater.addCnCurrencySymbol(sellerOrderGoods.getGoodsPrice().toPlainString()));
goodsInfo.setGoodPrice(sellerOrderGoods.getGoodsPrice().toPlainString());
goodsInfo.setProductId(sellerOrderGoods.getProductId());
goodsInfo.setStorageId(sellerOrderGoods.getStorageId());
return goodsInfo;
... ...