Authored by chenchao

add log

1 package com.yohoufo.order.service; 1 package com.yohoufo.order.service;
2 2
3 import com.alibaba.fastjson.JSONObject; 3 import com.alibaba.fastjson.JSONObject;
  4 +import com.google.common.collect.Lists;
4 import com.yoho.error.ServiceError; 5 import com.yoho.error.ServiceError;
5 import com.yoho.error.exception.ServiceException; 6 import com.yoho.error.exception.ServiceException;
6 import com.yohobuy.ufo.model.order.bo.OrderInfo; 7 import com.yohobuy.ufo.model.order.bo.OrderInfo;
@@ -138,8 +139,15 @@ public class AppraiseOrderPaymentService extends AbstractOrderPaymentService { @@ -138,8 +139,15 @@ public class AppraiseOrderPaymentService extends AbstractOrderPaymentService {
138 return false; 139 return false;
139 } 140 }
140 141
141 - final static List<Integer> canRefundStatusList = Arrays.asList(AppraiseOrderStatus.WAITING_PAY.getCode(),  
142 - AppraiseOrderStatus.HAS_PAYED.getCode()); 142 +
  143 +
  144 + private static final List<Integer> canRefundStatusListOfDepositOrder = Lists.newArrayList(
  145 + AppraiseOrderStatus.HAS_PAYED.getCode(),
  146 + AppraiseOrderStatus.PLATFORM_APPRAISE_UNSURE.getCode(),
  147 + AppraiseOrderStatus.JUDGE_PASS_WAIT_WAREHOUSE.getCode(),
  148 + AppraiseOrderStatus.SHAM_SEND_OUT.getCode(),
  149 + AppraiseOrderStatus.SEND_OUT_TIMEOUT.getCode()
  150 + );
143 151
144 @Override 152 @Override
145 public boolean canRefund(OrderInfo orderInfo) { 153 public boolean canRefund(OrderInfo orderInfo) {
@@ -148,7 +156,7 @@ public class AppraiseOrderPaymentService extends AbstractOrderPaymentService { @@ -148,7 +156,7 @@ public class AppraiseOrderPaymentService extends AbstractOrderPaymentService {
148 case APPRAISE: 156 case APPRAISE:
149 throw new UfoServiceException(400, "鉴定订单暂不支持退款"); 157 throw new UfoServiceException(400, "鉴定订单暂不支持退款");
150 case DEPOSITE: 158 case DEPOSITE:
151 - if (orderInfo.getStatus() != null && canRefundStatusList.contains(orderInfo.getStatus().intValue())){ 159 + if (orderInfo.getStatus() != null && canRefundStatusListOfDepositOrder.contains(orderInfo.getStatus().intValue())){
152 return true; 160 return true;
153 } 161 }
154 break; 162 break;