|
|
|
|
@ -44,6 +44,7 @@ import com.zbkj.common.utils.RedisUtil; |
|
|
|
|
import com.zbkj.common.vo.*; |
|
|
|
|
import com.zbkj.service.delete.OrderUtils; |
|
|
|
|
import com.zbkj.service.service.*; |
|
|
|
|
import com.zbkj.service.util.RedisLockUtil; |
|
|
|
|
import org.apache.commons.lang3.StringEscapeUtils; |
|
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
|
import org.slf4j.Logger; |
|
|
|
|
@ -103,7 +104,8 @@ public class OrderServiceImpl implements OrderService { |
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
private StoreProductReplyService storeProductReplyService; |
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
private RedisLockUtil redisLock; |
|
|
|
|
@Autowired |
|
|
|
|
private RedisUtil redisUtil; |
|
|
|
|
|
|
|
|
|
@ -332,6 +334,11 @@ public class OrderServiceImpl implements OrderService { |
|
|
|
|
*/ |
|
|
|
|
@Override |
|
|
|
|
public Boolean refundApply(OrderRefundApplyRequest request) { |
|
|
|
|
boolean lock = |
|
|
|
|
redisLock.lock(Constants.ORDER_LOCK + request.getUni(),30); |
|
|
|
|
if (!lock) { |
|
|
|
|
throw new CrmebException("系统繁忙,请稍后再试"); |
|
|
|
|
} |
|
|
|
|
StoreOrder storeOrderPram = new StoreOrder(); |
|
|
|
|
storeOrderPram.setOrderId(request.getUni()); |
|
|
|
|
storeOrderPram.setIsDel(false); |
|
|
|
|
@ -349,8 +356,10 @@ public class OrderServiceImpl implements OrderService { |
|
|
|
|
if (existStoreOrder.getRefundStatus() == 3) { |
|
|
|
|
throw new CrmebException("订单退款中"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
existStoreOrder.setAfterSalesType("退货退款"); |
|
|
|
|
existStoreOrder.setAfterSalesStatus("待商家处理"); |
|
|
|
|
existStoreOrder.setRefundStatus(1); |
|
|
|
|
existStoreOrder.setRefundRequestStatus(3); |
|
|
|
|
existStoreOrder.setRefundReasonTime(CrmebDateUtil.nowDateTime()); |
|
|
|
|
existStoreOrder.setRefundReasonWap(request.getText()); |
|
|
|
|
existStoreOrder.setRefundReasonWapExplain(request.getExplain()); |
|
|
|
|
|