update 查询用户是否有未支付的占桩订单

This commit is contained in:
2023-08-24 10:46:24 +08:00
parent 96a2b6c968
commit 7a16e474c8

View File

@@ -19,7 +19,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
/**
* 占桩订单controller
@@ -115,23 +114,19 @@ public class OccupyOrderController extends BaseController {
*/
@GetMapping("/getUnPayOccupyOrder")
public RestApiResponse<?> getUnPayOccupyOrder(HttpServletRequest request) {
String memberId = getMemberIdByAuthorization(request);
if (StringUtils.isBlank(memberId)) {
throw new BusinessException(ReturnCodeEnum.CODE_TOKEN_ERROR);
}
RestApiResponse<?> response = null;
logger.info("查询用户: {} 是否有未支付的占桩订单", memberId);
try {
String memberId = getMemberIdByAuthorization(request);
logger.info("查询用户: {} 是否有未支付的占桩订单", memberId);
OrderPileOccupy orderPileOccupy = orderPileOccupyService.queryUnPayOrderByMemberId(memberId);
if (orderPileOccupy != null) {
response = new RestApiResponse<>(ImmutableMap.of("occupyOrder", orderPileOccupy.getOccupyCode()));
}
} catch (Exception e) {
logger.error("查询用户: {} 是否有未支付的占桩订单 error,", memberId);
logger.error("查询用户是否有未支付的占桩订单 error,", e);
response = new RestApiResponse<>(e);
}
logger.info("查询用户: {} 是否有未支付的占桩订单 result:{}", memberId, response);
logger.info("查询用户是否有未支付的占桩订单 result:{}", response);
return response;
}