mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 19:15:35 +08:00
update
This commit is contained in:
@@ -10,12 +10,10 @@ import com.jsowell.common.exception.BusinessException;
|
||||
import com.jsowell.common.response.RestApiResponse;
|
||||
import com.jsowell.common.util.StringUtils;
|
||||
import com.jsowell.pile.domain.OrderPileOccupy;
|
||||
import com.jsowell.pile.dto.GenerateOccupyOrderDTO;
|
||||
import com.jsowell.pile.dto.QueryOccupyOrderDTO;
|
||||
import com.jsowell.pile.service.IPileBillingTemplateService;
|
||||
import com.jsowell.pile.service.OrderPileOccupyService;
|
||||
import com.jsowell.pile.vo.uniapp.OccupyOrderDetailVO;
|
||||
import com.jsowell.pile.vo.uniapp.OrderPileOccupyVO;
|
||||
import com.jsowell.pile.vo.web.BillingTemplateVO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -108,4 +106,33 @@ public class OccupyOrderController extends BaseController {
|
||||
logger.info("查询占桩订单详情页 result:{}", response);
|
||||
return response;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询用户是否有未支付的占桩订单
|
||||
* https://api.jsowellcloud.com/uniapp/occupyOrder/getUnPayOccupyOrder
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
@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 {
|
||||
OrderPileOccupy orderPileOccupy = orderPileOccupyService.queryUnPayOrderByMemberId(memberId);
|
||||
if (orderPileOccupy != null) {
|
||||
response = new RestApiResponse<>(ImmutableMap.of("occupyOrder", orderPileOccupy.getOccupyCode()));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("查询用户: {} 是否有未支付的占桩订单 error,", memberId);
|
||||
response = new RestApiResponse<>(e);
|
||||
}
|
||||
logger.info("查询用户: {} 是否有未支付的占桩订单 result:{}", memberId, response);
|
||||
return response;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user