记得上下班打卡 | git大法好,push需谨慎

Commit afbf1e22 authored by 周焕's avatar 周焕

Merge branch 'pre' into 'master'

判断票种类型

See merge request !40
parents a026d38e 84d9599d
...@@ -118,6 +118,13 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ ...@@ -118,6 +118,13 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
} }
} }
if (payOrderParam.getIsExpress().equals(1) && ticketData.getIsExpress().equals(0)) {
return ResponseDto.failure("票种类型错误");//参数错误
} else if (payOrderParam.getIsElectronic().equals(1) && ticketData.getIsElectronic().equals(0)) {
return ResponseDto.failure("票种类型错误");//参数错误
}
if (performanceData == null || ticketTimesData == null || ticketData == null) { if (performanceData == null || ticketTimesData == null || ticketData == null) {
return ResponseDto.failure(ErrorMapping.get("20004"));//参数错误 return ResponseDto.failure(ErrorMapping.get("20004"));//参数错误
} }
...@@ -489,10 +496,10 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ ...@@ -489,10 +496,10 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
} }
//是否免费 //是否免费
boolean isFree=false; boolean isFree = false;
PayResultVo payResultVo; PayResultVo payResultVo;
if(orderTickets.getPriceActual().compareTo(BigDecimal.valueOf(0))>0){ if (orderTickets.getPriceActual().compareTo(BigDecimal.valueOf(0)) > 0) {
// 调用支付 // 调用支付
String time1 = DateUtil.format(DateUtil.Formatter.yyyyMMddHHmmss.parse(ticketData.getUseStart()), DateUtil.Formatter.MM_dd_zh); String time1 = DateUtil.format(DateUtil.Formatter.yyyyMMddHHmmss.parse(ticketData.getUseStart()), DateUtil.Formatter.MM_dd_zh);
String time2 = DateUtil.format(DateUtil.Formatter.yyyyMMddHHmmss.parse(ticketData.getUseEnd()), DateUtil.Formatter.MM_dd_zh); String time2 = DateUtil.format(DateUtil.Formatter.yyyyMMddHHmmss.parse(ticketData.getUseEnd()), DateUtil.Formatter.MM_dd_zh);
...@@ -529,8 +536,8 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ ...@@ -529,8 +536,8 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
payResultVo.getData().setShowUrl(payOrderParam.getShowUrl() + orderTicketId); payResultVo.getData().setShowUrl(payOrderParam.getShowUrl() + orderTicketId);
payResultVo.getData().setReturnUrl(payOrderParam.getReturnUrl() + orderTicketId); payResultVo.getData().setReturnUrl(payOrderParam.getReturnUrl() + orderTicketId);
} }
}else{ } else {
isFree=true; isFree = true;
orderTickets.setPayType("FREE"); orderTickets.setPayType("FREE");
orderTickets.setPayCode("FREE_PAY_CODE"); orderTickets.setPayCode("FREE_PAY_CODE");
payResultVo = PayResultVo.getNew(); payResultVo = PayResultVo.getNew();
...@@ -573,10 +580,10 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ ...@@ -573,10 +580,10 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
currentTime = System.currentTimeMillis() - currentTime; currentTime = System.currentTimeMillis() - currentTime;
log.debug("MQ 发送 -> time:" + (currentTime) + "毫秒"); log.debug("MQ 发送 -> time:" + (currentTime) + "毫秒");
log.info(UserPathDto.setData("下单(唤起支付)", payOrderParam, payResultVo.getData())); log.info(UserPathDto.setData("下单(唤起支付)", payOrderParam, payResultVo.getData()));
if(isFree){ if (isFree) {
SyncOrderParam syncOrderParam = SyncOrderParam.getNew(); SyncOrderParam syncOrderParam = SyncOrderParam.getNew();
syncOrderParam.setOrderCode(orderTickets.getOrderCode()); syncOrderParam.setOrderCode(orderTickets.getOrderCode());
syncOrderParam.setPaymentAt(DateUtil.format(LocalDateTime.now(),DateUtil.Formatter.yyyyMMddHHmmss)); syncOrderParam.setPaymentAt(DateUtil.format(LocalDateTime.now(), DateUtil.Formatter.yyyyMMddHHmmss));
syncOrderParam.setCode(orderTickets.getPayCode()); syncOrderParam.setCode(orderTickets.getPayCode());
syncOrderParam.setPrice(orderTickets.getPrice()); syncOrderParam.setPrice(orderTickets.getPrice());
syncOrderParam.setPaymentId("FREE_PAYMENT_ID"); syncOrderParam.setPaymentId("FREE_PAYMENT_ID");
...@@ -584,7 +591,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ ...@@ -584,7 +591,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
syncOrderParam.setStatus(1); syncOrderParam.setStatus(1);
syncOrder(syncOrderParam); syncOrder(syncOrderParam);
return ResponseDto.success(payResultVo.getData()); return ResponseDto.success(payResultVo.getData());
}else { } else {
return ResponseDto.success(payResultVo.getData()); return ResponseDto.success(payResultVo.getData());
} }
} }
...@@ -768,7 +775,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ ...@@ -768,7 +775,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
orderRefundsCallbackService.refundApply(orderTicketData.getOrderTicketsId(), syncOrderParam.getPaymentId(), syncOrderParam.getPaymentType()); orderRefundsCallbackService.refundApply(orderTicketData.getOrderTicketsId(), syncOrderParam.getPaymentId(), syncOrderParam.getPaymentType());
} else if ((orderTicketData.getStatus() == 3 || orderTicketData.getStatus() == 4) && syncOrderParam.getStatus().equals(1)) { } else if ((orderTicketData.getStatus() == 3 || orderTicketData.getStatus() == 4) && syncOrderParam.getStatus().equals(1)) {
log.error("订单号为 {} 的订单正在退款 或者已退款", syncOrderParam.getOrderCode()); log.error("订单号为 {} 的订单正在退款 或者已退款", syncOrderParam.getOrderCode());
} else if(syncOrderParam.getStatus().equals(1)){ } else if (syncOrderParam.getStatus().equals(1)) {
log.error("订单号为 {} 的订单正常流程", syncOrderParam.getOrderCode()); log.error("订单号为 {} 的订单正常流程", syncOrderParam.getOrderCode());
orderTickets.setOrderTicketsId(orderTicketData.getOrderTicketsId()); orderTickets.setOrderTicketsId(orderTicketData.getOrderTicketsId());
orderTickets.setPaymentType(syncOrderParam.getPaymentType()); orderTickets.setPaymentType(syncOrderParam.getPaymentType());
...@@ -907,9 +914,9 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ ...@@ -907,9 +914,9 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
} }
public boolean checkAgent(String agentId, KylinTicketVo ticketData) { public boolean checkAgent(String agentId, KylinTicketVo ticketData) {
if(agentId.equals(0)){ if (agentId.equals(0)) {
return true; return true;
}else{ } else {
boolean isAgent = ticketData.getIsAgent() == 1; boolean isAgent = ticketData.getIsAgent() == 1;
if (isAgent) { if (isAgent) {
return true; return true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment