修改结束订单为null问题
This commit is contained in:
parent
e7b6ec6db0
commit
a8f5d5f5aa
@ -242,12 +242,18 @@ public class XhpcPileOrderController extends BaseController {
|
|||||||
try{
|
try{
|
||||||
//获取实时订单
|
//获取实时订单
|
||||||
Map<String, Object> cacheMap = redisService.getCacheMap("order:"+orderNo);
|
Map<String, Object> cacheMap = redisService.getCacheMap("order:"+orderNo);
|
||||||
|
if(cacheMap==null || cacheMap.get("orderData")==null ){
|
||||||
|
return R.fail(500,"无效订单号:"+orderNo);
|
||||||
|
}
|
||||||
CacheOrderData cacheOrderData = (CacheOrderData)cacheMap.get("orderData");
|
CacheOrderData cacheOrderData = (CacheOrderData)cacheMap.get("orderData");
|
||||||
//获取充电订单
|
//获取充电订单
|
||||||
XhpcChargeOrder xhpcChargeOrder = xhpcChargeOrderService.getSerialNumberMessage(orderNo);
|
XhpcChargeOrder xhpcChargeOrder = xhpcChargeOrderService.getSerialNumberMessage(orderNo);
|
||||||
if(xhpcChargeOrder == null ){
|
if(xhpcChargeOrder == null ){
|
||||||
return R.fail(500,"无效订单号:"+orderNo);
|
return R.fail(500,"无效订单号:"+orderNo);
|
||||||
}
|
}
|
||||||
|
if(cacheOrderData==null || cacheOrderData.getT1PowerQuantity()==null ){
|
||||||
|
return R.fail(500,"无效订单号:"+orderNo);
|
||||||
|
}
|
||||||
if(xhpcChargeOrder.getStatus()==1 || xhpcChargeOrder.getStatus()==3){
|
if(xhpcChargeOrder.getStatus()==1 || xhpcChargeOrder.getStatus()==3){
|
||||||
logger.info("订单已结束不能重复结算>>>>>orderNo:"+orderNo+">>>chargeOrderId:"+xhpcChargeOrder.getChargeOrderId());
|
logger.info("订单已结束不能重复结算>>>>>orderNo:"+orderNo+">>>chargeOrderId:"+xhpcChargeOrder.getChargeOrderId());
|
||||||
return R.ok();
|
return R.ok();
|
||||||
@ -265,7 +271,6 @@ public class XhpcPileOrderController extends BaseController {
|
|||||||
//费率计费模型
|
//费率计费模型
|
||||||
List<XhpcRate> rateModelList = xhpcChargeOrderService.getRateModelId(xhpcChargeOrder.getRateModelId());
|
List<XhpcRate> rateModelList = xhpcChargeOrderService.getRateModelId(xhpcChargeOrder.getRateModelId());
|
||||||
for (XhpcRate xhpcRate:rateModelList) {
|
for (XhpcRate xhpcRate:rateModelList) {
|
||||||
System.out.println(">>>>>>"+xhpcRate.getRateValue());
|
|
||||||
if("00".equals(xhpcRate.getRateValue())){
|
if("00".equals(xhpcRate.getRateValue())){
|
||||||
t1powerFee = xhpcRate.getPowerFee();
|
t1powerFee = xhpcRate.getPowerFee();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -73,7 +73,6 @@ public class AlipayPaymentController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private UserTypeService userTypeService;
|
private UserTypeService userTypeService;
|
||||||
|
|
||||||
|
|
||||||
private static final Logger logger = LoggerFactory.getLogger(AlipayPaymentController.class);
|
private static final Logger logger = LoggerFactory.getLogger(AlipayPaymentController.class);
|
||||||
|
|
||||||
@Log(title = "支付宝-支付", businessType = BusinessType.INSERT)
|
@Log(title = "支付宝-支付", businessType = BusinessType.INSERT)
|
||||||
|
|||||||
@ -67,8 +67,6 @@ public class WxPaymentController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IXhpcRefundOrderService iXhpcRefundOrderService;
|
private IXhpcRefundOrderService iXhpcRefundOrderService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private Environment environment;
|
|
||||||
@Autowired
|
|
||||||
private PowerPileService powerPileService;
|
private PowerPileService powerPileService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private TokenService tokenService;
|
private TokenService tokenService;
|
||||||
|
|||||||
@ -20,10 +20,7 @@ import org.springframework.stereotype.Service;
|
|||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author yuyang
|
* @author yuyang
|
||||||
@ -176,6 +173,7 @@ public class XhpcCustomersServiceImpl extends BaseService implements IXhpcCustom
|
|||||||
}else{
|
}else{
|
||||||
return AjaxResult.error("请重新登录");
|
return AjaxResult.error("请重新登录");
|
||||||
}
|
}
|
||||||
|
xhpcCustomersPersonnel.setCreateTime(new Date());
|
||||||
xhpcCustomersMapper.addCustomersPersonnel(xhpcCustomersPersonnel);
|
xhpcCustomersMapper.addCustomersPersonnel(xhpcCustomersPersonnel);
|
||||||
if(rechargeMoney !=null){
|
if(rechargeMoney !=null){
|
||||||
//增加一条充值记录
|
//增加一条充值记录
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user