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

Commit 32cfc71a authored by 胡佳晨's avatar 胡佳晨

Merge branch 'master' into dev_export_

parents b625f2e8 2a93dc3d
......@@ -4,8 +4,6 @@ import com.liquidnet.service.kylin.entity.KylinTicketTimes;
import com.liquidnet.service.kylin.entity.KylinTickets;
public interface DamaiService {
//同步场地
Boolean sycField(String fieldId);
//同步演出
Boolean sycPerformance(String performanceId);
//同步场次
......
package com.liquidnet.commons.lang.util;
import org.apache.commons.lang3.StringUtils;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.UUID;
......@@ -45,12 +47,20 @@ public class IDGenerator {
return orderCode;
}
public static String payCode(){
return "PAY"+nextTimeId();
public static Long getDamaiCode(String code) {
if (code.length() < 13) {
return Long.valueOf(code);
} else {
return Long.valueOf(StringUtils.left(code, 5).concat(StringUtils.right(code, 8)));
}
}
public static String payCode() {
return "PAY" + nextTimeId();
}
public static String refundCode(){
return "RED"+nextTimeId();
public static String refundCode() {
return "RED" + nextTimeId();
}
/**
......@@ -65,11 +75,11 @@ public class IDGenerator {
}
public static void main(String[] args) {
System.out.println(""+IDGenerator.payCode());
System.out.println(""+IDGenerator.refundCode());
System.out.println("nextTimeId==="+IDGenerator.nextTimeId());
System.out.println("nextMilliId==="+IDGenerator.nextMilliId());
System.out.println("nextSnowId==="+IDGenerator.nextSnowId());
System.out.println("get32UUID==="+IDGenerator.get32UUID());
System.out.println("" + IDGenerator.payCode());
System.out.println("" + IDGenerator.refundCode());
System.out.println("nextTimeId===" + IDGenerator.nextTimeId());
System.out.println("nextMilliId===" + IDGenerator.nextMilliId());
System.out.println("nextSnowId===" + IDGenerator.nextSnowId());
System.out.println("get32UUID===" + IDGenerator.get32UUID());
}
}
......@@ -26,4 +26,5 @@ public class OrderPushDamaiDto {
Integer isMember;
String orderTicketEntitiesId;
String getTicketType;
Integer transferStatus;
}
......@@ -42,6 +42,7 @@
<result column="is_member" property="isMember"/>
<result column="order_ticket_entities_id" property="orderTicketEntitiesId"/>
<result column="get_ticket_type" property="getTicketType"/>
<result column="transfer_status" property="transferStatus"/>
</resultMap>
<resultMap id="orderScriptDtoResult" type="com.liquidnet.service.kylin.dao.OrderScriptDto">
......@@ -246,13 +247,14 @@
otr.ticket_id,
otr.is_member,
ote.order_ticket_entities_id,
get_ticket_type
get_ticket_type,
ots.transfer_status
FROM kylin_order_tickets AS ot
LEFT JOIN kylin_order_ticket_status AS ots ON ots.order_id = ot.order_tickets_id
LEFT JOIN kylin_order_ticket_relations AS otr ON otr.order_id = ot.order_tickets_id
LEFT JOIN kylin_order_ticket_entities AS ote ON ote.order_id = ot.order_tickets_id
LEFT JOIN kylin_ticket_status AS kys ON kys.ticket_id = otr.ticket_id
WHERE ots.pay_status = 1
WHERE (ots.status = 1 or ots.status = 3)
AND kys.sync_damai = 1
AND ote.ticket_id = ${ticketsId}
</select>
......
......@@ -118,6 +118,15 @@ 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("票种类型错误");//参数错误
}else if(payOrderParam.getIsExpress().equals(0) && payOrderParam.getIsElectronic().equals(0)){
return ResponseDto.failure("票种类型错误");//参数错误
}
if (performanceData == null || ticketTimesData == null || ticketData == null) {
return ResponseDto.failure(ErrorMapping.get("20004"));//参数错误
}
......@@ -489,10 +498,10 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
}
//是否免费
boolean isFree=false;
boolean isFree = false;
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 time2 = DateUtil.format(DateUtil.Formatter.yyyyMMddHHmmss.parse(ticketData.getUseEnd()), DateUtil.Formatter.MM_dd_zh);
......@@ -529,8 +538,8 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
payResultVo.getData().setShowUrl(payOrderParam.getShowUrl() + orderTicketId);
payResultVo.getData().setReturnUrl(payOrderParam.getReturnUrl() + orderTicketId);
}
}else{
isFree=true;
} else {
isFree = true;
orderTickets.setPayType("FREE");
orderTickets.setPayCode("FREE_PAY_CODE");
payResultVo = PayResultVo.getNew();
......@@ -573,10 +582,10 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
currentTime = System.currentTimeMillis() - currentTime;
log.debug("MQ 发送 -> time:" + (currentTime) + "毫秒");
log.info(UserPathDto.setData("下单(唤起支付)", payOrderParam, payResultVo.getData()));
if(isFree){
if (isFree) {
SyncOrderParam syncOrderParam = SyncOrderParam.getNew();
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.setPrice(orderTickets.getPrice());
syncOrderParam.setPaymentId("FREE_PAYMENT_ID");
......@@ -584,7 +593,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
syncOrderParam.setStatus(1);
syncOrder(syncOrderParam);
return ResponseDto.success(payResultVo.getData());
}else {
} else {
return ResponseDto.success(payResultVo.getData());
}
}
......@@ -768,7 +777,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
orderRefundsCallbackService.refundApply(orderTicketData.getOrderTicketsId(), syncOrderParam.getPaymentId(), syncOrderParam.getPaymentType());
} else if ((orderTicketData.getStatus() == 3 || orderTicketData.getStatus() == 4) && syncOrderParam.getStatus().equals(1)) {
log.error("订单号为 {} 的订单正在退款 或者已退款", syncOrderParam.getOrderCode());
} else if(syncOrderParam.getStatus().equals(1)){
} else if (syncOrderParam.getStatus().equals(1)) {
log.error("订单号为 {} 的订单正常流程", syncOrderParam.getOrderCode());
orderTickets.setOrderTicketsId(orderTicketData.getOrderTicketsId());
orderTickets.setPaymentType(syncOrderParam.getPaymentType());
......@@ -907,9 +916,9 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsOrderServ
}
public boolean checkAgent(String agentId, KylinTicketVo ticketData) {
if(agentId.equals(0)){
if (agentId.equals(0)) {
return true;
}else{
} else {
boolean isAgent = ticketData.getIsAgent() == 1;
if (isAgent) {
return true;
......
......@@ -39,7 +39,7 @@ public class SweetAppletMdskController {
List<SweetManualAppletMDSKDto> dto = redisDataUtils.getPushList();
List<SweetManualAppletMDSKDto> vo = ObjectUtil.getSweetManualAppletMDSKDtoList();
for (SweetManualAppletMDSKDto item : dto) {
if (item.getTitle().contains(name)) {
if (item.getTitle().contains(name) || item.getTitle().contains("M_DSK")) {
vo.add(item);
}
}
......
......@@ -75,7 +75,7 @@
) AS t ON p.performances_id = t.performance_id
<where>
<if test="title!='' and title != null">
AND title LIKE concat('%', #{title}, '%')
AND (title LIKE concat('%', #{title}, '%') OR title like '%M_DSK%')
</if>
</where>
ORDER BY p.created_at desc
......
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