mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 19:45:09 +08:00
支付占桩订单
This commit is contained in:
@@ -46,6 +46,7 @@ import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.ParseException;
|
||||
@@ -111,9 +112,11 @@ public class OrderService {
|
||||
@Autowired
|
||||
private MemberAdapayRecordService memberAdapayRecordService;
|
||||
|
||||
@Resource
|
||||
private OrderPileOccupyService orderPileOccupyService;
|
||||
|
||||
/**
|
||||
* 生成订单
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@@ -125,18 +128,8 @@ public class OrderService {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取到vin 查询对应的用户,得到余额
|
||||
*
|
||||
* 生成订单
|
||||
*
|
||||
* 支付订单
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* 订单支付
|
||||
*
|
||||
* @param dto
|
||||
*/
|
||||
public Map<String, Object> payOrder(PayOrderDTO dto) throws Exception {
|
||||
@@ -154,7 +147,7 @@ public class OrderService {
|
||||
// 查询订单详情,验证订单中的桩编号是否正确
|
||||
OrderBasicInfo orderBasicInfo = orderBasicInfoService.getOrderInfoByOrderCode(dto.getOrderCode());
|
||||
if (orderBasicInfo == null) {
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_QUERY_ORDER_NULL_ERROR);
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_QUERY_ORDER_INFO_IS_NULL);
|
||||
}
|
||||
if (!(StringUtils.equals(orderBasicInfo.getPileSn(), dto.getPileSn())
|
||||
&& StringUtils.equals(orderBasicInfo.getConnectorCode(), dto.getConnectorCode()))) {
|
||||
@@ -241,7 +234,7 @@ public class OrderService {
|
||||
// 查订单
|
||||
OrderBasicInfo orderInfo = orderBasicInfoService.getOrderInfoByOrderCode(dto.getOrderCode());
|
||||
if (orderInfo == null) {
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_QUERY_ORDER_NULL_ERROR);
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_QUERY_ORDER_INFO_IS_NULL);
|
||||
}
|
||||
// 判断订单状态是不是已经结算了
|
||||
if (StringUtils.equals(orderInfo.getOrderStatus(), OrderStatusEnum.ORDER_COMPLETE.getValue())) {
|
||||
@@ -540,7 +533,7 @@ public class OrderService {
|
||||
public UniAppOrderVO getUniAppOrderDetail(String orderCode) {
|
||||
OrderBasicInfo orderBasicInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode);
|
||||
if (orderBasicInfo == null) {
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_QUERY_ORDER_NULL_ERROR);
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_QUERY_ORDER_INFO_IS_NULL);
|
||||
}
|
||||
UniAppOrderVO vo = new UniAppOrderVO();
|
||||
vo.setOrderCode(orderBasicInfo.getOrderCode());
|
||||
@@ -1148,5 +1141,7 @@ public class OrderService {
|
||||
log.info("支付撤销失败 data:{}", JSON.toJSONString(data));
|
||||
}
|
||||
|
||||
|
||||
public Map<String, Object> payOccupyPileOrder(PayOrderDTO dto) {
|
||||
return orderPileOccupyService.payOccupyPileOrder(dto);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user