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

Commit e8155be4 authored by 胡佳晨's avatar 胡佳晨

rabbitmq 修改 提交

parent 391f1919
...@@ -3,6 +3,7 @@ package com.liquidnet.service.kylin.dto.vo.mongo; ...@@ -3,6 +3,7 @@ package com.liquidnet.service.kylin.dto.vo.mongo;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.time.LocalDateTime;
@Data @Data
public class KylinOrderTicketEntitiesVo implements Serializable, Cloneable { public class KylinOrderTicketEntitiesVo implements Serializable, Cloneable {
...@@ -39,6 +40,7 @@ public class KylinOrderTicketEntitiesVo implements Serializable, Cloneable { ...@@ -39,6 +40,7 @@ public class KylinOrderTicketEntitiesVo implements Serializable, Cloneable {
private String checkedAt; private String checkedAt;
private String checkUserId; private String checkUserId;
private LocalDateTime changeDate;
private static final KylinOrderTicketEntitiesVo obj = new KylinOrderTicketEntitiesVo(); private static final KylinOrderTicketEntitiesVo obj = new KylinOrderTicketEntitiesVo();
......
...@@ -10,6 +10,7 @@ import org.springframework.beans.BeanUtils; ...@@ -10,6 +10,7 @@ import org.springframework.beans.BeanUtils;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List; import java.util.List;
@ApiModel(value = "KylinOrderTicketVo", description = "订单数据") @ApiModel(value = "KylinOrderTicketVo", description = "订单数据")
...@@ -98,6 +99,13 @@ public class KylinOrderTicketVo implements Serializable { ...@@ -98,6 +99,13 @@ public class KylinOrderTicketVo implements Serializable {
private String createdAt; private String createdAt;
private String updatedAt; private String updatedAt;
private LocalDateTime changeDate;
private Integer isTrueName;
private String noticeImage;
private Integer ticketType;
private String fieldName;
private List<KylinOrderTicketEntitiesVo> entitiesVoList; private List<KylinOrderTicketEntitiesVo> entitiesVoList;
public void setOrderTicket(KylinOrderTickets orderTicket) { public void setOrderTicket(KylinOrderTickets orderTicket) {
......
...@@ -11,7 +11,6 @@ import java.util.List; ...@@ -11,7 +11,6 @@ import java.util.List;
@Data @Data
public class OrderDetailsVo { public class OrderDetailsVo {
private KylinOrderTicketVo orderTicketVo; private KylinOrderTicketVo orderTicketVo;
private List<KylinOrderTicketEntitiesVo> orderTicketEntitiesVo;
private KylinPerformanceVo performanceVo; private KylinPerformanceVo performanceVo;
private String express_number; private String express_number;
private String express_company; private String express_company;
......
...@@ -36,6 +36,7 @@ public abstract class DateUtil { ...@@ -36,6 +36,7 @@ public abstract class DateUtil {
yyyyMMddHHmm("yyyy-MM-dd HH:mm"), yyyyMMddHHmm("yyyy-MM-dd HH:mm"),
yyyyMMddHHmmss("yyyy-MM-dd HH:mm:ss"), yyyyMMddHHmmss("yyyy-MM-dd HH:mm:ss"),
yyyyMMddHHmmssTrim("yyyyMMddHHmmss"), yyyyMMddHHmmssTrim("yyyyMMddHHmmss"),
yyyyMMddHHmmssSSS("yyyyMMddHHmmssSSS"),
ddHHmmssTrim("ddHHmmss"), ddHHmmssTrim("ddHHmmss"),
yyyy_MM_dd_zh("yyyy年MM月dd日"), yyyy_MM_dd_zh("yyyy年MM月dd日"),
MM_dd_zh("MM月dd日"), MM_dd_zh("MM月dd日"),
......
...@@ -129,9 +129,9 @@ public class KylinOrderTicketEntities implements Serializable { ...@@ -129,9 +129,9 @@ public class KylinOrderTicketEntities implements Serializable {
* *
* @return * @return
*/ */
public Object[] getSynOrderObject() { public Object[] getSynOrderObject(LocalDateTime updateTime,LocalDateTime createTime) {
return new Object[]{ return new Object[]{
isPayment, updatedAt, orderId isPayment, updatedAt, orderId,updateTime,createTime
}; };
} }
} }
...@@ -87,9 +87,9 @@ public class KylinOrderTicketStatus implements Serializable { ...@@ -87,9 +87,9 @@ public class KylinOrderTicketStatus implements Serializable {
* *
* @return * @return
*/ */
public Object[] getSynOrderObject() { public Object[] getSynOrderObject(LocalDateTime updateTime,LocalDateTime createTime) {
return new Object[]{ return new Object[]{
status, payStatus, updatedAt, orderId status, payStatus, updatedAt, orderId,updateTime,createTime
}; };
} }
...@@ -98,9 +98,9 @@ public class KylinOrderTicketStatus implements Serializable { ...@@ -98,9 +98,9 @@ public class KylinOrderTicketStatus implements Serializable {
* *
* @return * @return
*/ */
public Object[] getCloseOrderObject() { public Object[] getCloseOrderObject(LocalDateTime updateTime,LocalDateTime createTime) {
return new Object[]{ return new Object[]{
status, updatedAt, orderId status, updatedAt, orderId,updateTime,createTime
}; };
} }
} }
...@@ -212,9 +212,9 @@ public class KylinOrderTickets implements Serializable { ...@@ -212,9 +212,9 @@ public class KylinOrderTickets implements Serializable {
* *
* @return * @return
*/ */
public Object[] getPayAgainObject() { public Object[] getPayAgainObject(LocalDateTime updateTime,LocalDateTime createTime) {
return new Object[]{ return new Object[]{
orderType, updatedAt, orderCode, orderTicketsId orderType, updatedAt, orderCode, orderTicketsId,updateTime,createTime
}; };
} }
...@@ -223,9 +223,9 @@ public class KylinOrderTickets implements Serializable { ...@@ -223,9 +223,9 @@ public class KylinOrderTickets implements Serializable {
* *
* @return * @return
*/ */
public Object[] getSynOrderObject() { public Object[] getSynOrderObject(LocalDateTime updateTime,LocalDateTime createTime) {
return new Object[]{ return new Object[]{
paymentType, payCode, timePay, qrCode, updatedAt, orderTicketsId paymentType, payCode, timePay, qrCode, updatedAt, orderTicketsId,updateTime,createTime
}; };
} }
...@@ -234,9 +234,9 @@ public class KylinOrderTickets implements Serializable { ...@@ -234,9 +234,9 @@ public class KylinOrderTickets implements Serializable {
* *
* @return * @return
*/ */
public Object[] getCloseOrderObject() { public Object[] getCloseOrderObject(LocalDateTime updateTime,LocalDateTime createTime) {
return new Object[]{ return new Object[]{
updatedAt, orderTicketsId updatedAt, orderTicketsId,updateTime,createTime
}; };
} }
} }
...@@ -100,7 +100,12 @@ public class ConsumerProcessor { ...@@ -100,7 +100,12 @@ public class ConsumerProcessor {
channel.basicReject(msg.getMessageProperties().getDeliveryTag(), true); channel.basicReject(msg.getMessageProperties().getDeliveryTag(), true);
} }
} catch (Exception e) { } catch (Exception e) {
log.error("error:sqlMessage:{}", JsonUtils.toJson(sqlMessage), e); log.error("error:consumer sql2:{}", JsonUtils.toJson(sqlMessage), e);
try {
channel.basicReject(msg.getMessageProperties().getDeliveryTag(), true);
} catch (IOException ioException) {
log.error("error:consumer sql2:basicReject.msg.tag:{}", msg.getMessageProperties().getDeliveryTag(), ioException);
}
} }
} }
...@@ -121,7 +126,12 @@ public class ConsumerProcessor { ...@@ -121,7 +126,12 @@ public class ConsumerProcessor {
channel.basicReject(msg.getMessageProperties().getDeliveryTag(), true); channel.basicReject(msg.getMessageProperties().getDeliveryTag(), true);
} }
} catch (Exception e) { } catch (Exception e) {
log.error("error:sqlMessage:{}", JsonUtils.toJson(sqlMessage), e); log.error("error:consumer sql2:{}", JsonUtils.toJson(sqlMessage), e);
try {
channel.basicReject(msg.getMessageProperties().getDeliveryTag(), true);
} catch (IOException ioException) {
log.error("error:consumer sql2:basicReject.msg.tag:{}", msg.getMessageProperties().getDeliveryTag(), ioException);
}
} }
} }
...@@ -142,7 +152,12 @@ public class ConsumerProcessor { ...@@ -142,7 +152,12 @@ public class ConsumerProcessor {
channel.basicReject(msg.getMessageProperties().getDeliveryTag(), true); channel.basicReject(msg.getMessageProperties().getDeliveryTag(), true);
} }
} catch (Exception e) { } catch (Exception e) {
log.error("error:sqlMessage:{}", JsonUtils.toJson(sqlMessage), e); log.error("error:consumer sql2:{}", JsonUtils.toJson(sqlMessage), e);
try {
channel.basicReject(msg.getMessageProperties().getDeliveryTag(), true);
} catch (IOException ioException) {
log.error("error:consumer sql2:basicReject.msg.tag:{}", msg.getMessageProperties().getDeliveryTag(), ioException);
}
} }
} }
...@@ -163,7 +178,12 @@ public class ConsumerProcessor { ...@@ -163,7 +178,12 @@ public class ConsumerProcessor {
channel.basicReject(msg.getMessageProperties().getDeliveryTag(), true); channel.basicReject(msg.getMessageProperties().getDeliveryTag(), true);
} }
} catch (Exception e) { } catch (Exception e) {
log.error("error:sqlMessage:{}", JsonUtils.toJson(sqlMessage), e); log.error("error:consumer sql2:{}", JsonUtils.toJson(sqlMessage), e);
try {
channel.basicReject(msg.getMessageProperties().getDeliveryTag(), true);
} catch (IOException ioException) {
log.error("error:consumer sql2:basicReject.msg.tag:{}", msg.getMessageProperties().getDeliveryTag(), ioException);
}
} }
} }
...@@ -184,7 +204,12 @@ public class ConsumerProcessor { ...@@ -184,7 +204,12 @@ public class ConsumerProcessor {
channel.basicReject(msg.getMessageProperties().getDeliveryTag(), true); channel.basicReject(msg.getMessageProperties().getDeliveryTag(), true);
} }
} catch (Exception e) { } catch (Exception e) {
log.error("error:sqlMessage:{}", JsonUtils.toJson(sqlMessage), e); log.error("error:consumer sql2:{}", JsonUtils.toJson(sqlMessage), e);
try {
channel.basicReject(msg.getMessageProperties().getDeliveryTag(), true);
} catch (IOException ioException) {
log.error("error:consumer sql2:basicReject.msg.tag:{}", msg.getMessageProperties().getDeliveryTag(), ioException);
}
} }
} }
} }
...@@ -21,8 +21,8 @@ CREATE TABLE `kylin_banners` ...@@ -21,8 +21,8 @@ CREATE TABLE `kylin_banners`
`promotion_type` tinyint NOT NULL DEFAULT 1 COMMENT '推广类型 1全国 2省份', `promotion_type` tinyint NOT NULL DEFAULT 1 COMMENT '推广类型 1全国 2省份',
`banners_sort` int NOT NULL DEFAULT 0 COMMENT '排序 越大越靠前', `banners_sort` int NOT NULL DEFAULT 0 COMMENT '排序 越大越靠前',
`is_deleted` tinyint NOT NULL DEFAULT 1 COMMENT '是否删除 0已删除 1正常', `is_deleted` tinyint NOT NULL DEFAULT 1 COMMENT '是否删除 0已删除 1正常',
`created_at` datetime NULL DEFAULT NULL COMMENT '创建时间', `created_at` datetime(3) NULL DEFAULT NULL COMMENT '创建时间',
`updated_at` datetime NULL DEFAULT NULL COMMENT '修改时间', `updated_at` datetime(3) NULL DEFAULT NULL COMMENT '修改时间',
KEY `kylin_banners_banners_id_index` (`banners_id`), KEY `kylin_banners_banners_id_index` (`banners_id`),
KEY `kylin_banners_banners_name_index` (`banners_name`), KEY `kylin_banners_banners_name_index` (`banners_name`),
KEY `kylin_banners_banners_sort_index` (`banners_sort`), KEY `kylin_banners_banners_sort_index` (`banners_sort`),
...@@ -39,8 +39,8 @@ CREATE TABLE `kylin_banners_relations` ...@@ -39,8 +39,8 @@ CREATE TABLE `kylin_banners_relations`
`field_id` int NOT NULL DEFAULT 0 COMMENT '展示位置id/推广省份code', `field_id` int NOT NULL DEFAULT 0 COMMENT '展示位置id/推广省份code',
`field_name` varchar(255) NOT NULL DEFAULT '' COMMENT '省份名称', `field_name` varchar(255) NOT NULL DEFAULT '' COMMENT '省份名称',
`field_id_type` tinyint NOT NULL DEFAULT 1 COMMENT '关联字段类型 1展示位置(由接口提供) 2推广省份(由接口提供)', `field_id_type` tinyint NOT NULL DEFAULT 1 COMMENT '关联字段类型 1展示位置(由接口提供) 2推广省份(由接口提供)',
`created_at` datetime NULL DEFAULT NULL COMMENT '创建时间', `created_at` datetime(3) NULL DEFAULT NULL COMMENT '创建时间',
`updated_at` datetime NULL DEFAULT NULL COMMENT '修改时间', `updated_at` datetime(3) NULL DEFAULT NULL COMMENT '修改时间',
KEY `kylin_banners_relations_banners_relations_id_index` (`banners_relations_id`), KEY `kylin_banners_relations_banners_relations_id_index` (`banners_relations_id`),
KEY `kylin_banners_relations_banners_id_index` (`banners_id`), KEY `kylin_banners_relations_banners_id_index` (`banners_id`),
PRIMARY KEY (`mid`) PRIMARY KEY (`mid`)
...@@ -70,8 +70,8 @@ CREATE TABLE `kylin_fields` ...@@ -70,8 +70,8 @@ CREATE TABLE `kylin_fields`
`district_name` varchar(255) NOT NULL DEFAULT '' COMMENT '县名称', `district_name` varchar(255) NOT NULL DEFAULT '' COMMENT '县名称',
`refuse_message` varchar(255) NOT NULL DEFAULT '' COMMENT '拒绝理由', `refuse_message` varchar(255) NOT NULL DEFAULT '' COMMENT '拒绝理由',
`comment` varchar(255) NULL DEFAULT '' COMMENT 'comment', `comment` varchar(255) NULL DEFAULT '' COMMENT 'comment',
`created_at` datetime NULL DEFAULT NULL COMMENT '创建时间', `created_at` datetime(3) NULL DEFAULT NULL COMMENT '创建时间',
`updated_at` datetime NULL DEFAULT NULL COMMENT '修改时间', `updated_at` datetime(3) NULL DEFAULT NULL COMMENT '修改时间',
KEY `kylin_fields_uid_index` (`fields_id`), KEY `kylin_fields_uid_index` (`fields_id`),
PRIMARY KEY (`mid`) PRIMARY KEY (`mid`)
) ENGINE = InnoDB ) ENGINE = InnoDB
...@@ -87,8 +87,8 @@ CREATE TABLE `kylin_field_status` ...@@ -87,8 +87,8 @@ CREATE TABLE `kylin_field_status`
`is_display` tinyint NOT NULL DEFAULT 1 COMMENT '是否显示 0不显示 1显示', `is_display` tinyint NOT NULL DEFAULT 1 COMMENT '是否显示 0不显示 1显示',
`is_business` tinyint NOT NULL DEFAULT 0 COMMENT '是否营业 0不营业 1营业中', `is_business` tinyint NOT NULL DEFAULT 0 COMMENT '是否营业 0不营业 1营业中',
`change_status` tinyint NOT NULL DEFAULT 0 COMMENT '审核状态 0待审核 1已审核 2被拒绝', `change_status` tinyint NOT NULL DEFAULT 0 COMMENT '审核状态 0待审核 1已审核 2被拒绝',
`created_at` datetime NULL DEFAULT NULL COMMENT '创建时间', `created_at` datetime(3) NULL DEFAULT NULL COMMENT '创建时间',
`updated_at` datetime NULL DEFAULT NULL COMMENT '修改时间', `updated_at` datetime(3) NULL DEFAULT NULL COMMENT '修改时间',
KEY `kylin_field_status_uid_index` (`field_status_id`), KEY `kylin_field_status_uid_index` (`field_status_id`),
PRIMARY KEY (`mid`) PRIMARY KEY (`mid`)
) ENGINE = InnoDB ) ENGINE = InnoDB
...@@ -100,8 +100,8 @@ CREATE TABLE `kylin_field_relations` ...@@ -100,8 +100,8 @@ CREATE TABLE `kylin_field_relations`
`mid` int(11) NOT NULL AUTO_INCREMENT, `mid` int(11) NOT NULL AUTO_INCREMENT,
`field_relations_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'field_relations_id', `field_relations_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'field_relations_id',
`field_id` varchar(255) NOT NULL DEFAULT '' COMMENT '场地关联id', `field_id` varchar(255) NOT NULL DEFAULT '' COMMENT '场地关联id',
`created_at` datetime NULL DEFAULT NULL COMMENT '创建时间', `created_at` datetime(3) NULL DEFAULT NULL COMMENT '创建时间',
`updated_at` datetime NULL DEFAULT NULL COMMENT '修改时间', `updated_at` datetime(3) NULL DEFAULT NULL COMMENT '修改时间',
KEY `kylin_field_relations_uid_index` (`field_relations_id`), KEY `kylin_field_relations_uid_index` (`field_relations_id`),
PRIMARY KEY (`mid`) PRIMARY KEY (`mid`)
) ENGINE = InnoDB ) ENGINE = InnoDB
...@@ -139,8 +139,8 @@ CREATE TABLE `kylin_performances` ...@@ -139,8 +139,8 @@ CREATE TABLE `kylin_performances`
`reject_txt` varchar(255) NOT NULL DEFAULT '' COMMENT '拒绝理由', `reject_txt` varchar(255) NOT NULL DEFAULT '' COMMENT '拒绝理由',
`sort` int(11) NOT NULL DEFAULT 0 COMMENT '权重 高则在上', `sort` int(11) NOT NULL DEFAULT 0 COMMENT '权重 高则在上',
`comment` varchar(255) NULL DEFAULT '' COMMENT 'comment', `comment` varchar(255) NULL DEFAULT '' COMMENT 'comment',
`created_at` datetime NULL DEFAULT NULL COMMENT '创建时间', `created_at` datetime(3) NULL DEFAULT NULL COMMENT '创建时间',
`updated_at` datetime NULL DEFAULT NULL COMMENT '修改时间', `updated_at` datetime(3) NULL DEFAULT NULL COMMENT '修改时间',
KEY `kylin_performances_uid_index` (`performances_id`), KEY `kylin_performances_uid_index` (`performances_id`),
PRIMARY KEY (`mid`) PRIMARY KEY (`mid`)
) ENGINE = InnoDB ) ENGINE = InnoDB
...@@ -163,8 +163,8 @@ CREATE TABLE `kylin_performance_status` ...@@ -163,8 +163,8 @@ CREATE TABLE `kylin_performance_status`
`limit_count` int(11) NOT NULL DEFAULT 0 COMMENT '限购张数 0无限 (开启实名 则实名限购 未开始为账号限购)', `limit_count` int(11) NOT NULL DEFAULT 0 COMMENT '限购张数 0无限 (开启实名 则实名限购 未开始为账号限购)',
`limit_count_member` int(11) NOT NULL DEFAULT 0 COMMENT '会员限购张数 0无限 (开启实名 则实名限购 未开始为账号限购)', `limit_count_member` int(11) NOT NULL DEFAULT 0 COMMENT '会员限购张数 0无限 (开启实名 则实名限购 未开始为账号限购)',
`is_recommend` tinyint(255) NOT NULL DEFAULT 0 COMMENT '是否推荐 0否 1是', `is_recommend` tinyint(255) NOT NULL DEFAULT 0 COMMENT '是否推荐 0否 1是',
`created_at` datetime NULL DEFAULT NULL COMMENT '创建时间', `created_at` datetime(3) NULL DEFAULT NULL COMMENT '创建时间',
`updated_at` datetime NULL DEFAULT NULL COMMENT '修改时间', `updated_at` datetime(3) NULL DEFAULT NULL COMMENT '修改时间',
KEY `kylin_performance_status_uid_index` (`performance_status_id`), KEY `kylin_performance_status_uid_index` (`performance_status_id`),
PRIMARY KEY (`mid`) PRIMARY KEY (`mid`)
) ENGINE = InnoDB ) ENGINE = InnoDB
...@@ -182,8 +182,8 @@ CREATE TABLE `kylin_performance_relations` ...@@ -182,8 +182,8 @@ CREATE TABLE `kylin_performance_relations`
`road_show_id` varchar(255) NOT NULL DEFAULT '' COMMENT '巡演id', `road_show_id` varchar(255) NOT NULL DEFAULT '' COMMENT '巡演id',
`project_id` varchar(255) NOT NULL DEFAULT '' COMMENT '专题id', `project_id` varchar(255) NOT NULL DEFAULT '' COMMENT '专题id',
`video_id` varchar(255) NOT NULL DEFAULT '' COMMENT '视频id', `video_id` varchar(255) NOT NULL DEFAULT '' COMMENT '视频id',
`created_at` datetime NULL DEFAULT NULL COMMENT '创建时间', `created_at` datetime(3) NULL DEFAULT NULL COMMENT '创建时间',
`updated_at` datetime NULL DEFAULT NULL COMMENT '修改时间', `updated_at` datetime(3) NULL DEFAULT NULL COMMENT '修改时间',
KEY `performance_relations_uid_index` (`performance_relations_id`), KEY `performance_relations_uid_index` (`performance_relations_id`),
PRIMARY KEY (`mid`) PRIMARY KEY (`mid`)
) ENGINE = InnoDB ) ENGINE = InnoDB
...@@ -202,8 +202,8 @@ CREATE TABLE `kylin_performance_distributions` ...@@ -202,8 +202,8 @@ CREATE TABLE `kylin_performance_distributions`
`second_agent_scale_money` varchar(5) NOT NULL DEFAULT '0' COMMENT '1级现金奖励占比', `second_agent_scale_money` varchar(5) NOT NULL DEFAULT '0' COMMENT '1级现金奖励占比',
`second_agent_scale_barter` varchar(5) NOT NULL DEFAULT '0' COMMENT '2级积分奖励占比', `second_agent_scale_barter` varchar(5) NOT NULL DEFAULT '0' COMMENT '2级积分奖励占比',
`comment` varchar(255) NULL DEFAULT '' COMMENT 'comment', `comment` varchar(255) NULL DEFAULT '' COMMENT 'comment',
`created_at` datetime NULL DEFAULT NULL COMMENT '创建时间', `created_at` datetime(3) NULL DEFAULT NULL COMMENT '创建时间',
`updated_at` datetime NULL DEFAULT NULL COMMENT '修改时间', `updated_at` datetime(3) NULL DEFAULT NULL COMMENT '修改时间',
KEY `kylin_performance_distributions_uid_index` (`performance_distributions_id`), KEY `kylin_performance_distributions_uid_index` (`performance_distributions_id`),
PRIMARY KEY (`mid`) PRIMARY KEY (`mid`)
) ENGINE = InnoDB ) ENGINE = InnoDB
...@@ -222,8 +222,8 @@ CREATE TABLE `kylin_ticket_times` ...@@ -222,8 +222,8 @@ CREATE TABLE `kylin_ticket_times`
`use_start` datetime NOT NULL DEFAULT '2000-01-01 12:00:00' COMMENT '售票开始时间', `use_start` datetime NOT NULL DEFAULT '2000-01-01 12:00:00' COMMENT '售票开始时间',
`use_end` datetime NOT NULL DEFAULT '2000-01-01 12:00:00' COMMENT '售票结束时间', `use_end` datetime NOT NULL DEFAULT '2000-01-01 12:00:00' COMMENT '售票结束时间',
`comment` varchar(255) NULL DEFAULT '' COMMENT 'comment', `comment` varchar(255) NULL DEFAULT '' COMMENT 'comment',
`created_at` datetime NULL DEFAULT NULL COMMENT '创建时间', `created_at` datetime(3) NULL DEFAULT NULL COMMENT '创建时间',
`updated_at` datetime NULL DEFAULT NULL COMMENT '修改时间', `updated_at` datetime(3) NULL DEFAULT NULL COMMENT '修改时间',
KEY `kylin_ticket_times_uid_index` (`ticket_times_id`), KEY `kylin_ticket_times_uid_index` (`ticket_times_id`),
PRIMARY KEY (`mid`) PRIMARY KEY (`mid`)
) ENGINE = InnoDB ) ENGINE = InnoDB
...@@ -237,8 +237,8 @@ CREATE TABLE `kylin_ticket_time_relation` ...@@ -237,8 +237,8 @@ CREATE TABLE `kylin_ticket_time_relation`
`ticket_time_relation_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'ticket_time_relation_id', `ticket_time_relation_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'ticket_time_relation_id',
`times_id` varchar(255) NOT NULL DEFAULT '' COMMENT '场次id', `times_id` varchar(255) NOT NULL DEFAULT '' COMMENT '场次id',
`performance_id` varchar(255) NOT NULL DEFAULT '' COMMENT '关联演出id', `performance_id` varchar(255) NOT NULL DEFAULT '' COMMENT '关联演出id',
`created_at` datetime NULL DEFAULT NULL COMMENT '创建时间', `created_at` datetime(3) NULL DEFAULT NULL COMMENT '创建时间',
`updated_at` datetime NULL DEFAULT NULL COMMENT '修改时间', `updated_at` datetime(3) NULL DEFAULT NULL COMMENT '修改时间',
KEY `kylin_ticket_time_relation_uid_index` (`ticket_time_relation_id`), KEY `kylin_ticket_time_relation_uid_index` (`ticket_time_relation_id`),
PRIMARY KEY (`mid`) PRIMARY KEY (`mid`)
) ENGINE = InnoDB ) ENGINE = InnoDB
...@@ -268,8 +268,8 @@ CREATE TABLE `kylin_tickets` ...@@ -268,8 +268,8 @@ CREATE TABLE `kylin_tickets`
`pay_countdown_minute` int(11) NOT NULL DEFAULT 5 COMMENT '支付倒计时时间', `pay_countdown_minute` int(11) NOT NULL DEFAULT 5 COMMENT '支付倒计时时间',
`sale_remind_minute` int(11) NOT NULL DEFAULT 60 COMMENT '开票提醒倒计时(分钟数)', `sale_remind_minute` int(11) NOT NULL DEFAULT 60 COMMENT '开票提醒倒计时(分钟数)',
`comment` varchar(255) NULL DEFAULT '' COMMENT 'comment', `comment` varchar(255) NULL DEFAULT '' COMMENT 'comment',
`created_at` datetime NULL DEFAULT NULL COMMENT '创建时间', `created_at` datetime(3) NULL DEFAULT NULL COMMENT '创建时间',
`updated_at` datetime NULL DEFAULT NULL COMMENT '修改时间', `updated_at` datetime(3) NULL DEFAULT NULL COMMENT '修改时间',
KEY `kylin_tickets_uid_index` (`tickets_id`), KEY `kylin_tickets_uid_index` (`tickets_id`),
PRIMARY KEY (`mid`) PRIMARY KEY (`mid`)
) ENGINE = InnoDB ) ENGINE = InnoDB
...@@ -303,8 +303,8 @@ CREATE TABLE `kylin_ticket_status` ...@@ -303,8 +303,8 @@ CREATE TABLE `kylin_ticket_status`
`is_member` tinyint NOT NULL DEFAULT 0 COMMENT '是否关联会员 0不是 1是', `is_member` tinyint NOT NULL DEFAULT 0 COMMENT '是否关联会员 0不是 1是',
`is_agent` tinyint NOT NULL DEFAULT 0 COMMENT '是否关联代理 0不是 1是', `is_agent` tinyint NOT NULL DEFAULT 0 COMMENT '是否关联代理 0不是 1是',
`sync_damai` tinyint NOT NULL DEFAULT 0 COMMENT '是否同步大麦 0不关联 1关联', `sync_damai` tinyint NOT NULL DEFAULT 0 COMMENT '是否同步大麦 0不关联 1关联',
`created_at` datetime NULL DEFAULT NULL COMMENT '创建时间', `created_at` datetime(3) NULL DEFAULT NULL COMMENT '创建时间',
`updated_at` datetime NULL DEFAULT NULL COMMENT '修改时间', `updated_at` datetime(3) NULL DEFAULT NULL COMMENT '修改时间',
KEY `kylin_ticket_status_uid_index` (`ticket_status_id`), KEY `kylin_ticket_status_uid_index` (`ticket_status_id`),
PRIMARY KEY (`mid`) PRIMARY KEY (`mid`)
) ENGINE = InnoDB ) ENGINE = InnoDB
...@@ -317,8 +317,8 @@ CREATE TABLE `kylin_ticket_relations` ...@@ -317,8 +317,8 @@ CREATE TABLE `kylin_ticket_relations`
`ticket_relations_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'ticket_relations_id', `ticket_relations_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'ticket_relations_id',
`ticket_id` varchar(255) NOT NULL DEFAULT '' COMMENT '票关联id', `ticket_id` varchar(255) NOT NULL DEFAULT '' COMMENT '票关联id',
`times_id` varchar(255) NOT NULL DEFAULT '' COMMENT '关联场次id', `times_id` varchar(255) NOT NULL DEFAULT '' COMMENT '关联场次id',
`created_at` datetime NULL DEFAULT NULL COMMENT '创建时间', `created_at` datetime(3) NULL DEFAULT NULL COMMENT '创建时间',
`updated_at` datetime NULL DEFAULT NULL COMMENT '修改时间', `updated_at` datetime(3) NULL DEFAULT NULL COMMENT '修改时间',
KEY `ticket_relations_uid_index` (`ticket_relations_id`), KEY `ticket_relations_uid_index` (`ticket_relations_id`),
PRIMARY KEY (`mid`) PRIMARY KEY (`mid`)
) ENGINE = InnoDB ) ENGINE = InnoDB
...@@ -334,8 +334,8 @@ CREATE TABLE `kylin_road_shows` ...@@ -334,8 +334,8 @@ CREATE TABLE `kylin_road_shows`
`img_poster` varchar(255) NOT NULL DEFAULT '' COMMENT '巡演封面图', `img_poster` varchar(255) NOT NULL DEFAULT '' COMMENT '巡演封面图',
`status` tinyint NOT NULL DEFAULT 1 COMMENT '状态 0停用 1启用', `status` tinyint NOT NULL DEFAULT 1 COMMENT '状态 0停用 1启用',
`comment` varchar(255) NULL DEFAULT '' COMMENT 'comment', `comment` varchar(255) NULL DEFAULT '' COMMENT 'comment',
`created_at` datetime NULL DEFAULT NULL COMMENT '创建时间', `created_at` datetime(3) NULL DEFAULT NULL COMMENT '创建时间',
`updated_at` datetime NULL DEFAULT NULL COMMENT '修改时间', `updated_at` datetime(3) NULL DEFAULT NULL COMMENT '修改时间',
KEY `kylin_road_shows_uid_index` (`road_shows_id`), KEY `kylin_road_shows_uid_index` (`road_shows_id`),
PRIMARY KEY (`mid`) PRIMARY KEY (`mid`)
) ENGINE = InnoDB ) ENGINE = InnoDB
...@@ -355,8 +355,8 @@ CREATE TABLE `kylin_lack_registers` ...@@ -355,8 +355,8 @@ CREATE TABLE `kylin_lack_registers`
`user_mobile` varchar(255) NOT NULL DEFAULT '' COMMENT '用户手机号', `user_mobile` varchar(255) NOT NULL DEFAULT '' COMMENT '用户手机号',
`send_status` tinyint NOT NULL DEFAULT 0 COMMENT '是否发送短信', `send_status` tinyint NOT NULL DEFAULT 0 COMMENT '是否发送短信',
`ip_address` varchar(255) NOT NULL DEFAULT '' COMMENT 'IP 地址', `ip_address` varchar(255) NOT NULL DEFAULT '' COMMENT 'IP 地址',
`created_at` datetime NULL DEFAULT NULL COMMENT '创建时间', `created_at` datetime(3) NULL DEFAULT NULL COMMENT '创建时间',
`updated_at` datetime NULL DEFAULT NULL COMMENT '修改时间', `updated_at` datetime(3) NULL DEFAULT NULL COMMENT '修改时间',
KEY `kylin_lack_registers_uid_index` (`lack_registers_id`), KEY `kylin_lack_registers_uid_index` (`lack_registers_id`),
PRIMARY KEY (`mid`) PRIMARY KEY (`mid`)
) ENGINE = InnoDB ) ENGINE = InnoDB
...@@ -375,8 +375,8 @@ CREATE TABLE `kylin_projects` ...@@ -375,8 +375,8 @@ CREATE TABLE `kylin_projects`
`open_goods` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否开启 推荐商品', `open_goods` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否开启 推荐商品',
`open_tied` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否开启 推荐搭售', `open_tied` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否开启 推荐搭售',
`comment` varchar(255) NULL DEFAULT '' COMMENT 'comment', `comment` varchar(255) NULL DEFAULT '' COMMENT 'comment',
`created_at` datetime NULL DEFAULT NULL, `created_at` datetime(3) NULL DEFAULT NULL,
`updated_at` datetime NULL DEFAULT NULL, `updated_at` datetime(3) NULL DEFAULT NULL,
KEY `kylin_projects_uid_index` (`projects_id`), KEY `kylin_projects_uid_index` (`projects_id`),
PRIMARY KEY (`mid`) PRIMARY KEY (`mid`)
) ENGINE = InnoDB ) ENGINE = InnoDB
...@@ -396,8 +396,8 @@ CREATE TABLE `kylin_project_relations` ...@@ -396,8 +396,8 @@ CREATE TABLE `kylin_project_relations`
`tied_price` decimal(8, 2) NOT NULL DEFAULT '0.00' COMMENT '搭售价格', `tied_price` decimal(8, 2) NOT NULL DEFAULT '0.00' COMMENT '搭售价格',
`is_limit` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否限购', `is_limit` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否限购',
`limit_num` int(11) NOT NULL DEFAULT '0' COMMENT '限购数量 0不限购', `limit_num` int(11) NOT NULL DEFAULT '0' COMMENT '限购数量 0不限购',
`created_at` datetime NULL DEFAULT NULL, `created_at` datetime(3) NULL DEFAULT NULL,
`updated_at` datetime NULL DEFAULT NULL, `updated_at` datetime(3) NULL DEFAULT NULL,
PRIMARY KEY (`mid`), PRIMARY KEY (`mid`),
KEY `kylin_project_relations_uid_index` (`project_relations_id`), KEY `kylin_project_relations_uid_index` (`project_relations_id`),
KEY `kylin_project_relations_project_id_index` (`project_id`), KEY `kylin_project_relations_project_id_index` (`project_id`),
...@@ -443,8 +443,8 @@ CREATE TABLE `kylin_order_tickets` ...@@ -443,8 +443,8 @@ CREATE TABLE `kylin_order_tickets`
`get_ticket_describe` varchar(255) NOT NULL DEFAULT '' COMMENT '直播用取票观演码,隔开', `get_ticket_describe` varchar(255) NOT NULL DEFAULT '' COMMENT '直播用取票观演码,隔开',
`pay_countdown_minute` int(32) NOT NULL DEFAULT 15 COMMENT '订单过期时间(分钟)', `pay_countdown_minute` int(32) NOT NULL DEFAULT 15 COMMENT '订单过期时间(分钟)',
`comment` varchar(255) NULL DEFAULT '' COMMENT 'comment', `comment` varchar(255) NULL DEFAULT '' COMMENT 'comment',
`created_at` datetime NULL DEFAULT NULL COMMENT '创建时间', `created_at` datetime(3) NULL DEFAULT NULL COMMENT '创建时间',
`updated_at` datetime NULL DEFAULT NULL COMMENT '修改时间', `updated_at` datetime(3) NULL DEFAULT NULL COMMENT '修改时间',
KEY `kylin_order_tickets_uid_index` (`order_tickets_id`), KEY `kylin_order_tickets_uid_index` (`order_tickets_id`),
PRIMARY KEY (`mid`) PRIMARY KEY (`mid`)
) ENGINE = InnoDB ) ENGINE = InnoDB
...@@ -463,8 +463,8 @@ CREATE TABLE `kylin_order_ticket_relations` ...@@ -463,8 +463,8 @@ CREATE TABLE `kylin_order_ticket_relations`
`ticket_id` varchar(255) NOT NULL DEFAULT '' COMMENT '票id', `ticket_id` varchar(255) NOT NULL DEFAULT '' COMMENT '票id',
`agent_id` varchar(255) NOT NULL DEFAULT '' COMMENT '分销代理id', `agent_id` varchar(255) NOT NULL DEFAULT '' COMMENT '分销代理id',
`is_member` int NOT NULL DEFAULT 0 COMMENT '购买者是否是会员', `is_member` int NOT NULL DEFAULT 0 COMMENT '购买者是否是会员',
`created_at` datetime NULL DEFAULT NULL COMMENT '创建时间', `created_at` datetime(3) NULL DEFAULT NULL COMMENT '创建时间',
`updated_at` datetime NULL DEFAULT NULL COMMENT '修改时间', `updated_at` datetime(3) NULL DEFAULT NULL COMMENT '修改时间',
KEY `kylin_order_ticket_relations_uid_index` (`order_ticket_relations_id`), KEY `kylin_order_ticket_relations_uid_index` (`order_ticket_relations_id`),
PRIMARY KEY (`mid`) PRIMARY KEY (`mid`)
) ENGINE = InnoDB ) ENGINE = InnoDB
...@@ -481,8 +481,8 @@ CREATE TABLE `kylin_order_ticket_status` ...@@ -481,8 +481,8 @@ CREATE TABLE `kylin_order_ticket_status`
`transfer_status` tinyint NOT NULL DEFAULT 0 COMMENT '转移状态,0未转移,1收到他人转赠,2已转赠给他人', `transfer_status` tinyint NOT NULL DEFAULT 0 COMMENT '转移状态,0未转移,1收到他人转赠,2已转赠给他人',
`status` tinyint NOT NULL DEFAULT 0 COMMENT '订单状态:0待付款,1已付款,2已关闭,3正在退款,4已退款, 5待关闭 6部分退款', `status` tinyint NOT NULL DEFAULT 0 COMMENT '订单状态:0待付款,1已付款,2已关闭,3正在退款,4已退款, 5待关闭 6部分退款',
`pay_status` tinyint NOT NULL DEFAULT 0 COMMENT '支付状态:0未支付 1已支付 2支付失败', `pay_status` tinyint NOT NULL DEFAULT 0 COMMENT '支付状态:0未支付 1已支付 2支付失败',
`created_at` datetime NULL DEFAULT NULL COMMENT '创建时间', `created_at` datetime(3) NULL DEFAULT NULL COMMENT '创建时间',
`updated_at` datetime NULL DEFAULT NULL COMMENT '修改时间', `updated_at` datetime(3) NULL DEFAULT NULL COMMENT '修改时间',
KEY `kylin_order_ticket_status_uid_index` (`order_ticket_status_id`), KEY `kylin_order_ticket_status_uid_index` (`order_ticket_status_id`),
PRIMARY KEY (`mid`) PRIMARY KEY (`mid`)
) ENGINE = InnoDB ) ENGINE = InnoDB
...@@ -509,8 +509,8 @@ CREATE TABLE `kylin_order_ticket_entities` ...@@ -509,8 +509,8 @@ CREATE TABLE `kylin_order_ticket_entities`
`check_client` varchar(255) NOT NULL DEFAULT '' COMMENT '出票端 例如 pda 验票app android/ios 大麦出票', `check_client` varchar(255) NOT NULL DEFAULT '' COMMENT '出票端 例如 pda 验票app android/ios 大麦出票',
`is_payment` int(11) NOT NULL DEFAULT 0 COMMENT '支付状态: 0未支付 1已支付 2退款中 3已退款 ', `is_payment` int(11) NOT NULL DEFAULT 0 COMMENT '支付状态: 0未支付 1已支付 2退款中 3已退款 ',
`comment` varchar(255) NULL DEFAULT '' COMMENT 'comment', `comment` varchar(255) NULL DEFAULT '' COMMENT 'comment',
`created_at` datetime NULL DEFAULT NULL COMMENT '创建时间', `created_at` datetime(3) NULL DEFAULT NULL COMMENT '创建时间',
`updated_at` datetime NULL DEFAULT NULL COMMENT '修改时间', `updated_at` datetime(3) NULL DEFAULT NULL COMMENT '修改时间',
KEY `kylin_order_ticket_entities_uid_index` (`order_ticket_entities_id`), KEY `kylin_order_ticket_entities_uid_index` (`order_ticket_entities_id`),
PRIMARY KEY (`mid`) PRIMARY KEY (`mid`)
) ENGINE = InnoDB ) ENGINE = InnoDB
...@@ -527,8 +527,8 @@ CREATE TABLE `kylin_buy_notice` ...@@ -527,8 +527,8 @@ CREATE TABLE `kylin_buy_notice`
`message` varchar(255) NOT NULL DEFAULT '' COMMENT '内容', `message` varchar(255) NOT NULL DEFAULT '' COMMENT '内容',
`status` tinyint NOT NULL DEFAULT 1 COMMENT '状态 1可用 0弃用', `status` tinyint NOT NULL DEFAULT 1 COMMENT '状态 1可用 0弃用',
`sort` int(10) NOT NULL DEFAULT 0 COMMENT '排序 大在上', `sort` int(10) NOT NULL DEFAULT 0 COMMENT '排序 大在上',
`created_at` datetime NULL DEFAULT NULL COMMENT '创建时间', `created_at` datetime(3) NULL DEFAULT NULL COMMENT '创建时间',
`updated_at` datetime NULL DEFAULT NULL COMMENT '修改时间', `updated_at` datetime(3) NULL DEFAULT NULL COMMENT '修改时间',
KEY `kylin_buy_notice_uid_index` (`buy_notice_id`), KEY `kylin_buy_notice_uid_index` (`buy_notice_id`),
PRIMARY KEY (`mid`) PRIMARY KEY (`mid`)
) ENGINE = InnoDB ) ENGINE = InnoDB
...@@ -545,8 +545,8 @@ CREATE TABLE `kylin_check_user` ...@@ -545,8 +545,8 @@ CREATE TABLE `kylin_check_user`
`pwd` varchar(255) NOT NULL DEFAULT '' COMMENT '密码', `pwd` varchar(255) NOT NULL DEFAULT '' COMMENT '密码',
`status` tinyint NOT NULL DEFAULT 1 COMMENT '是否可用 0否 1是', `status` tinyint NOT NULL DEFAULT 1 COMMENT '是否可用 0否 1是',
`merchant_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'merchantId 第三方id', `merchant_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'merchantId 第三方id',
`created_at` datetime NULL DEFAULT NULL COMMENT '创建时间', `created_at` datetime(3) NULL DEFAULT NULL COMMENT '创建时间',
`updated_at` datetime NULL DEFAULT NULL COMMENT '修改时间', `updated_at` datetime(3) NULL DEFAULT NULL COMMENT '修改时间',
KEY `kylin_check_user_uid_index` (`check_user_id`), KEY `kylin_check_user_uid_index` (`check_user_id`),
PRIMARY KEY (`mid`) PRIMARY KEY (`mid`)
) ENGINE = InnoDB ) ENGINE = InnoDB
...@@ -562,8 +562,8 @@ CREATE TABLE `kylin_check_user_performances` ...@@ -562,8 +562,8 @@ CREATE TABLE `kylin_check_user_performances`
`check_user_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'check_user_id', `check_user_id` varchar(255) NOT NULL DEFAULT '' COMMENT 'check_user_id',
`status` tinyint NOT NULL DEFAULT 1 COMMENT '状态 1可用 0不可', `status` tinyint NOT NULL DEFAULT 1 COMMENT '状态 1可用 0不可',
`can_down_time` datetime NULL DEFAULT NULL COMMENT '可下载时间', `can_down_time` datetime NULL DEFAULT NULL COMMENT '可下载时间',
`created_at` datetime NULL DEFAULT NULL COMMENT '创建时间', `created_at` datetime(3) NULL DEFAULT NULL COMMENT '创建时间',
`updated_at` datetime NULL DEFAULT NULL COMMENT '修改时间', `updated_at` datetime(3) NULL DEFAULT NULL COMMENT '修改时间',
KEY `kylin_check_user_uid_index` (`check_user_id`), KEY `kylin_check_user_uid_index` (`check_user_id`),
PRIMARY KEY (`mid`) PRIMARY KEY (`mid`)
) ENGINE = InnoDB ) ENGINE = InnoDB
......
...@@ -32,12 +32,15 @@ import com.liquidnet.service.kylin.service.IKylinOrderTicketsService; ...@@ -32,12 +32,15 @@ import com.liquidnet.service.kylin.service.IKylinOrderTicketsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.liquidnet.service.kylin.utils.*; import com.liquidnet.service.kylin.utils.*;
import com.mongodb.BasicDBObject; import com.mongodb.BasicDBObject;
import com.mongodb.client.model.FindOneAndUpdateOptions;
import com.mongodb.client.model.ReturnDocument;
import com.taobao.api.TaobaoClient; import com.taobao.api.TaobaoClient;
import com.taobao.api.request.AlibabaDamaiMevOpenBatchpushticketRequest; import com.taobao.api.request.AlibabaDamaiMevOpenBatchpushticketRequest;
import com.taobao.api.response.AlibabaDamaiMevOpenBatchpushticketResponse; import com.taobao.api.response.AlibabaDamaiMevOpenBatchpushticketResponse;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.time.DateUtils; import org.apache.commons.lang.time.DateUtils;
import org.apache.commons.lang3.StringUtils; import org.bson.Document;
import org.redisson.api.RLock; import org.redisson.api.RLock;
import org.springframework.amqp.rabbit.core.RabbitTemplate; import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
...@@ -56,7 +59,6 @@ import java.time.LocalDateTime; ...@@ -56,7 +59,6 @@ import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
import java.util.*; import java.util.*;
import static com.liquidnet.commons.lang.util.DateUtil.Formatter.yyyyMMdd;
/** /**
* <p> * <p>
...@@ -286,6 +288,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM ...@@ -286,6 +288,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
LinkedList<String> sqls = new LinkedList<>(); LinkedList<String> sqls = new LinkedList<>();
String source = CurrentUtil.getCliSource() == null ? "" : CurrentUtil.getCliSource(); String source = CurrentUtil.getCliSource() == null ? "" : CurrentUtil.getCliSource();
String version = CurrentUtil.getCliVersion() == null ? "" : CurrentUtil.getCliVersion(); String version = CurrentUtil.getCliVersion() == null ? "" : CurrentUtil.getCliVersion();
LocalDateTime now = LocalDateTime.now();
//生成订单 order_ticket //生成订单 order_ticket
KylinOrderTickets orderTickets = new KylinOrderTickets(); KylinOrderTickets orderTickets = new KylinOrderTickets();
String orderTicketId = IDGenerator.nextSnowId().toString(); String orderTicketId = IDGenerator.nextSnowId().toString();
...@@ -339,7 +342,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM ...@@ -339,7 +342,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
orderTickets.setCouponType("no"); orderTickets.setCouponType("no");
orderTickets.setGetTicketDescribe(""); orderTickets.setGetTicketDescribe("");
orderTickets.setPayCountdownMinute(performanceData.getPayCountdownMinute()); orderTickets.setPayCountdownMinute(performanceData.getPayCountdownMinute());
orderTickets.setCreatedAt(LocalDateTime.now()); orderTickets.setCreatedAt(now);
orderTickets.setUpdatedAt(null); orderTickets.setUpdatedAt(null);
...@@ -353,7 +356,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM ...@@ -353,7 +356,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
orderTicketStatus.setStatus(KylinTableStatusConst.ORDER_STATUS0); orderTicketStatus.setStatus(KylinTableStatusConst.ORDER_STATUS0);
orderTicketStatus.setIsStudent(isStudent); orderTicketStatus.setIsStudent(isStudent);
orderTicketStatus.setPayStatus(KylinTableStatusConst.ORDER_PAY_STATUS0); orderTicketStatus.setPayStatus(KylinTableStatusConst.ORDER_PAY_STATUS0);
orderTicketStatus.setCreatedAt(LocalDateTime.now()); orderTicketStatus.setCreatedAt(now);
orderTicketStatus.setUpdatedAt(null); orderTicketStatus.setUpdatedAt(null);
sqls.add(SqlMapping.get("kylin_order_ticket_status.add")); sqls.add(SqlMapping.get("kylin_order_ticket_status.add"));
LinkedList<Object[]> sqlsDataB = new LinkedList<Object[]>(); LinkedList<Object[]> sqlsDataB = new LinkedList<Object[]>();
...@@ -371,7 +374,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM ...@@ -371,7 +374,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
orderTicketRelations.setPerformanceId(payOrderParam.getPerformanceId()); orderTicketRelations.setPerformanceId(payOrderParam.getPerformanceId());
orderTicketRelations.setTimeId(payOrderParam.getTimeId()); orderTicketRelations.setTimeId(payOrderParam.getTimeId());
orderTicketRelations.setTicketId(payOrderParam.getTicketId()); orderTicketRelations.setTicketId(payOrderParam.getTicketId());
orderTicketRelations.setCreatedAt(LocalDateTime.now()); orderTicketRelations.setCreatedAt(now);
orderTicketRelations.setUpdatedAt(null); orderTicketRelations.setUpdatedAt(null);
sqls.add(SqlMapping.get("kylin_order_ticket_relation.add")); sqls.add(SqlMapping.get("kylin_order_ticket_relation.add"));
LinkedList<Object[]> sqlsDataC = new LinkedList<Object[]>(); LinkedList<Object[]> sqlsDataC = new LinkedList<Object[]>();
...@@ -400,7 +403,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM ...@@ -400,7 +403,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
orderTicketEntities.setCheckClient(""); orderTicketEntities.setCheckClient("");
orderTicketEntities.setIsPayment(KylinTableStatusConst.ENTITIES_IS_PAYMENT0); orderTicketEntities.setIsPayment(KylinTableStatusConst.ENTITIES_IS_PAYMENT0);
orderTicketEntities.setComment(""); orderTicketEntities.setComment("");
orderTicketEntities.setCreatedAt(LocalDateTime.now()); orderTicketEntities.setCreatedAt(now);
orderTicketEntities.setUpdatedAt(null); orderTicketEntities.setUpdatedAt(null);
sqls.add(SqlMapping.get("kylin_order_ticket_entities.add")); sqls.add(SqlMapping.get("kylin_order_ticket_entities.add"));
sqlsDataD.add(orderTicketEntities.getAddObject()); sqlsDataD.add(orderTicketEntities.getAddObject());
...@@ -415,6 +418,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM ...@@ -415,6 +418,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
orderTicketEntitiesVo.setTimemId(ticketTimesData.getMid()); orderTicketEntitiesVo.setTimemId(ticketTimesData.getMid());
orderTicketEntitiesVo.setCreatedAt(orderTicketEntities.getCreatedAt().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); orderTicketEntitiesVo.setCreatedAt(orderTicketEntities.getCreatedAt().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
orderTicketEntitiesVo.setUpdatedAt(null); orderTicketEntitiesVo.setUpdatedAt(null);
orderTicketEntitiesVo.setChangeDate(orderTicketEntities.getCreatedAt());
mongoTemplate.insert(orderTicketEntitiesVo, KylinOrderTicketEntitiesVo.class.getSimpleName()); mongoTemplate.insert(orderTicketEntitiesVo, KylinOrderTicketEntitiesVo.class.getSimpleName());
dataUtils.changeBuyInfo(orderTicketEntitiesVo.getUserId(), orderTicketEntitiesVo.getEnterIdCode(), orderTicketEntitiesVo.getPerformanceId(), orderTicketEntitiesVo.getTicketId(), 1); dataUtils.changeBuyInfo(orderTicketEntitiesVo.getUserId(), orderTicketEntitiesVo.getEnterIdCode(), orderTicketEntitiesVo.getPerformanceId(), orderTicketEntitiesVo.getTicketId(), 1);
} }
...@@ -435,7 +439,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM ...@@ -435,7 +439,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
orderTicketEntities.setCheckClient(""); orderTicketEntities.setCheckClient("");
orderTicketEntities.setIsPayment(KylinTableStatusConst.ENTITIES_IS_PAYMENT0); orderTicketEntities.setIsPayment(KylinTableStatusConst.ENTITIES_IS_PAYMENT0);
orderTicketEntities.setComment(""); orderTicketEntities.setComment("");
orderTicketEntities.setCreatedAt(LocalDateTime.now()); orderTicketEntities.setCreatedAt(now);
orderTicketEntities.setUpdatedAt(null); orderTicketEntities.setUpdatedAt(null);
sqls.add(SqlMapping.get("kylin_order_ticket_entities.add")); sqls.add(SqlMapping.get("kylin_order_ticket_entities.add"));
sqlsDataD.add(orderTicketEntities.getAddObject()); sqlsDataD.add(orderTicketEntities.getAddObject());
...@@ -450,6 +454,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM ...@@ -450,6 +454,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
orderTicketEntitiesVo.setTimemId(ticketTimesData.getMid()); orderTicketEntitiesVo.setTimemId(ticketTimesData.getMid());
orderTicketEntitiesVo.setCreatedAt(orderTicketEntities.getCreatedAt().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); orderTicketEntitiesVo.setCreatedAt(orderTicketEntities.getCreatedAt().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
orderTicketEntitiesVo.setUpdatedAt(null); orderTicketEntitiesVo.setUpdatedAt(null);
orderTicketEntitiesVo.setChangeDate(orderTicketEntities.getCreatedAt());
mongoTemplate.insert(orderTicketEntitiesVo, KylinOrderTicketEntitiesVo.class.getSimpleName()); mongoTemplate.insert(orderTicketEntitiesVo, KylinOrderTicketEntitiesVo.class.getSimpleName());
dataUtils.changeBuyInfo(orderTicketEntitiesVo.getUserId(), orderTicketEntitiesVo.getEnterIdCode(), orderTicketEntitiesVo.getPerformanceId(), orderTicketEntitiesVo.getTicketId(), 1); dataUtils.changeBuyInfo(orderTicketEntitiesVo.getUserId(), orderTicketEntitiesVo.getEnterIdCode(), orderTicketEntitiesVo.getPerformanceId(), orderTicketEntitiesVo.getTicketId(), 1);
} }
...@@ -489,7 +494,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM ...@@ -489,7 +494,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
payResultVo.setPrice(orderTickets.getPriceActual()); payResultVo.setPrice(orderTickets.getPriceActual());
orderTickets.setPayCode(payResultVo.getCode()); orderTickets.setPayCode(payResultVo.getCode());
sqls.add(SqlMapping.get("kylin_order_ticket.add")); sqls.add(SqlMapping.get("kylin_order_ticket.add"));
LinkedList<Object[]> sqlsDataA = new LinkedList<Object[]>(); LinkedList<Object[]> sqlsDataA = new LinkedList<>();
sqlsDataA.add(orderTickets.getAddObject()); sqlsDataA.add(orderTickets.getAddObject());
if (payOrderParam.getPayType().equals("alipay") && payOrderParam.getDeviceFrom().equals("wap")) { if (payOrderParam.getPayType().equals("alipay") && payOrderParam.getDeviceFrom().equals("wap")) {
...@@ -507,13 +512,14 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM ...@@ -507,13 +512,14 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
orderTicketVo.setTimeStart(performanceData.getTimeStart()); orderTicketVo.setTimeStart(performanceData.getTimeStart());
orderTicketVo.setOverdueAt(orderTickets.getCreatedAt().plusMinutes(performanceData.getPayCountdownMinute()).plusSeconds(15).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); orderTicketVo.setOverdueAt(orderTickets.getCreatedAt().plusMinutes(performanceData.getPayCountdownMinute()).plusSeconds(15).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
orderTicketVo.setCreatedAt(orderTickets.getCreatedAt().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); orderTicketVo.setCreatedAt(orderTickets.getCreatedAt().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
orderTicketVo.setChangeDate(orderTickets.getCreatedAt());
mongoTemplate.insert(orderTicketVo, KylinOrderTicketVo.class.getSimpleName()); mongoTemplate.insert(orderTicketVo, KylinOrderTicketVo.class.getSimpleName());
mongoVoUtils.resetOrderListVo(uid, 1, orderTicketVo.getOrderTicketsId()); mongoVoUtils.resetOrderListVo(uid, 1, orderTicketVo.getOrderTicketsId());
// 执行sql // 执行sql
String sqlData = SqlMapping.gets(sqls, sqlsDataB, sqlsDataC, sqlsDataD, sqlsDataA); String sqlData = SqlMapping.gets(sqls, sqlsDataB, sqlsDataC, sqlsDataD, sqlsDataA);
rabbitTemplate.convertAndSend(MQConst.EXCHANGES_LIQUIDNET_SQL, MQConst.ROUTING_KEY_SQL, rabbitTemplate.convertAndSend(MQConst.EXCHANGES_LIQUIDNET_SQL_ORDER_CREADE, MQConst.ROUTING_KEY_SQL_ORDER_CREATE,
sqlData); sqlData);
return ResponseDto.success(payResultVo); return ResponseDto.success(payResultVo);
} }
...@@ -586,18 +592,34 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM ...@@ -586,18 +592,34 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
orderTickets.setPayType(payAgainParam.getPayType()); orderTickets.setPayType(payAgainParam.getPayType());
//改vo //改vo
HashMap<String, String> map = new HashMap<>(); HashMap<String, Object> map = new HashMap<>();
map.put("payType", payAgainParam.getPayType()); map.put("payType", payAgainParam.getPayType());
map.put("payCode", payResultVo.getCode()); map.put("payCode", payResultVo.getCode());
map.put("updatedAt", orderTickets.getUpdatedAt().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); map.put("updatedAt", DateUtil.Formatter.yyyyMMddHHmmss.format(orderTickets.getUpdatedAt()));
mongoTemplate.getCollection(KylinOrderTicketVo.class.getSimpleName()).updateOne( map.put("changeDate", orderTickets.getUpdatedAt());
Document doc = mongoTemplate.getCollection(KylinOrderTicketVo.class.getSimpleName()).findOneAndUpdate(
Query.query(Criteria.where("orderTicketsId").is(payAgainParam.getOrderId())).getQueryObject(), Query.query(Criteria.where("orderTicketsId").is(payAgainParam.getOrderId())).getQueryObject(),
new BasicDBObject("$set", mongoConverter.convertToMongoType(map)) new BasicDBObject("$set", mongoConverter.convertToMongoType(map)),
new FindOneAndUpdateOptions().returnDocument(ReturnDocument.BEFORE)
); );
KylinOrderTicketVo orderTicketVo = BsonUtil.toBean(doc, KylinOrderTicketVo.class);
LocalDateTime strTime = orderTicketVo.getChangeDate();
dataUtils.delOrderTicketRedis(orderTickets.getOrderTicketsId()); dataUtils.delOrderTicketRedis(orderTickets.getOrderTicketsId());
rabbitTemplate.convertAndSend(MQConst.EXCHANGES_LIQUIDNET_SQL, MQConst.ROUTING_KEY_SQL, LinkedList<String> sqls = new LinkedList<>();
SqlMapping.get("kylin_order_ticket.payAgain", orderTickets.getPayAgainObject())); sqls.add(SqlMapping.get("kylin_order_ticket.payAgain"));
LinkedList<Object[]> sqlsDataA = new LinkedList<>();
sqlsDataA.add(orderTickets.getPayAgainObject(strTime, strTime));
sqls.add(SqlMapping.get("kylin_order_ticket_status.payAgain"));
LinkedList<Object[]> sqlsDataB = new LinkedList<>();
sqlsDataB.add(new Object[]{orderTickets.getUpdatedAt(),orderTickets.getOrderTicketsId(),strTime, strTime});
sqls.add(SqlMapping.get("kylin_order_ticket_relation.payAgain"));
LinkedList<Object[]> sqlsDataC = new LinkedList<>();
sqlsDataC.add(new Object[]{orderTickets.getUpdatedAt(),orderTickets.getOrderTicketsId(),strTime, strTime});
String sqlData = SqlMapping.gets(sqls, sqlsDataA,sqlsDataB, sqlsDataC);
rabbitTemplate.convertAndSend(MQConst.EXCHANGES_LIQUIDNET_SQL_ORDER_AGAIN, MQConst.ROUTING_KEY_SQL_ORDER_AGAIN,sqlData);
return ResponseDto.success(payResultVo); return ResponseDto.success(payResultVo);
} }
return ResponseDto.failure("未选择支付方式"); return ResponseDto.failure("未选择支付方式");
...@@ -644,6 +666,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM ...@@ -644,6 +666,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
} }
LinkedList<String> sqls = new LinkedList<>(); LinkedList<String> sqls = new LinkedList<>();
LocalDateTime strTime = orderTicketData.getChangeDate();
//sql //sql
KylinOrderTickets orderTickets = new KylinOrderTickets(); KylinOrderTickets orderTickets = new KylinOrderTickets();
...@@ -654,8 +677,8 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM ...@@ -654,8 +677,8 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
orderTickets.setQrCode(IDGenerator.ticketQrCode(orderTicketData.getOrderTicketsId())); orderTickets.setQrCode(IDGenerator.ticketQrCode(orderTicketData.getOrderTicketsId()));
orderTickets.setUpdatedAt(now); orderTickets.setUpdatedAt(now);
sqls.add(SqlMapping.get("kylin_order_ticket.synPay")); sqls.add(SqlMapping.get("kylin_order_ticket.synPay"));
LinkedList<Object[]> sqlsDataA = new LinkedList<Object[]>(); LinkedList<Object[]> sqlsDataA = new LinkedList<>();
sqlsDataA.add(orderTickets.getSynOrderObject()); sqlsDataA.add(orderTickets.getSynOrderObject(strTime, strTime));
KylinOrderTicketStatus orderTicketStatus = new KylinOrderTicketStatus(); KylinOrderTicketStatus orderTicketStatus = new KylinOrderTicketStatus();
orderTicketStatus.setOrderId(orderTicketData.getOrderTicketsId()); orderTicketStatus.setOrderId(orderTicketData.getOrderTicketsId());
...@@ -663,16 +686,20 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM ...@@ -663,16 +686,20 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
orderTicketStatus.setPayStatus(syncOrderParam.getStatus()); orderTicketStatus.setPayStatus(syncOrderParam.getStatus());
orderTicketStatus.setUpdatedAt(orderTickets.getUpdatedAt()); orderTicketStatus.setUpdatedAt(orderTickets.getUpdatedAt());
sqls.add(SqlMapping.get("kylin_order_ticket_status.synPay")); sqls.add(SqlMapping.get("kylin_order_ticket_status.synPay"));
LinkedList<Object[]> sqlsDataB = new LinkedList<Object[]>(); LinkedList<Object[]> sqlsDataB = new LinkedList<>();
sqlsDataB.add(orderTicketStatus.getSynOrderObject()); sqlsDataB.add(orderTicketStatus.getSynOrderObject(strTime, strTime));
sqls.add(SqlMapping.get("kylin_order_ticket_relation.synPay"));
LinkedList<Object[]> sqlsDataC = new LinkedList<>();
sqlsDataC.add(new Object[]{orderTickets.getUpdatedAt(),orderTickets.getOrderTicketsId(),strTime, strTime});
KylinOrderTicketEntities orderTicketEntities = new KylinOrderTicketEntities(); KylinOrderTicketEntities orderTicketEntities = new KylinOrderTicketEntities();
orderTicketEntities.setOrderId(orderTicketData.getOrderTicketsId()); orderTicketEntities.setOrderId(orderTicketData.getOrderTicketsId());
orderTicketEntities.setIsPayment(KylinTableStatusConst.ENTITIES_IS_PAYMENT1); orderTicketEntities.setIsPayment(KylinTableStatusConst.ENTITIES_IS_PAYMENT1);
orderTicketEntities.setUpdatedAt(orderTickets.getUpdatedAt()); orderTicketEntities.setUpdatedAt(orderTickets.getUpdatedAt());
sqls.add(SqlMapping.get("kylin_order_ticket_entities.synPay")); sqls.add(SqlMapping.get("kylin_order_ticket_entities.synPay"));
LinkedList<Object[]> sqlsDataC = new LinkedList<Object[]>(); LinkedList<Object[]> sqlsDataD = new LinkedList<>();
sqlsDataC.add(orderTicketEntities.getSynOrderObject()); sqlsDataD.add(orderTicketEntities.getSynOrderObject(strTime, strTime));
//vo //vo
...@@ -684,6 +711,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM ...@@ -684,6 +711,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
orderTicketVo.put("status", KylinTableStatusConst.ORDER_STATUS1); orderTicketVo.put("status", KylinTableStatusConst.ORDER_STATUS1);
orderTicketVo.put("payStatus", orderTicketStatus.getStatus()); orderTicketVo.put("payStatus", orderTicketStatus.getStatus());
orderTicketVo.put("updatedAt", timePay); orderTicketVo.put("updatedAt", timePay);
orderTicketVo.put("changeDate", now);
mongoTemplate.getCollection(KylinOrderTicketVo.class.getSimpleName()).updateOne( mongoTemplate.getCollection(KylinOrderTicketVo.class.getSimpleName()).updateOne(
Query.query(Criteria.where("orderTicketsId").is(orderTickets.getOrderTicketsId())).getQueryObject(), Query.query(Criteria.where("orderTicketsId").is(orderTickets.getOrderTicketsId())).getQueryObject(),
new BasicDBObject("$set", mongoConverter.convertToMongoType(orderTicketVo)) new BasicDBObject("$set", mongoConverter.convertToMongoType(orderTicketVo))
...@@ -693,14 +721,15 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM ...@@ -693,14 +721,15 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
HashMap<String, Object> orderTicketEntitiesVo = new HashMap<>(); HashMap<String, Object> orderTicketEntitiesVo = new HashMap<>();
orderTicketEntitiesVo.put("isPayment", KylinTableStatusConst.ENTITIES_IS_PAYMENT1); orderTicketEntitiesVo.put("isPayment", KylinTableStatusConst.ENTITIES_IS_PAYMENT1);
orderTicketEntitiesVo.put("updatedAt", timePay); orderTicketEntitiesVo.put("updatedAt", timePay);
orderTicketEntitiesVo.put("changeDate", now);
mongoTemplate.getCollection(KylinOrderTicketEntitiesVo.class.getSimpleName()).updateMany( mongoTemplate.getCollection(KylinOrderTicketEntitiesVo.class.getSimpleName()).updateMany(
Query.query(Criteria.where("orderId").is(orderTickets.getOrderTicketsId())).getQueryObject(), Query.query(Criteria.where("orderId").is(orderTickets.getOrderTicketsId())).getQueryObject(),
new BasicDBObject("$set", mongoConverter.convertToMongoType(orderTicketEntitiesVo)) new BasicDBObject("$set", mongoConverter.convertToMongoType(orderTicketEntitiesVo))
); );
dataUtils.delOrderTicketRedis(orderTickets.getOrderTicketsId()); dataUtils.delOrderTicketRedis(orderTickets.getOrderTicketsId());
rabbitTemplate.convertAndSend(MQConst.EXCHANGES_LIQUIDNET_SQL, MQConst.ROUTING_KEY_SQL, rabbitTemplate.convertAndSend(MQConst.EXCHANGES_LIQUIDNET_SQL_ORDER_PAY, MQConst.ROUTING_KEY_SQL_ORDER_PAY,
SqlMapping.gets(sqls, sqlsDataA, sqlsDataB, sqlsDataC)); SqlMapping.gets(sqls, sqlsDataA, sqlsDataB, sqlsDataC,sqlsDataD));
//生成vo redis //生成vo redis
mongoVoUtils.resetOrderListVo(orderTicketData.getUserId(), 2, orderTicketData.getOrderTicketsId()); mongoVoUtils.resetOrderListVo(orderTicketData.getUserId(), 2, orderTicketData.getOrderTicketsId());
...@@ -800,6 +829,34 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM ...@@ -800,6 +829,34 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
// Expresses expresses = expressesMapper.selectOne(new UpdateWrapper<Expresses>().eq("order_id", orderId).eq("order_type", "order_ticket")); // Expresses expresses = expressesMapper.selectOne(new UpdateWrapper<Expresses>().eq("order_id", orderId).eq("order_type", "order_ticket"));
KylinPerformanceVo performanceVo = dataUtils.getPerformanceVo(orderTicketVo.getPerformanceId()); KylinPerformanceVo performanceVo = dataUtils.getPerformanceVo(orderTicketVo.getPerformanceId());
List<KylinOrderTicketEntitiesVo> kylinOrderTicketEntitiesVoList = orderTicketVo.getEntitiesVoList(); List<KylinOrderTicketEntitiesVo> kylinOrderTicketEntitiesVoList = orderTicketVo.getEntitiesVoList();
KylinTicketVo ticketVo = null;
//获取购票数据
for (int x = 0; x < performanceVo.getTicketTimeList().size(); x++) {
KylinTicketTimesVo timeItem = performanceVo.getTicketTimeList().get(x);
for (int y = 0; y < timeItem.getTicketList().size(); y++) {
KylinTicketVo ticketItem = timeItem.getTicketList().get(y);
if (ticketItem.getTicketsId().equals(orderTicketVo.getTicketId())) {
ticketVo = ticketItem;
break;
}
}
}
orderTicketVo.setIsTrueName(ticketVo.getIsTrueName());
orderTicketVo.setNoticeImage(performanceVo.getNoticeImage());
orderTicketVo.setTicketType(ticketVo.getType());
orderTicketVo.setFieldName(performanceVo.getFieldName());
if (ticketVo.getIsShowCode() == 1) {
Date date = DateUtil.parse(ticketVo.getQrCodeShowTime(), DateUtil.Formatter.yyyyMMddHHmm.toString());
if (DateUtil.compareDay(date, DateUtil.now()) > 0) {
orderTicketVo.setQrCode("");
}
} else {
orderTicketVo.setQrCode("");
}
// 数据脱敏 // 数据脱敏
for (KylinOrderTicketEntitiesVo item : kylinOrderTicketEntitiesVoList) { for (KylinOrderTicketEntitiesVo item : kylinOrderTicketEntitiesVoList) {
if (item.getEnterIdCode().length() == 18) { if (item.getEnterIdCode().length() == 18) {
...@@ -828,7 +885,6 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM ...@@ -828,7 +885,6 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
vo.setExpress_company(""); vo.setExpress_company("");
vo.setKuaidi_status(-2); vo.setKuaidi_status(-2);
} }
vo.setOrderTicketEntitiesVo(kylinOrderTicketEntitiesVoList);
vo.setPerformanceVo(performanceVo); vo.setPerformanceVo(performanceVo);
vo.setOrderTicketVo(orderTicketVo); vo.setOrderTicketVo(orderTicketVo);
} }
...@@ -851,6 +907,15 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM ...@@ -851,6 +907,15 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
if (item.getStatus() == KylinTableStatusConst.ORDER_STATUS0) { if (item.getStatus() == KylinTableStatusConst.ORDER_STATUS0) {
LocalDateTime now = LocalDateTime.now(); LocalDateTime now = LocalDateTime.now();
try { try {
KylinOrderTicketVo vo = mongoTemplate.findOne(
Query.query(Criteria.where("orderTicketsId").is(item.getOrderTicketsId())),
KylinOrderTicketVo.class,
KylinOrderTicketVo.class.getSimpleName());
if(vo.getStatus()!=0){
continue;
}
//mysql //mysql
KylinOrderTickets orderTickets = new KylinOrderTickets(); KylinOrderTickets orderTickets = new KylinOrderTickets();
orderTickets.setOrderTicketsId(item.getOrderTicketsId()); orderTickets.setOrderTicketsId(item.getOrderTicketsId());
...@@ -864,11 +929,17 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM ...@@ -864,11 +929,17 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
//vo //vo
HashMap<String, Object> map = new HashMap<>(); HashMap<String, Object> map = new HashMap<>();
map.put("status", KylinTableStatusConst.ORDER_STATUS2); map.put("status", KylinTableStatusConst.ORDER_STATUS2);
map.put("updatedAt", now.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); map.put("updatedAt", DateUtil.Formatter.yyyyMMddHHmmssSSS.format(now));
mongoTemplate.getCollection(KylinOrderTicketVo.class.getSimpleName()).updateOne( map.put("changeDate", now);
Document doc = mongoTemplate.getCollection(KylinOrderTicketVo.class.getSimpleName()).findOneAndUpdate(
Query.query(Criteria.where("orderTicketsId").is(orderTickets.getOrderTicketsId())).getQueryObject(), Query.query(Criteria.where("orderTicketsId").is(orderTickets.getOrderTicketsId())).getQueryObject(),
new BasicDBObject("$set", mongoConverter.convertToMongoType(map)) new BasicDBObject("$set", mongoConverter.convertToMongoType(map)),
new FindOneAndUpdateOptions().returnDocument(ReturnDocument.BEFORE)
); );
KylinOrderTicketVo orderTicketVo = BsonUtil.toBean(doc, KylinOrderTicketVo.class);
LocalDateTime strTime = orderTicketVo.getChangeDate();
dataUtils.delOrderTicketRedis(orderTickets.getOrderTicketsId()); dataUtils.delOrderTicketRedis(orderTickets.getOrderTicketsId());
dataUtils.changeSurplusGeneral(item.getTicketId(), item.getNumber()); dataUtils.changeSurplusGeneral(item.getTicketId(), item.getNumber());
mongoVoUtils.resetOrderListVo(item.getUserId(), 2, item.getOrderTicketsId()); mongoVoUtils.resetOrderListVo(item.getUserId(), 2, item.getOrderTicketsId());
...@@ -881,13 +952,17 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM ...@@ -881,13 +952,17 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
sqls.add(SqlMapping.get("kylin_order_ticket.close")); sqls.add(SqlMapping.get("kylin_order_ticket.close"));
LinkedList<Object[]> sqlsDataA = new LinkedList<>(); LinkedList<Object[]> sqlsDataA = new LinkedList<>();
sqlsDataA.add(orderTickets.getCloseOrderObject()); sqlsDataA.add(orderTickets.getCloseOrderObject(strTime, strTime));
sqls.add(SqlMapping.get("kylin_order_ticket_status.close")); sqls.add(SqlMapping.get("kylin_order_ticket_status.close"));
LinkedList<Object[]> sqlsDataB = new LinkedList<>(); LinkedList<Object[]> sqlsDataB = new LinkedList<>();
sqlsDataA.add(orderTickets.getCloseOrderObject()); sqlsDataB.add(orderTicketStatus.getCloseOrderObject(strTime, strTime));
sqls.add(SqlMapping.get("kylin_order_ticket_relation.close"));
LinkedList<Object[]> sqlsDataC = new LinkedList<>();
sqlsDataC.add(new Object[]{orderTickets.getUpdatedAt(),orderTickets.getOrderTicketsId(),strTime, strTime});
rabbitTemplate.convertAndSend(MQConst.EXCHANGES_LIQUIDNET_SQL, MQConst.ROUTING_KEY_SQL, SqlMapping.gets(sqls, sqlsDataA, sqlsDataB)); rabbitTemplate.convertAndSend(MQConst.EXCHANGES_LIQUIDNET_SQL_ORDER_CLOSE, MQConst.ROUTING_KEY_SQL_ORDER_CLOSE, SqlMapping.gets(sqls, sqlsDataA, sqlsDataB,sqlsDataC));
} catch (Exception e) { } catch (Exception e) {
// lock.unlock(); // lock.unlock();
......
...@@ -10,14 +10,22 @@ kylin_order_ticket_status.add=INSERT INTO kylin_order_ticket_status(order_ticket ...@@ -10,14 +10,22 @@ kylin_order_ticket_status.add=INSERT INTO kylin_order_ticket_status(order_ticket
kylin_order_ticket_entities.add=INSERT INTO kylin_order_ticket_entities(order_ticket_entities_id ,order_id ,ticket_id ,user_id ,time_id ,performance_id ,enter_type ,enter_name ,enter_mobile,enter_id_code,`status`,sys_damai,check_client,is_payment,`comment`,created_at,updated_at)VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) kylin_order_ticket_entities.add=INSERT INTO kylin_order_ticket_entities(order_ticket_entities_id ,order_id ,ticket_id ,user_id ,time_id ,performance_id ,enter_type ,enter_name ,enter_mobile,enter_id_code,`status`,sys_damai,check_client,is_payment,`comment`,created_at,updated_at)VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
# ------------------------再次支付---------------------------- # ------------------------再次支付----------------------------
kylin_order_ticket.payAgain=UPDATE kylin_order_tickets SET order_type = ? ,order_code = ? , updated_at = ? WHERE order_tickets_id = ? kylin_order_ticket.payAgain=UPDATE kylin_order_tickets SET order_type = ? ,order_code = ? , updated_at = ? WHERE order_tickets_id = ? and (updated_at = ? or created_at = ?)
kylin_order_ticket_status.payAgain=UPDATE kylin_order_ticket_status SET updated_at = ? WHERE order_id = ? and (updated_at = ? or created_at = ?)
kylin_order_ticket_relation.payAgain=UPDATE kylin_order_ticket_relations SET updated_at = ? WHERE order_id = ? and (updated_at = ? or created_at = ?)
# ------------------------支付回调---------------------------- # ------------------------支付回调----------------------------
kylin_order_ticket.synPay=UPDATE kylin_order_tickets SET payment_type = ? ,pay_code = ? , time_pay = ?, qr_code = ? , updated_at = ? WHERE order_tickets_id = ? kylin_order_ticket.synPay=UPDATE kylin_order_tickets SET payment_type = ? ,pay_code = ? , time_pay = ?, qr_code = ? , updated_at = ? WHERE order_tickets_id = ? and (updated_at = ? or created_at = ?)
kylin_order_ticket_entities.synPay=UPDATE kylin_order_ticket_entities SET is_payment = ?,updated_at = ?,sys_damai = 1 WHERE order_id = ? kylin_order_ticket_status.synPay=UPDATE kylin_order_ticket_status SET `status` = ?,pay_status = ?,updated_at = ? WHERE order_id = ? and (updated_at = ? or created_at = ?)
kylin_order_ticket_status.synPay=UPDATE kylin_order_ticket_status SET `status` = ?,pay_status = ?,updated_at = ? WHERE order_id = ? kylin_order_ticket_relation.synPay=UPDATE kylin_order_ticket_relations SET updated_at = ? WHERE order_id = ? and (updated_at = ? or created_at = ?)
kylin_order_ticket_entities.synPay=UPDATE kylin_order_ticket_entities SET is_payment = ?,updated_at = ?,sys_damai = 1 WHERE order_id = ? and (updated_at = ? or created_at = ?)
# ------------------------订单关闭---------------------------- # ------------------------订单关闭----------------------------
kylin_order_ticket.close=UPDATE kylin_order_tickets SET updated_at = ? WHERE order_tickets_id = ? kylin_order_ticket.close=UPDATE kylin_order_tickets SET updated_at = ? WHERE order_tickets_id = ? and (updated_at = ? or created_at = ?)
kylin_order_ticket_status.close=UPDATE kylin_order_ticket_status SET `status` = ?,updated_at = ? WHERE order_id = ? kylin_order_ticket_status.close=UPDATE kylin_order_ticket_status SET `status` = ?,updated_at = ? WHERE order_id = ? and (updated_at = ? or created_at = ?)
kylin_order_ticket_relation.close=UPDATE kylin_order_ticket_relations SET updated_at = ? WHERE order_id = ? and (updated_at = ? or created_at = ?)
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