bugfix 查询挂起状态占桩订单

This commit is contained in:
Lemon
2023-09-23 18:17:27 +08:00
parent 5e5d36b47d
commit 72c37c7a62
2 changed files with 4 additions and 3 deletions

View File

@@ -19,6 +19,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.util.Objects;
/**
* 占桩订单controller
@@ -119,9 +120,8 @@ public class OccupyOrderController extends BaseController {
String memberId = getMemberIdByAuthorization(request);
logger.info("查询用户: {} 是否有未支付的占桩订单", memberId);
OrderPileOccupy orderPileOccupy = orderPileOccupyService.queryUnPayOrderByMemberId(memberId);
String occupyCode = orderPileOccupy.getOccupyCode();
if (StringUtils.isNotBlank(occupyCode)) {
response = new RestApiResponse<>(ImmutableMap.of("occupyCode", occupyCode));
if (Objects.nonNull(orderPileOccupy)) {
response = new RestApiResponse<>(ImmutableMap.of("occupyCode", orderPileOccupy.getOccupyCode()));
}
} catch (Exception e) {
logger.error("查询用户是否有未支付的占桩订单 error,", e);

View File

@@ -188,6 +188,7 @@ public class CommonController {
log.info("图片上传成功 url:{}", url);
return ajax;
}catch (Exception e){
log.error("上传到阿里云oss error, ", e);
return AjaxResult.error(e.getMessage());
}
}