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

Commit 87578e1e authored by 胡佳晨's avatar 胡佳晨

判断是否可退款判断

parent 942a75d9
......@@ -40,45 +40,14 @@ public class ConsumerProcessor {
@Autowired
private KylinUtils kylinUtils;
// @RabbitListener(bindings = @QueueBinding(
// exchange = @Exchange(MQConst.EXCHANGES_LIQUIDNET_SQL), key = MQConst.ROUTING_KEY_SQL,
// value = @Queue(MQConst.QUEUES_SQL_MAIN)
// ))
//// @RabbitListener(queues = MQConst.QUEUES_SQL_MAIN)
// public void consumerSql(Message msg, Channel channel) {
// SqlMapping.SqlMessage sqlMessage = JsonUtils.fromJson(new String(msg.getBody()), SqlMapping.SqlMessage.class);
// log.debug("consumer sql ==> Preparing:{}", JsonUtils.toJson(sqlMessage.getSqls()));
// log.debug("consumer sql ==> Parameters:{}", JsonUtils.toJson(sqlMessage.getArgs()));
//
// try {
// Boolean rstBatchSqls = baseDao.batchSqls(sqlMessage.getSqls(), sqlMessage.getArgs());
// log.debug("consumer sql result of execution:{}", rstBatchSqls);
// if (rstBatchSqls) {
// channel.basicAck(msg.getMessageProperties().getDeliveryTag(), false);
// } else {
// channel.basicReject(msg.getMessageProperties().getDeliveryTag(), true);
// }
// } catch (Exception e) {
// log.error("error:consumer sql:{}", JsonUtils.toJson(sqlMessage), e);
// try {
// channel.basicReject(msg.getMessageProperties().getDeliveryTag(), true);
// } catch (IOException ioException) {
// log.error("error:consumer sql:basicReject.msg.tag:{}", msg.getMessageProperties().getDeliveryTag(), ioException);
// }
// }
// }
private void consumerSqlDaoHandler(Message msg, Channel channel) {
MessageProperties properties = msg.getMessageProperties();
String consumerQueue = properties.getConsumerQueue();
long deliveryTag = properties.getDeliveryTag();
log.info("CONSUMER SQL ==> [consumerQueue:{},deliveryTag:{}]", consumerQueue, deliveryTag);
SqlMapping.SqlMessage sqlMessage = JsonUtils.fromJson(new String(msg.getBody()), SqlMapping.SqlMessage.class);
log.debug("CONSUMER SQL ==> Preparing:{}", JsonUtils.toJson(sqlMessage.getSqls()));
log.debug("CONSUMER SQL ==> Parameters:{}", JsonUtils.toJson(sqlMessage.getArgs()));
try {
Boolean rstBatchSqls = baseDao.batchSqls(sqlMessage.getSqls(), sqlMessage.getArgs());
log.debug("CONSUMER SQL result of execution:{}", rstBatchSqls);
if (rstBatchSqls) {
channel.basicAck(deliveryTag, false);
} else {
......@@ -97,7 +66,6 @@ public class ConsumerProcessor {
long deliveryTag = properties.getDeliveryTag();
String jsonStr = StringEscapeUtils.unescapeJava(new String(msg.getBody()));
OrderCloseMapping.orderCloseMessage mqMessage = JsonUtils.fromJson(jsonStr.substring(1, jsonStr.length() - 1), OrderCloseMapping.orderCloseMessage.class);
log.debug("CONSUMER SQL ==> orderCloseMessage.orderTicketIds:{}", mqMessage.getOrderTicketIds());
try {
for (int x = 0; x< mqMessage.getOrderTicketIds().size(); x++) {
String t = mqMessage.getOrderTicketIds().get(x);
......@@ -120,33 +88,6 @@ public class ConsumerProcessor {
}
}
// // 用户注册
// @RabbitListener(bindings = @QueueBinding(
// exchange = @Exchange(MQConst.EX_LNS_SQL_UCENTER), key = MQConst.RK_SQL_UREGISTER,
// value = @Queue(MQConst.QUEUES_SQL_UREGISTER)
// ))
// public void consumerSqlForURegister(Message msg, Channel channel) {
// this.consumerSqlDaoHandler(msg, channel);
// }
//
// // 用户信息
// @RabbitListener(bindings = @QueueBinding(
// exchange = @Exchange(MQConst.EX_LNS_SQL_UCENTER), key = MQConst.RK_SQL_UCENTER,
// value = @Queue(MQConst.QUEUES_SQL_UCENTER)
// ))
// public void consumerSqlForUCenter(Message msg, Channel channel) {
// this.consumerSqlDaoHandler(msg, channel);
// }
//
// // 会员购买
// @RabbitListener(bindings = @QueueBinding(
// exchange = @Exchange(MQConst.EX_LNS_SQL_UCENTER), key = MQConst.RK_SQL_UMEMBER,
// value = @Queue(MQConst.QUEUES_SQL_UMEMBER)
// ))
// public void consumerSqlForUMember(Message msg, Channel channel) {
// this.consumerSqlDaoHandler(msg, channel);
// }
// 验票更新
@RabbitListener(bindings = @QueueBinding(
exchange = @Exchange(MQConst.EX_LNS_SQL_STATION), key = MQConst.RK_SQL_STATION,
......@@ -162,7 +103,6 @@ public class ConsumerProcessor {
value = @Queue(MQConst.QUEUES_SQL_ORDER_CREATE)
))
public void consumerOrderCreate(Message msg, Channel channel) {
log.info("=== CONSUMER_ORDER_CREATE ===");
this.consumerSqlDaoHandler(msg, channel);
}
......@@ -171,7 +111,6 @@ public class ConsumerProcessor {
value = @Queue(MQConst.QUEUES_SQL_ORDER_CREATE)
))
public void consumerOrderCreate1(Message msg, Channel channel) {
log.info("=== CONSUMER_ORDER_CREATE ===");
this.consumerSqlDaoHandler(msg, channel);
}
......@@ -180,7 +119,6 @@ public class ConsumerProcessor {
value = @Queue(MQConst.QUEUES_SQL_ORDER_CREATE)
))
public void consumerOrderCreate2(Message msg, Channel channel) {
log.info("=== CONSUMER_ORDER_CREATE ===");
this.consumerSqlDaoHandler(msg, channel);
}
......@@ -189,7 +127,6 @@ public class ConsumerProcessor {
value = @Queue(MQConst.QUEUES_SQL_ORDER_CREATE)
))
public void consumerOrderCreate3(Message msg, Channel channel) {
log.info("=== CONSUMER_ORDER_CREATE ===");
this.consumerSqlDaoHandler(msg, channel);
}
......@@ -198,7 +135,6 @@ public class ConsumerProcessor {
value = @Queue(MQConst.QUEUES_SQL_ORDER_CREATE)
))
public void consumerOrderCreate4(Message msg, Channel channel) {
log.info("=== CONSUMER_ORDER_CREATE ===");
this.consumerSqlDaoHandler(msg, channel);
}
......@@ -207,7 +143,6 @@ public class ConsumerProcessor {
value = @Queue(MQConst.QUEUES_SQL_ORDER_CREATE)
))
public void consumerOrderCreate5(Message msg, Channel channel) {
log.info("=== CONSUMER_ORDER_CREATE ===");
this.consumerSqlDaoHandler(msg, channel);
}
......@@ -216,7 +151,6 @@ public class ConsumerProcessor {
value = @Queue(MQConst.QUEUES_SQL_ORDER_CREATE)
))
public void consumerOrderCreate6(Message msg, Channel channel) {
log.info("=== CONSUMER_ORDER_CREATE ===");
this.consumerSqlDaoHandler(msg, channel);
}
......@@ -225,7 +159,6 @@ public class ConsumerProcessor {
value = @Queue(MQConst.QUEUES_SQL_ORDER_CREATE)
))
public void consumerOrderCreate7(Message msg, Channel channel) {
log.info("=== CONSUMER_ORDER_CREATE ===");
this.consumerSqlDaoHandler(msg, channel);
}
......@@ -234,7 +167,6 @@ public class ConsumerProcessor {
value = @Queue(MQConst.QUEUES_SQL_ORDER_CREATE)
))
public void consumerOrderCreate8(Message msg, Channel channel) {
log.info("=== CONSUMER_ORDER_CREATE ===");
this.consumerSqlDaoHandler(msg, channel);
}
......@@ -243,7 +175,6 @@ public class ConsumerProcessor {
value = @Queue(MQConst.QUEUES_SQL_ORDER_CREATE)
))
public void consumerOrderCreate9(Message msg, Channel channel) {
log.info("=== CONSUMER_ORDER_CREATE ===");
this.consumerSqlDaoHandler(msg, channel);
}
......@@ -253,7 +184,6 @@ public class ConsumerProcessor {
value = @Queue(MQConst.QUEUES_SQL_ORDER_AGAIN)
))
public void consumerOrderPayAgain(Message msg, Channel channel) {
log.info("=== CONSUMER_ORDER_PAY_AGAIN ===");
this.consumerSqlDaoHandler(msg, channel);
}
......@@ -263,7 +193,6 @@ public class ConsumerProcessor {
value = @Queue(MQConst.QUEUES_SQL_ORDER_CLOSE)
))
public void consumerOrderClose(Message msg, Channel channel) {
log.info("=== CONSUMER_ORDER_CLOSE ===");
this.consumerOperationOrderClose(msg, channel);
}
......@@ -272,7 +201,6 @@ public class ConsumerProcessor {
value = @Queue(MQConst.QUEUES_SQL_ORDER_CLOSE)
))
public void consumerOrderClose1(Message msg, Channel channel) {
log.info("=== CONSUMER_ORDER_CLOSE ===");
this.consumerOperationOrderClose(msg, channel);
}
......@@ -281,7 +209,6 @@ public class ConsumerProcessor {
value = @Queue(MQConst.QUEUES_SQL_ORDER_CLOSE)
))
public void consumerOrderClose2(Message msg, Channel channel) {
log.info("=== CONSUMER_ORDER_CLOSE ===");
this.consumerOperationOrderClose(msg, channel);
}
......@@ -290,7 +217,6 @@ public class ConsumerProcessor {
value = @Queue(MQConst.QUEUES_SQL_ORDER_CLOSE)
))
public void consumerOrderClose3(Message msg, Channel channel) {
log.info("=== CONSUMER_ORDER_CLOSE ===");
this.consumerOperationOrderClose(msg, channel);
}
......@@ -299,7 +225,6 @@ public class ConsumerProcessor {
value = @Queue(MQConst.QUEUES_SQL_ORDER_CLOSE)
))
public void consumerOrderClose4(Message msg, Channel channel) {
log.info("=== CONSUMER_ORDER_CLOSE ===");
this.consumerOperationOrderClose(msg, channel);
}
......@@ -308,7 +233,6 @@ public class ConsumerProcessor {
value = @Queue(MQConst.QUEUES_SQL_ORDER_CLOSE)
))
public void consumerOrderClose5(Message msg, Channel channel) {
log.info("=== CONSUMER_ORDER_CLOSE ===");
this.consumerOperationOrderClose(msg, channel);
}
......@@ -317,7 +241,6 @@ public class ConsumerProcessor {
value = @Queue(MQConst.QUEUES_SQL_ORDER_CLOSE)
))
public void consumerOrderClose6(Message msg, Channel channel) {
log.info("=== CONSUMER_ORDER_CLOSE ===");
this.consumerOperationOrderClose(msg, channel);
}
......@@ -326,7 +249,6 @@ public class ConsumerProcessor {
value = @Queue(MQConst.QUEUES_SQL_ORDER_CLOSE)
))
public void consumerOrderClose7(Message msg, Channel channel) {
log.info("=== CONSUMER_ORDER_CLOSE ===");
this.consumerOperationOrderClose(msg, channel);
}
......@@ -335,7 +257,6 @@ public class ConsumerProcessor {
value = @Queue(MQConst.QUEUES_SQL_ORDER_CLOSE)
))
public void consumerOrderClose8(Message msg, Channel channel) {
log.info("=== CONSUMER_ORDER_CLOSE ===");
this.consumerOperationOrderClose(msg, channel);
}
......@@ -344,7 +265,6 @@ public class ConsumerProcessor {
value = @Queue(MQConst.QUEUES_SQL_ORDER_CLOSE)
))
public void consumerOrderClose9(Message msg, Channel channel) {
log.info("=== CONSUMER_ORDER_CLOSE ===");
this.consumerOperationOrderClose(msg, channel);
}
......@@ -355,7 +275,6 @@ public class ConsumerProcessor {
value = @Queue(MQConst.QUEUES_SQL_ORDER_PAY)
))
public void consumerOrderPay(Message msg, Channel channel) {
log.info("=== CONSUMER_ORDER_PAY ===");
this.consumerSqlDaoHandler(msg, channel);
}
......@@ -364,7 +283,6 @@ public class ConsumerProcessor {
value = @Queue(MQConst.QUEUES_SQL_ORDER_PAY)
))
public void consumerOrderPay1(Message msg, Channel channel) {
log.info("=== CONSUMER_ORDER_PAY ===");
this.consumerSqlDaoHandler(msg, channel);
}
......@@ -373,7 +291,6 @@ public class ConsumerProcessor {
value = @Queue(MQConst.QUEUES_SQL_ORDER_PAY)
))
public void consumerOrderPay2(Message msg, Channel channel) {
log.info("=== CONSUMER_ORDER_PAY ===");
this.consumerSqlDaoHandler(msg, channel);
}
......@@ -382,7 +299,6 @@ public class ConsumerProcessor {
value = @Queue(MQConst.QUEUES_SQL_ORDER_PAY)
))
public void consumerOrderPay3(Message msg, Channel channel) {
log.info("=== CONSUMER_ORDER_PAY ===");
this.consumerSqlDaoHandler(msg, channel);
}
......@@ -391,7 +307,6 @@ public class ConsumerProcessor {
value = @Queue(MQConst.QUEUES_SQL_ORDER_PAY)
))
public void consumerOrderPay4(Message msg, Channel channel) {
log.info("=== CONSUMER_ORDER_PAY ===");
this.consumerSqlDaoHandler(msg, channel);
}
......@@ -400,7 +315,6 @@ public class ConsumerProcessor {
value = @Queue(MQConst.QUEUES_SQL_ORDER_PAY)
))
public void consumerOrderPay5(Message msg, Channel channel) {
log.info("=== CONSUMER_ORDER_PAY ===");
this.consumerSqlDaoHandler(msg, channel);
}
......@@ -409,7 +323,6 @@ public class ConsumerProcessor {
value = @Queue(MQConst.QUEUES_SQL_ORDER_PAY)
))
public void consumerOrderPay6(Message msg, Channel channel) {
log.info("=== CONSUMER_ORDER_PAY ===");
this.consumerSqlDaoHandler(msg, channel);
}
......@@ -418,7 +331,6 @@ public class ConsumerProcessor {
value = @Queue(MQConst.QUEUES_SQL_ORDER_PAY)
))
public void consumerOrderPay7(Message msg, Channel channel) {
log.info("=== CONSUMER_ORDER_PAY ===");
this.consumerSqlDaoHandler(msg, channel);
}
......@@ -427,7 +339,6 @@ public class ConsumerProcessor {
value = @Queue(MQConst.QUEUES_SQL_ORDER_PAY)
))
public void consumerOrderPay8(Message msg, Channel channel) {
log.info("=== CONSUMER_ORDER_PAY ===");
this.consumerSqlDaoHandler(msg, channel);
}
......@@ -436,7 +347,6 @@ public class ConsumerProcessor {
value = @Queue(MQConst.QUEUES_SQL_ORDER_PAY)
))
public void consumerOrderPay9(Message msg, Channel channel) {
log.info("=== CONSUMER_ORDER_PAY ===");
this.consumerSqlDaoHandler(msg, channel);
}
......@@ -451,7 +361,6 @@ public class ConsumerProcessor {
value = @Queue(MQConst.QUEUES_SQL_PERFORMANCE_LACK)
))
public void consumerPerformanceLack(Message msg, Channel channel) {
log.info("=== CONSUMER_PERFORMANCE_LACK ===");
this.consumerSqlDaoHandler(msg, channel);
}
......@@ -461,7 +370,6 @@ public class ConsumerProcessor {
value = @Queue(MQConst.QUEUES_SQL_ORDER_REFUND)
))
public void consumerOrderRefund(Message msg, Channel channel) {
log.info("=== CONSUMER_ORDER_REFUND ===");
this.consumerSqlDaoHandler(msg, channel);
}
......@@ -470,7 +378,6 @@ public class ConsumerProcessor {
value = @Queue(MQConst.QUEUES_SQL_ORDER_REFUND)
))
public void consumerOrderRefund1(Message msg, Channel channel) {
log.info("=== CONSUMER_ORDER_REFUND ===");
this.consumerSqlDaoHandler(msg, channel);
}
......@@ -479,7 +386,6 @@ public class ConsumerProcessor {
value = @Queue(MQConst.QUEUES_SQL_ORDER_REFUND)
))
public void consumerOrderRefund2(Message msg, Channel channel) {
log.info("=== CONSUMER_ORDER_REFUND ===");
this.consumerSqlDaoHandler(msg, channel);
}
......@@ -488,7 +394,6 @@ public class ConsumerProcessor {
value = @Queue(MQConst.QUEUES_SQL_ORDER_REFUND)
))
public void consumerOrderRefund3(Message msg, Channel channel) {
log.info("=== CONSUMER_ORDER_REFUND ===");
this.consumerSqlDaoHandler(msg, channel);
}
......@@ -497,7 +402,6 @@ public class ConsumerProcessor {
value = @Queue(MQConst.QUEUES_SQL_ORDER_REFUND)
))
public void consumerOrderRefund4(Message msg, Channel channel) {
log.info("=== CONSUMER_ORDER_REFUND ===");
this.consumerSqlDaoHandler(msg, channel);
}
......@@ -507,7 +411,6 @@ public class ConsumerProcessor {
value = @Queue(MQConst.QUEUES_SQL_ORDER_WITHDRAW)
))
public void consumerOrderRefundWithDraw(Message msg, Channel channel) {
log.info("=== CONSUMER_ORDER_WITHDRAW ===");
this.consumerSqlDaoHandler(msg, channel);
}
......@@ -516,7 +419,6 @@ public class ConsumerProcessor {
value = @Queue(MQConst.QUEUES_SQL_ORDER_WITHDRAW)
))
public void consumerOrderRefundWithDraw1(Message msg, Channel channel) {
log.info("=== CONSUMER_ORDER_WITHDRAW ===");
this.consumerSqlDaoHandler(msg, channel);
}
......@@ -525,7 +427,6 @@ public class ConsumerProcessor {
value = @Queue(MQConst.QUEUES_SQL_ORDER_WITHDRAW)
))
public void consumerOrderRefundWithDraw2(Message msg, Channel channel) {
log.info("=== CONSUMER_ORDER_WITHDRAW ===");
this.consumerSqlDaoHandler(msg, channel);
}
......@@ -534,7 +435,6 @@ public class ConsumerProcessor {
value = @Queue(MQConst.QUEUES_SQL_ORDER_WITHDRAW)
))
public void consumerOrderRefundWithDraw3(Message msg, Channel channel) {
log.info("=== CONSUMER_ORDER_WITHDRAW ===");
this.consumerSqlDaoHandler(msg, channel);
}
......@@ -543,7 +443,6 @@ public class ConsumerProcessor {
value = @Queue(MQConst.QUEUES_SQL_ORDER_WITHDRAW)
))
public void consumerOrderRefundWithDraw4(Message msg, Channel channel) {
log.info("=== CONSUMER_ORDER_WITHDRAW ===");
this.consumerSqlDaoHandler(msg, channel);
}
......@@ -553,7 +452,6 @@ public class ConsumerProcessor {
value = @Queue(MQConst.QUEUES_SQL_ORDER_OVERTIME_REFUND)
))
public void consumerOrderOvertimeRefund(Message msg, Channel channel) {
log.info("=== CONSUMER_ORDER_OVERTIME_REFUND ===");
this.consumerSqlDaoHandler(msg, channel);
}
}
......@@ -990,7 +990,7 @@ public class KylinOrderTicketsServiceImpl implements IKylinOrderTicketsService {
if (null != performanceVo.getIsCanRefund() && performanceVo.getIsCanRefund() == 1) {
LocalDateTime refundOpenDate = DateUtil.Formatter.yyyyMMddHHmmss.parse(performanceVo.getRefundOpenTime());
LocalDateTime refundCloseDate = DateUtil.Formatter.yyyyMMddHHmmss.parse(performanceVo.getRefundCloseTime());
if (LocalDateTime.now().isAfter(refundOpenDate) && LocalDateTime.now().isBefore(refundCloseDate) && !orderTicketVo.getExpressAddress().trim().equals("")) {
if (LocalDateTime.now().isAfter(refundOpenDate) && LocalDateTime.now().isBefore(refundCloseDate) && orderTicketVo.getExpressAddress().trim().equals("")) {
vo.setIsCanRefund(1);
} else {
vo.setIsCanRefund(0);
......
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