mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-12 19:29:52 +08:00
update 查询用户是否有未支付的占桩订单
This commit is contained in:
@@ -19,7 +19,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 占桩订单controller
|
* 占桩订单controller
|
||||||
@@ -115,23 +114,19 @@ public class OccupyOrderController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@GetMapping("/getUnPayOccupyOrder")
|
@GetMapping("/getUnPayOccupyOrder")
|
||||||
public RestApiResponse<?> getUnPayOccupyOrder(HttpServletRequest request) {
|
public RestApiResponse<?> getUnPayOccupyOrder(HttpServletRequest request) {
|
||||||
|
|
||||||
String memberId = getMemberIdByAuthorization(request);
|
|
||||||
if (StringUtils.isBlank(memberId)) {
|
|
||||||
throw new BusinessException(ReturnCodeEnum.CODE_TOKEN_ERROR);
|
|
||||||
}
|
|
||||||
RestApiResponse<?> response = null;
|
RestApiResponse<?> response = null;
|
||||||
logger.info("查询用户: {} 是否有未支付的占桩订单", memberId);
|
|
||||||
try {
|
try {
|
||||||
|
String memberId = getMemberIdByAuthorization(request);
|
||||||
|
logger.info("查询用户: {} 是否有未支付的占桩订单", memberId);
|
||||||
OrderPileOccupy orderPileOccupy = orderPileOccupyService.queryUnPayOrderByMemberId(memberId);
|
OrderPileOccupy orderPileOccupy = orderPileOccupyService.queryUnPayOrderByMemberId(memberId);
|
||||||
if (orderPileOccupy != null) {
|
if (orderPileOccupy != null) {
|
||||||
response = new RestApiResponse<>(ImmutableMap.of("occupyOrder", orderPileOccupy.getOccupyCode()));
|
response = new RestApiResponse<>(ImmutableMap.of("occupyOrder", orderPileOccupy.getOccupyCode()));
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("查询用户: {} 是否有未支付的占桩订单 error,", memberId);
|
logger.error("查询用户是否有未支付的占桩订单 error,", e);
|
||||||
response = new RestApiResponse<>(e);
|
response = new RestApiResponse<>(e);
|
||||||
}
|
}
|
||||||
logger.info("查询用户: {} 是否有未支付的占桩订单 result:{}", memberId, response);
|
logger.info("查询用户是否有未支付的占桩订单 result:{}", response);
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user