fix:退租审核增加解冻增加try catch

This commit is contained in:
yangqingyuan
2024-08-26 16:10:19 +08:00
parent 56120d1c8c
commit 383d1c41eb

View File

@@ -29,6 +29,7 @@ import com.gxwebsoft.common.core.annotation.OperationLog;
import com.gxwebsoft.shop.service.OrderService; import com.gxwebsoft.shop.service.OrderService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
@@ -47,6 +48,7 @@ import static com.gxwebsoft.common.core.constants.OrderConstants.*;
* @since 2023-05-18 13:09:51 * @since 2023-05-18 13:09:51
*/ */
@Api(tags = "售后单记录表管理") @Api(tags = "售后单记录表管理")
@Slf4j
@RestController @RestController
@RequestMapping("/api/shop/order-refund") @RequestMapping("/api/shop/order-refund")
public class OrderRefundController extends BaseController { public class OrderRefundController extends BaseController {
@@ -140,7 +142,11 @@ public class OrderRefundController extends BaseController {
order.setReceiptStatus(RECEIPT_STATUS_RETURN); order.setReceiptStatus(RECEIPT_STATUS_RETURN);
order.setOrderStatus(ORDER_STATUS_OVER); order.setOrderStatus(ORDER_STATUS_OVER);
orderService.updateById(order); orderService.updateById(order);
freezeOrderService.unfreeze(order.getOrderId(), refundMoney); try {
freezeOrderService.unfreeze(order.getOrderId(), refundMoney);//这里有可能出现没有找不到解冻订单的问题
}catch (Exception e){
log.warn("解冻失败orderId:{},orderNo:{},errMesg:{}", orderRefund.getOrderId(),orderRefund.getOrderNo(),e.getMessage());
}
// freezeOrderService.deduction(order.getOrderId()); // freezeOrderService.deduction(order.getOrderId());
} }
else if(auditStatus.equals(30)) { else if(auditStatus.equals(30)) {