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

Commit 96eb77e3 authored by jiangxiulong's avatar jiangxiulong

Merge remote-tracking branch 'origin/dev' into dev

parents 0b9de53d 4d3d1fdb
......@@ -30,6 +30,9 @@ public class PerformanceStep2Param implements Serializable {
@ApiModelProperty(hidden = true)
private Integer auditStatus;
@ApiModelProperty(hidden = true)
private Integer status;
@ApiModelProperty(value = "场次数据",hidden = true)
private List<TicketTimesTicketCreatePartnerVo> ticketTimes;
}
package com.liquidnet.service.kylin.dto.vo.returns;
import com.liquidnet.service.kylin.dto.vo.mongo.KylinPerformanceVo;
import com.liquidnet.service.kylin.dto.vo.middle.KylinTicketTimesVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
......@@ -39,6 +39,8 @@ public class KylinStationPerformanceVo implements Serializable, Cloneable {
private Integer checkedNum;
@ApiModelProperty(position = 23, value = "余量[9]")
private Integer remainderNum;
@ApiModelProperty(position = 30, value = "#过程数据,前端无需关注")
private List<KylinTicketTimesVo> ticketTimeList;
private static final KylinStationPerformanceVo obj = new KylinStationPerformanceVo();
......@@ -49,14 +51,4 @@ public class KylinStationPerformanceVo implements Serializable, Cloneable {
return new KylinStationPerformanceVo();
}
}
public KylinStationPerformanceVo copy(KylinPerformanceVo source) {
if (null == source) return this;
this.performancesId = source.getPerformancesId();
this.type = source.getType();
this.title = source.getTitle();
this.timeStart = source.getTimeStart();
this.timeEnd = source.getTimeEnd();
return this;
}
}
package com.liquidnet.commons.lang.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface ClientUpdateAnnotation {
String version() default "100000000";
String source() default "ALL";
String path() default "NONE";
}
......@@ -28,7 +28,7 @@ logging:
console: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{96}:%line] - %msg%n'
rolling-file-name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
level:
root: ${liquidnet.logfile.level}
root: info
#以下是为指定包设置日志级别
com.liquidnet: ${liquidnet.logfile.level}
# -----------------------------------------------------------
......
......@@ -14,7 +14,7 @@ liquidnet:
pattern-file: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{96}:%line] - %msg%n'
pattern-console: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{96}:%line] - %msg%n'
pattern-rolling-file-name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
level: info
level: debug
rabbitmq:
connection-timeout: 5000
mysql:
......
......@@ -28,7 +28,7 @@ logging:
console: '%d{yyyy-MM-dd HH:mm:ss.SSS} [ %-5level] %thread [%logger{96}:%line] - %msg%n'
rolling-file-name: ${liquidnet.logfile.path}/${liquidnet.logfile.name}-%d{yyyy-MM-dd}.%i.log
level:
root: ${liquidnet.logfile.level}
root: info
#以下是为指定包设置日志级别
com:
liquidnet: ${liquidnet.logfile.level}
......
......@@ -154,7 +154,7 @@
MIN(
DATE_SUB(
t.time_start ,
INTERVAL pay_countdown_minute MINUTE
INTERVAL pay_countdown_minute MINUTE
)
) AS 'time_sell' ,
MAX(t.time_end) AS 'time_stop'
......@@ -175,7 +175,7 @@
) AS 'total_sale_price' ,
otr.performance_id AS 'performance_id' 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 WHERE ots.`status` = 1 AND coupon_type = 'no' GROUP BY otr.performance_id
ot.order_tickets_id WHERE (ots.`status` = 1 or ots.`status` = 0 or ots.`status` = 3) AND coupon_type = 'no' GROUP BY otr.performance_id
) AS ot ON ot.performance_id = p.performances_id
<where>
<if test="title!=''">
......@@ -198,7 +198,9 @@
<if test="status=='0'">
AND ps.STATUS = #{status}
</if>
AND pr.merchant_id = #{merchantId}
<if test="merchantId!='1'">
AND pr.merchant_id = #{merchantId}
</if>
</where>
ORDER BY ${orderItem} ${orderSc}
</select>
......@@ -240,7 +242,7 @@
MIN(
DATE_SUB(
t.time_start ,
INTERVAL pay_countdown_minute MINUTE
INTERVAL pay_countdown_minute MINUTE
)
) AS 'time_sell' ,
MAX(t.time_end) AS 'time_stop'
......@@ -262,7 +264,7 @@
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
WHERE
ots.`status` = 1 and coupon_type ='no'
(ots.`status` = 1 or ots.`status` = 0 or ots.`status` = 3) and coupon_type ='no'
GROUP BY otr.performance_id
) AS ot ON ot.performance_id = p.performances_id
<where>
......@@ -385,72 +387,73 @@
<!-- 演出订单统计-->
<select id="getPerformanceOrderStatisticalList" parameterType="java.lang.String"
resultMap="performanceOrderStatisticalDaoResult">
SELECT
kp.performances_id ,
kt.tickets_id,
kt.title,
kt.price,
kt.type,
kt.use_start,
IFNULL(kts.total_general , 0) AS 'total_general' ,
IFNULL(ot.total_sale_general , 0) AS 'sale_general' ,
IFNULL((kts.total_general - IFNULL(ot.total_sale_general,0)),0) AS 'surplus_general',
IFNULL(ot.total_sale_price , 0) AS 'total_sale_price' ,
IFNULL(kts.total_exchange , 0) AS 'total_exchange',
IFNULL(ot.total_refund_general , 0) AS 'total_refund_general',
IFNULL(ot.total_refund_price , 0) AS 'total_refund_price',
IFNULL(ot.total_member_number , 0) AS 'total_member_number',
IFNULL(otp.total_paying_number , 1) AS 'total_paying_number',
IFNULL(ut.total_buy_users , 0) AS 'total_buy_users'
FROM
(select t.performances_id,ktr.ticket_id from kylin_performances t inner join kylin_ticket_time_relation kttr
on t.performances_id = kttr.performance_id
inner join kylin_ticket_relations ktr on kttr.times_id = ktr.times_id
where t.performances_id = ${performancesId}) AS kp
left JOIN(
SELECT
kotr.performance_id AS 'performance_id',
kotr.ticket_id,
(sum(kot.number)- sum(kot.refund_number)) AS 'total_sale_general' ,
(sum(kot.price_actual) - sum(kot.price_refund)) AS 'total_sale_price',
sum(kot.refund_number) as 'total_refund_general',
sum(kot.price_refund) as 'total_refund_price',
sum(case when kotr.is_member = 1 then kot.number else 0 end) total_member_number
FROM
kylin_order_ticket_relations kotr
inner join kylin_order_tickets AS kot on kotr.order_id = kot.order_tickets_id
inner JOIN kylin_order_ticket_status AS kots ON kots.order_id = kot.order_tickets_id
WHERE 1>0 and kotr.performance_id = ${performancesId}
and kots.`status` in(1,3,4) and kot.coupon_type ='no'
group by kotr.performance_id,kotr.ticket_id
) AS ot ON (ot.performance_id = kp.performances_id and ot.ticket_id = kp.ticket_id)
left JOIN(
SELECT
kotr.performance_id,kotr.ticket_id,
sum(ifnull(kot.number,0)) total_paying_number
FROM
kylin_order_ticket_relations kotr
inner join kylin_order_tickets AS kot on kotr.order_id = kot.order_tickets_id
inner JOIN kylin_order_ticket_status AS kots ON kots.order_id = kot.order_tickets_id
WHERE 1>0 and kotr.performance_id = ${performancesId}
and kots.`status` = 0 and kot.coupon_type ='no'
group by kotr.performance_id,kotr.ticket_id
) AS otp ON (otp.performance_id = kp.performances_id and otp.ticket_id = kp.ticket_id)
left join kylin_tickets kt on kt.tickets_id = kp.ticket_id
left join kylin_ticket_status kts on kts.ticket_id = kp.ticket_id
inner JOIN(
select t.performance_id,count(t.user_id) as 'total_buy_users' from(
SELECT
kotr.performance_id,
kot.user_id
FROM
kylin_order_ticket_relations kotr
SELECT kp.performances_id,
kt.tickets_id,
kt.title,
kt.price,
kt.type,
kt.use_start,
IFNULL(kts.total_general, 0) AS 'total_general',
IFNULL(ot.total_sale_general, 0) AS 'sale_general',
IFNULL((kts.total_general - IFNULL(ot.total_sale_general,0) - IFNULL(otp.total_paying_number , 0)),0) AS 'surplus_general', AS 'surplus_general',
IFNULL(ot.total_sale_price, 0) AS 'total_sale_price',
IFNULL(kts.total_exchange, 0) AS 'total_exchange',
IFNULL(ot.total_refund_general, 0) AS 'total_refund_general',
IFNULL(ot.total_refund_price, 0) AS 'total_refund_price',
IFNULL(ot.total_member_number, 0) AS 'total_member_number',
IFNULL(otp.total_paying_number, 0) AS 'total_paying_number',
IFNULL(ut.total_buy_users, 0) AS 'total_buy_users'
FROM (select t.performances_id, ktr.ticket_id
from kylin_performances t
inner join kylin_ticket_time_relation kttr
on t.performances_id = kttr.performance_id
inner join kylin_ticket_relations ktr on kttr.times_id = ktr.times_id
where t.performances_id = ${performancesId}) AS kp
left JOIN(
SELECT kotr.performance_id AS 'performance_id',
kotr.ticket_id,
(sum(kot.number) - sum(kot.refund_number)) AS 'total_sale_general',
(sum(kot.price_actual) - sum(kot.price_refund)) AS 'total_sale_price',
sum(kot.refund_number) as 'total_refund_general',
sum(kot.price_refund) as 'total_refund_price',
sum(case when kotr.is_member = 1 then kot.number else 0 end) total_member_number
FROM kylin_order_ticket_relations kotr
inner join kylin_order_tickets AS kot on kotr.order_id = kot.order_tickets_id
inner JOIN kylin_order_ticket_status AS kots ON kots.order_id = kot.order_tickets_id
WHERE 1 > 0
and kotr.performance_id = ${performancesId}
and kots.`status` in (1, 3, 4)
and kot.coupon_type = 'no'
group by kotr.performance_id, kotr.ticket_id
) AS ot ON (ot.performance_id = kp.performances_id and ot.ticket_id = kp.ticket_id)
left JOIN(
SELECT kotr.performance_id,
kotr.ticket_id,
sum(ifnull(kot.number, 0)) total_paying_number
FROM kylin_order_ticket_relations kotr
inner join kylin_order_tickets AS kot on kotr.order_id = kot.order_tickets_id
inner JOIN kylin_order_ticket_status AS kots ON kots.order_id = kot.order_tickets_id
WHERE 1 > 0
and kotr.performance_id = ${performancesId}
and kots.`status` = 0
and kot.coupon_type = 'no'
group by kotr.performance_id, kotr.ticket_id
) AS otp ON (otp.performance_id = kp.performances_id and otp.ticket_id = kp.ticket_id)
left join kylin_tickets kt on kt.tickets_id = kp.ticket_id
left join kylin_ticket_status kts on kts.ticket_id = kp.ticket_id
inner JOIN(
select t.performance_id, count(t.user_id) as 'total_buy_users'
from (
SELECT kotr.performance_id,
kot.user_id
FROM kylin_order_ticket_relations kotr
inner join kylin_order_tickets AS kot on kotr.order_id = kot.order_tickets_id
inner JOIN kylin_order_ticket_status AS kots ON kots.order_id = kot.order_tickets_id
WHERE kotr.performance_id = ${performancesId} and (kots.`status` = 0 OR kots.`status` = 1)
group by kotr.performance_id,kot.user_id
) t
) AS ut ON ut.performance_id = kp.performances_id
WHERE kotr.performance_id = ${performancesId}
and (kots.`status` = 0 OR kots.`status` = 1)
group by kotr.performance_id, kot.user_id
) t
) AS ut ON ut.performance_id = kp.performances_id
</select>
<select id="getPerformanceSponsorList" resultMap="performanceSponsorDaoResult">
select distinct kp.sponsor_id, kp.sponsor, kp.sponsor_type
......
......@@ -20,6 +20,7 @@ public class KylinUtils {
@Autowired
private RedisUtil redisUtil;
/**
* @param userId 用户id
* @param type 1新增 2修改
......@@ -31,13 +32,13 @@ public class KylinUtils {
KylinOrderListVo voItem = new KylinOrderListVo();
KylinOrderTicketVo data;
if (dataSingle == null) {
data = (KylinOrderTicketVo)redisUtil.get(KylinRedisConst.ORDER + orderId);
data = (KylinOrderTicketVo) redisUtil.get(KylinRedisConst.ORDER + orderId);
} else {
data = dataSingle;
}
BeanUtils.copyProperties(data, voItem);
List<KylinOrderListVo> redisData = (List<KylinOrderListVo>) redisUtil.get(KylinRedisConst.ORDER_LIST + userId);
if(type == 1) {
if (type == 1) {
redisVo.add(voItem);
if (redisData.size() > 0) {
if (redisData.get(0).getOrderTicketsId().equals(orderId)) {
......@@ -63,7 +64,7 @@ public class KylinUtils {
if (redisVo.size() == 0) {
vo.add(voItem);
}
redisUtil.set(KylinRedisConst.ORDER_LIST + userId,vo);
redisUtil.set(KylinRedisConst.ORDER_LIST + userId, vo);
return true;
case 2:
for (int i = 0; i < redisVo.size(); i++) {
......@@ -76,7 +77,7 @@ public class KylinUtils {
vo.add(redisVo.get(i));
}
}
redisUtil.set(KylinRedisConst.ORDER_LIST + userId,vo);
redisUtil.set(KylinRedisConst.ORDER_LIST + userId, vo);
return true;
default:
return false;
......@@ -116,56 +117,65 @@ public class KylinUtils {
String ticketIdKey = redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + ticketId;
String ticketUseTimeKey = ticketIdKey + ":" + KylinRedisConst.USE_TIME;
redisUtil.set(ticketUseTimeKey, useTime);
if (buyCount > 0) {
redisUtil.incr(ticketIdKey, buyCount);
if (1 == ticketType) {
int count = 0;
for (int i = 0; i < allTicketId.get(useTime).size(); i++) {
String item = allTicketId.get(useTime).get(i);
if (allTicketId.get(useTime).size() == 1) {
redisUtil.incr(performanceIdKey, buyCount);
break;
}
if (null == redisUtil.get(redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + item)) {
redisUtil.set(redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + item, 0);
}
if (i == 0) {
count = (int) redisUtil.get(redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + item);
} else {
if (count != (int) redisUtil.get(redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + item)) {
redisUtil.incr(performanceIdKey, buyCount);
break;
}
}
}
} else {
redisUtil.incr(performanceIdKey, buyCount);
}
redisUtil.incr(performanceIdKey, buyCount);
} else {
redisUtil.decr(ticketIdKey, Math.abs(buyCount));
if (1 == ticketType) {
int count = 0;
for (int i = 0; i < allTicketId.get(useTime).size(); i++) {
String item = allTicketId.get(useTime).get(i);
if (allTicketId.get(useTime).size() == 1) {
redisUtil.decr(performanceIdKey, Math.abs(buyCount));
break;
}
if (null == redisUtil.get(redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + item)) {
redisUtil.set(redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + item, 0);
}
if (i == 0) {
count = (int) redisUtil.get(redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + item);
} else {
if (count != (int) redisUtil.get(redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + item)) {
redisUtil.decr(performanceIdKey, Math.abs(buyCount));
break;
}
}
}
} else {
redisUtil.decr(performanceIdKey, Math.abs(buyCount));
}
redisUtil.decr(performanceIdKey, Math.abs(buyCount));
}
// if (buyCount > 0) {
// redisUtil.incr(ticketIdKey, buyCount);
// if (1 == ticketType) {
// int count = 0;
// for (int i = 0; i < allTicketId.get(useTime).size(); i++) {
// String item = allTicketId.get(useTime).get(i);
// if (allTicketId.get(useTime).size() == 1) {
// redisUtil.incr(performanceIdKey, buyCount);
// break;
// }
// if (null == redisUtil.get(redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + item)) {
// redisUtil.set(redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + item, 0);
// }
// if (i == 0) {
// count = (int) redisUtil.get(redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + item);
// } else {
// if (count != (int) redisUtil.get(redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + item)) {
// redisUtil.incr(performanceIdKey, buyCount);
// break;
// }
// }
// }
// } else {
// redisUtil.incr(performanceIdKey, buyCount);
// }
// } else {
// redisUtil.decr(ticketIdKey, Math.abs(buyCount));
// if (1 == ticketType) {
// int count = 0;
// for (int i = 0; i < allTicketId.get(useTime).size(); i++) {
// String item = allTicketId.get(useTime).get(i);
// if (allTicketId.get(useTime).size() == 1) {
// redisUtil.decr(performanceIdKey, Math.abs(buyCount));
// break;
// }
// if (null == redisUtil.get(redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + item)) {
// redisUtil.set(redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + item, 0);
// }
// if (i == 0) {
// count = (int) redisUtil.get(redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + item);
// } else {
// if (count != (int) redisUtil.get(redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + item)) {
// redisUtil.decr(performanceIdKey, Math.abs(buyCount));
// break;
// }
// }
// }
// } else {
// redisUtil.decr(performanceIdKey, Math.abs(buyCount));
// }
// }
}
}
......@@ -55,7 +55,7 @@ public class KylinOrderTicketsController {
public ResponseDto<PayResultVo> payAgain(@RequestBody @Valid PayAgainParam payAgainParam) {
PayResultVo vo = orderTicketsService.payAgain(payAgainParam).getData();
if (null == vo) {
return ResponseDto.failure(ErrorMapping.get("20003"));
return ResponseDto.failure("订单已失效");
} else {
return ResponseDto.success(vo);
}
......
......@@ -10,6 +10,7 @@ import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.kylin.dto.param.CheckPerformanceRelationParam;
import com.liquidnet.service.kylin.dto.param.KylinStationCheckOrderParam;
import com.liquidnet.service.kylin.dto.param.KylinStationUploadParam;
import com.liquidnet.service.kylin.dto.vo.middle.KylinTicketTimesVo;
import com.liquidnet.service.kylin.dto.vo.middle.KylinTicketVo;
import com.liquidnet.service.kylin.dto.vo.mongo.*;
import com.liquidnet.service.kylin.dto.vo.returns.*;
......@@ -186,73 +187,89 @@ public class KylinStationController {
// 转换订单票明细结构为Map<performanceId, List<KylinOrderTicketEntitiesVo>>
Map<String, List<KylinOrderTicketEntitiesVo>> oteVoMap = oteVoList.stream().collect(Collectors.groupingBy(KylinOrderTicketEntitiesVo::getPerformanceId));
// 查取订单对应票种
Query performanceTicketVoQuery = Query.query(Criteria.where("ticketsId").in(
oteVoList.stream().filter(distinctByKey(KylinOrderTicketEntitiesVo::getTicketId)).map(KylinOrderTicketEntitiesVo::getTicketId).toArray()
));
List<KylinTicketVo> performanceTicketVoList = mongoTemplate.find(performanceTicketVoQuery, KylinTicketVo.class, KylinPerformanceVo.class.getSimpleName());
log.debug("performanceTicketVoList:{}", JsonUtils.toJson(performanceTicketVoList));
// 转换票种信息结构为Map<ticketsId, ticketVo>
Map<String, KylinTicketVo> performanceTicketMap = performanceTicketVoList.stream().collect(Collectors.toMap(KylinTicketVo::getTicketsId, Function.identity(), (k1, k2) -> k2));
log.debug("performanceTicketMap:{}", JsonUtils.toJson(performanceTicketMap));
// // 查取订单对应票种
// Query performanceTicketVoQuery = Query.query(Criteria.where("ticketsId").in(
// oteVoList.stream().filter(distinctByKey(KylinOrderTicketEntitiesVo::getTicketId)).map(KylinOrderTicketEntitiesVo::getTicketId).toArray()
// ));
// List<KylinTicketVo> performanceTicketVoList = mongoTemplate.find(performanceTicketVoQuery, KylinTicketVo.class, KylinPerformanceVo.class.getSimpleName());
// log.debug("performanceTicketVoList:{}", JsonUtils.toJson(performanceTicketVoList));
// // 转换票种信息结构为Map<ticketsId, ticketVo>
// Map<String, KylinTicketVo> performanceTicketMap = performanceTicketVoList.stream().collect(Collectors.toMap(KylinTicketVo::getTicketsId, Function.identity(), (k1, k2) -> k2));
// log.debug("performanceTicketMap:{}", JsonUtils.toJson(performanceTicketMap));
// 转换Map<performanceId, canDownTime>
Map<String, String> performanceRelationMap = performanceRelationList.stream().collect(Collectors.toMap(CheckPerformanceRelationParam::getPerformanceId, CheckPerformanceRelationParam::getCanDownTime));
log.debug("performanceRelationMap:{}", JsonUtils.toJson(performanceRelationMap));
// 补充演出列表票种统计
// 整合演出列表票种统计
for (KylinStationPerformanceVo r : voList) {
// 演出的所有订单票明细
List<KylinOrderTicketEntitiesVo> performanceTicketEntitiesVoList = oteVoMap.get(r.getPerformancesId());
if (!CollectionUtils.isEmpty(performanceTicketEntitiesVoList)) {
// 订单票明细按票种分组
Map<String, List<KylinOrderTicketEntitiesVo>> performanceTicketEntitiesVoMap =
performanceTicketEntitiesVoList.stream().collect(Collectors.groupingBy(KylinOrderTicketEntitiesVo::getTicketId));
List<KylinStationTicketVo> ticketVoList = new ArrayList<>();
BigDecimal priceSum = BigDecimal.ZERO;
int number = 0, checkedNum = 0, remainderNum = 0;
for (Map.Entry<String, List<KylinOrderTicketEntitiesVo>> entry : performanceTicketEntitiesVoMap.entrySet()) {
KylinTicketVo ticketVo = performanceTicketMap.get(entry.getKey());
KylinStationTicketVo stationTicketVo = KylinStationTicketVo.getNew();
stationTicketVo.setTicketId(ticketVo.getTicketsId());
stationTicketVo.setTitle(ticketVo.getTitle());
stationTicketVo.setPrice(ticketVo.getPrice());
stationTicketVo.setUseStart(ticketVo.getUseStart());
stationTicketVo.setUseEnd(ticketVo.getUseEnd());
List<KylinOrderTicketEntitiesVo> subPerformanceTicketEntitiesVoList = entry.getValue();
// 订单票明细按出票状态分组
Map<Integer, List<KylinOrderTicketEntitiesVo>> subStatusPerformanceTicketEntitiesVoMap
= subPerformanceTicketEntitiesVoList.stream().collect(Collectors.groupingBy(KylinOrderTicketEntitiesVo::getStatus));
stationTicketVo.setNumber(subPerformanceTicketEntitiesVoList.size());
stationTicketVo.setPriceSum(stationTicketVo.getPrice().multiply(BigDecimal.valueOf(stationTicketVo.getNumber())));
List<KylinOrderTicketEntitiesVo> checkedEntitiesVoList = subStatusPerformanceTicketEntitiesVoMap.get(1);
stationTicketVo.setCheckedNum(CollectionUtils.isEmpty(checkedEntitiesVoList) ? 0 : checkedEntitiesVoList.size());
List<KylinOrderTicketEntitiesVo> remainderEntitiesVoList = subStatusPerformanceTicketEntitiesVoMap.get(0);
stationTicketVo.setRemainderNum(CollectionUtils.isEmpty(remainderEntitiesVoList) ? 0 : remainderEntitiesVoList.size());
number += stationTicketVo.getNumber();
checkedNum += stationTicketVo.getCheckedNum();
remainderNum += stationTicketVo.getRemainderNum();
priceSum = priceSum.add(stationTicketVo.getPriceSum());
ticketVoList.add(stationTicketVo);
r.setCanDownTime(performanceRelationMap.get(r.getPerformancesId()));
try {
// 演出的所有订单票明细
List<KylinOrderTicketEntitiesVo> performanceTicketEntitiesVoList = oteVoMap.get(r.getPerformancesId());
if (!CollectionUtils.isEmpty(performanceTicketEntitiesVoList)) {
// 提取演出对应票种信息
List<KylinTicketVo> performanceTicketVoList = new ArrayList<>();
List<KylinTicketTimesVo> ticketTimeList = r.getTicketTimeList();
ticketTimeList.forEach(tt -> {
performanceTicketVoList.addAll(tt.getTicketList());
});
// 转换票种信息结构为Map<ticketsId, ticketVo>
Map<String, KylinTicketVo> performanceTicketMap = performanceTicketVoList.stream().collect(Collectors.toMap(KylinTicketVo::getTicketsId, Function.identity(), (k1, k2) -> k2));
log.debug("performanceTicketMap:{}", JsonUtils.toJson(performanceTicketMap));
// 订单票明细按票种分组
Map<String, List<KylinOrderTicketEntitiesVo>> performanceTicketEntitiesVoMap =
performanceTicketEntitiesVoList.stream().collect(Collectors.groupingBy(KylinOrderTicketEntitiesVo::getTicketId));
List<KylinStationTicketVo> ticketVoList = new ArrayList<>();
BigDecimal priceSum = BigDecimal.ZERO;
int number = 0, checkedNum = 0, remainderNum = 0;
for (Map.Entry<String, List<KylinOrderTicketEntitiesVo>> entry : performanceTicketEntitiesVoMap.entrySet()) {
KylinTicketVo ticketVo = performanceTicketMap.get(entry.getKey());
KylinStationTicketVo stationTicketVo = KylinStationTicketVo.getNew();
stationTicketVo.setTicketId(ticketVo.getTicketsId());
stationTicketVo.setTitle(ticketVo.getTitle());
stationTicketVo.setPrice(ticketVo.getPrice());
stationTicketVo.setUseStart(ticketVo.getUseStart());
stationTicketVo.setUseEnd(ticketVo.getUseEnd());
List<KylinOrderTicketEntitiesVo> subPerformanceTicketEntitiesVoList = entry.getValue();
// 订单票明细按出票状态分组
Map<Integer, List<KylinOrderTicketEntitiesVo>> subStatusPerformanceTicketEntitiesVoMap
= subPerformanceTicketEntitiesVoList.stream().collect(Collectors.groupingBy(KylinOrderTicketEntitiesVo::getStatus));
stationTicketVo.setNumber(subPerformanceTicketEntitiesVoList.size());
stationTicketVo.setPriceSum(stationTicketVo.getPrice().multiply(BigDecimal.valueOf(stationTicketVo.getNumber())));
List<KylinOrderTicketEntitiesVo> checkedEntitiesVoList = subStatusPerformanceTicketEntitiesVoMap.get(1);
stationTicketVo.setCheckedNum(CollectionUtils.isEmpty(checkedEntitiesVoList) ? 0 : checkedEntitiesVoList.size());
List<KylinOrderTicketEntitiesVo> remainderEntitiesVoList = subStatusPerformanceTicketEntitiesVoMap.get(0);
stationTicketVo.setRemainderNum(CollectionUtils.isEmpty(remainderEntitiesVoList) ? 0 : remainderEntitiesVoList.size());
number += stationTicketVo.getNumber();
checkedNum += stationTicketVo.getCheckedNum();
remainderNum += stationTicketVo.getRemainderNum();
priceSum = priceSum.add(stationTicketVo.getPriceSum());
ticketVoList.add(stationTicketVo);
}
r.setPriceSum(priceSum);
r.setNumber(number);
r.setCheckedNum(checkedNum);
r.setRemainderNum(remainderNum);
r.setTicketVoList(ticketVoList);
}
r.setPriceSum(priceSum);
r.setNumber(number);
r.setCheckedNum(checkedNum);
r.setRemainderNum(remainderNum);
r.setTicketVoList(ticketVoList);
r.setCanDownTime(performanceRelationMap.get(r.getPerformancesId()));
} catch (Exception e) {
log.error("验票:整合票种统计异常[station/performances],performancesId:{}", r.getPerformancesId(), e);
}
r.setTicketTimeList(null);
}
}
}
} catch (Exception e) {
log.error("验票:查取演出列表异常:/station/performances/?", e);
log.error("验票:查取演出列表异常[station/performances]", e);
}
PageInfo<KylinStationPerformanceVo> voPageInfo = PageInfo.of(voList);
voPageInfo.setTotal(count);
......@@ -286,15 +303,13 @@ public class KylinStationController {
return ResponseDto.failure(ErrorMapping.get("20608"));
}
List<KylinStationCheckOrderVo> checkOrderVos;
// 查取演出对应的订单票明细
Query orderTicketEntitiesVoQuery = Query.query(Criteria.where("performanceId").is(performanceId).and("isPayment").is(1));
checkOrderVos = mongoTemplate.find(orderTicketEntitiesVoQuery, KylinStationCheckOrderVo.class, KylinOrderTicketEntitiesVo.class.getSimpleName());
List<KylinStationCheckOrderVo> checkOrderVos = mongoTemplate.find(orderTicketEntitiesVoQuery, KylinStationCheckOrderVo.class, KylinOrderTicketEntitiesVo.class.getSimpleName());
Query query = Query.query(Criteria.where("orderTicketsId").in(
checkOrderVos.stream().map(KylinStationCheckOrderVo::getOrderId).toArray()
));
query.fields().include("orderTicketsId").include("qrCode");
// 查取订单信息(orderTicketsId,userMobile,userName,qrCode)
Query query = Query.query(Criteria.where("orderTicketsId").in(checkOrderVos.stream().map(KylinStationCheckOrderVo::getOrderId).toArray()));
query.fields().include("orderTicketsId").include("userMobile").include("userName").include("qrCode");
List<KylinOrderTicketVo> orderTicketVoList = mongoTemplate.find(query, KylinOrderTicketVo.class, KylinOrderTicketVo.class.getSimpleName());
for (KylinOrderTicketVo t : orderTicketVoList) {
......@@ -312,11 +327,19 @@ public class KylinStationController {
// 查取演出信息
KylinStationPerformanceVo performanceVo = mongoTemplate.findOne(Query.query(Criteria.where("performancesId").is(performanceId)),
KylinStationPerformanceVo.class, KylinPerformanceVo.class.getSimpleName());
// 查取订单对应票种
Query performanceTicketVoQuery = Query.query(Criteria.where("ticketsId").in(
checkOrderVos.stream().filter(distinctByKey(KylinStationCheckOrderVo::getTicketId)).map(KylinStationCheckOrderVo::getTicketId).toArray()
));
List<KylinTicketVo> performanceTicketVoList = mongoTemplate.find(performanceTicketVoQuery, KylinTicketVo.class, KylinTicketVo.class.getSimpleName());
// // 查取订单对应票种
// Query performanceTicketVoQuery = Query.query(Criteria.where("ticketsId").in(
// checkOrderVos.stream().filter(distinctByKey(KylinStationCheckOrderVo::getTicketId)).map(KylinStationCheckOrderVo::getTicketId).toArray()
// ));
// List<KylinTicketVo> performanceTicketVoList = mongoTemplate.find(performanceTicketVoQuery, KylinTicketVo.class, KylinTicketVo.class.getSimpleName());
// 提取演出对应票种信息
List<KylinTicketVo> performanceTicketVoList = new ArrayList<>();
List<KylinTicketTimesVo> ticketTimeList = performanceVo.getTicketTimeList();
ticketTimeList.forEach(tt -> {
performanceTicketVoList.addAll(tt.getTicketList());
});
List<KylinStationTicketVo> ticketVoList = new ArrayList<>();
for (KylinTicketVo r : performanceTicketVoList) {
KylinStationTicketVo stationTicketVo = KylinStationTicketVo.getNew();
......@@ -328,6 +351,7 @@ public class KylinStationController {
ticketVoList.add(stationTicketVo);
}
performanceVo.setTicketTimeList(null);
performanceVo.setTicketVoList(ticketVoList);
vo.setPerformanceVo(performanceVo);
}
......@@ -376,22 +400,22 @@ public class KylinStationController {
return ResponseDto.failure(ErrorMapping.get("20608"));
}
List<KylinStationCheckOrderVo> checkOrderVos;
// 查取演出对应的订单票明细
Query orderTicketEntitiesVoQuery = Query.query(
Criteria.where("performanceId").is(performanceId).and("updatedAt").gte(latestUpdateAt)
);
checkOrderVos = mongoTemplate.find(orderTicketEntitiesVoQuery, KylinStationCheckOrderVo.class, KylinOrderTicketEntitiesVo.class.getSimpleName());
Query query = Query.query(Criteria.where("orderTicketsId").in(
checkOrderVos.stream().map(KylinStationCheckOrderVo::getOrderId).toArray()
));
query.fields().include("orderTicketsId").include("qrCode");
Query orderTicketEntitiesVoQuery = Query.query(Criteria.where("performanceId").is(performanceId).and("updatedAt").gte(latestUpdateAt));
List<KylinStationCheckOrderVo> checkOrderVos = mongoTemplate.find(orderTicketEntitiesVoQuery, KylinStationCheckOrderVo.class, KylinOrderTicketEntitiesVo.class.getSimpleName());
// 查取订单信息(orderTicketsId,userMobile,userName,qrCode)
Query query = Query.query(Criteria.where("orderTicketsId").in(checkOrderVos.stream().map(KylinStationCheckOrderVo::getOrderId).toArray()));
query.fields().include("orderTicketsId").include("userMobile").include("userName").include("qrCode");
List<KylinOrderTicketVo> orderTicketVoList = mongoTemplate.find(query, KylinOrderTicketVo.class, KylinOrderTicketVo.class.getSimpleName());
for (KylinOrderTicketVo t : orderTicketVoList) {
for (KylinStationCheckOrderVo r : checkOrderVos) {
if (r.getOrderId().equals(t.getOrderTicketsId())) r.setQrCode(t.getQrCode());
if (r.getOrderId().equals(t.getOrderTicketsId())) {
r.setQrCode(t.getQrCode());
r.setUserMobile(t.getUserMobile());
r.setUserName(t.getUserName());
}
}
}
KylinStationCheckRefreshVo vo = KylinStationCheckRefreshVo.getNew();
......@@ -400,11 +424,19 @@ public class KylinStationController {
// 查取演出信息
KylinStationPerformanceVo performanceVo = mongoTemplate.findOne(Query.query(Criteria.where("performancesId").is(performanceId)),
KylinStationPerformanceVo.class, KylinPerformanceVo.class.getSimpleName());
// 查取订单对应票种
Query performanceTicketVoQuery = Query.query(Criteria.where("ticketsId").in(
checkOrderVos.stream().filter(distinctByKey(KylinStationCheckOrderVo::getTicketId)).map(KylinStationCheckOrderVo::getTicketId).toArray()
));
List<KylinTicketVo> performanceTicketVoList = mongoTemplate.find(performanceTicketVoQuery, KylinTicketVo.class, KylinTicketVo.class.getSimpleName());
// // 查取订单对应票种
// Query performanceTicketVoQuery = Query.query(Criteria.where("ticketsId").in(
// checkOrderVos.stream().filter(distinctByKey(KylinStationCheckOrderVo::getTicketId)).map(KylinStationCheckOrderVo::getTicketId).toArray()
// ));
// List<KylinTicketVo> performanceTicketVoList = mongoTemplate.find(performanceTicketVoQuery, KylinTicketVo.class, KylinTicketVo.class.getSimpleName());
// 提取演出对应票种信息
List<KylinTicketVo> performanceTicketVoList = new ArrayList<>();
List<KylinTicketTimesVo> ticketTimeList = performanceVo.getTicketTimeList();
ticketTimeList.forEach(tt -> {
performanceTicketVoList.addAll(tt.getTicketList());
});
List<KylinStationTicketVo> ticketVoList = new ArrayList<>();
for (KylinTicketVo r : performanceTicketVoList) {
KylinStationTicketVo stationTicketVo = KylinStationTicketVo.getNew();
......@@ -416,6 +448,7 @@ public class KylinStationController {
ticketVoList.add(stationTicketVo);
}
performanceVo.setTicketTimeList(null);
performanceVo.setTicketVoList(ticketVoList);
vo.setPerformanceVo(performanceVo);
}
......
......@@ -921,7 +921,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
DateUtil.parse(item.getOverdueAt(), "yyyy-MM-dd HH:mm:ss"),
DateUtil.parse(DateUtil.getNowTime(), "yyyy-MM-dd HH:mm:ss")
));
if(item.getRestTime()<=0L){
if (item.getRestTime() <= 0L) {
item.setRestTime(0L);
}
} catch (Exception e) {
......@@ -951,6 +951,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
@Override
public OrderDetailsVo orderDetails(String orderId) {
log.error("调用订单详情");
OrderDetailsVo vo = new OrderDetailsVo();
try {
String uid = CurrentUtil.getCurrentUid();
......@@ -1013,7 +1014,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
DateUtil.parse(orderTicketVo.getOverdueAt(), "yyyy-MM-dd HH:mm:ss"),
DateUtil.parse(DateUtil.getNowTime(), "yyyy-MM-dd HH:mm:ss")
));
if(vo.getRestTime()<=0L){
if (vo.getRestTime() <= 0L) {
vo.setRestTime(0L);
}
} else {
......@@ -1032,7 +1033,7 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
vo.setOrderTicketVo(orderTicketVo);
vo.setEnterDescribe(dataUtils.getEnterInfo("1"));
}
log.info(UserPathDto.setData("订单列表", orderId, vo));
log.info(UserPathDto.setData("订单详情", orderId, vo));
return vo;
} catch (Exception e) {
e.printStackTrace();
......@@ -1190,12 +1191,22 @@ public class KylinOrderTicketsServiceImpl extends ServiceImpl<KylinOrderTicketsM
public ResponseDto<Integer> orderUnPayCount() {
String uid = CurrentUtil.getCurrentUid();
List<KylinOrderListVo> voList = dataUtils.getOrderList(uid);
Integer unPayCount = 0;
int unPayCount = 0;
for (KylinOrderListVo item : voList) {
if (item.getStatus() == 0) {
unPayCount += 1;
}
if (item.getStatus().equals(KylinTableStatusConst.ORDER_STATUS0)) {
item.setRestTime(DateUtil.intervalSeconds(
DateUtil.parse(item.getOverdueAt(), "yyyy-MM-dd HH:mm:ss"),
DateUtil.parse(DateUtil.getNowTime(), "yyyy-MM-dd HH:mm:ss")
));
if (item.getRestTime() <= 0L) {
item.setRestTime(0L);
} else {
unPayCount += 1;
}
} else {
item.setRestTime(0L);
}
}
return ResponseDto.success(unPayCount);
}
......
......@@ -211,9 +211,13 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
PerformancePartnerVo data = mongoTemplate.findOne(
Query.query(Criteria.where("performancesId").is(performancesId)), PerformancePartnerVo.class, PerformancePartnerVo.class.getSimpleName()
);
KylinPerformanceStatus performanceStatus = performanceStatusMapper.selectOne(new UpdateWrapper<KylinPerformanceStatus>().eq("performance_id", performancesId));
if (data == null) {
return ResponseDto.failure(ErrorMapping.get(20104));
}
if(null!=performanceStatus) {
data.setStatus(performanceStatus.getStatus());
}
return ResponseDto.success(data);
}
......@@ -229,7 +233,7 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
} else if (performanceStatus.getStatus() == 1 || performanceStatus.getStatus() == 3 || performanceStatus.getStatus() == 6 || performanceStatus.getStatus() == 7 || performanceStatus.getStatus() == 8 || performanceStatus.getStatus() == 9 ) {// 修改
result = updateStep2(step2Param);
}else if(performanceStatus.getStatus() == 10){
result = ResponseDto.success("演出已结束不可修改");
result = ResponseDto.failure("演出已结束不可修改");
}
}
return result;
......@@ -406,6 +410,7 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
ticketSellTime.setTimeEnd(DateUtil.Formatter.yyyyMMddHHmmss.parse(ticketItem.getTimeEnd()));
ticketSellTime.setTimeStart(DateUtil.Formatter.yyyyMMddHHmmss.parse(ticketItem.getTimeStart()));
ticketSellTime.setAdvanceMinuteMember(null);
ticketSellTime.setPayCountdownMinute(kylinPerformanceMisVo.getPayCountdownMinute());
//修改 价格
ticketSellTime.setPrice(ticketItem.getPrice());
ticketSellTime.setPriceDiscountMember(null);
......@@ -454,6 +459,13 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
PerformanceStep2Param performanceStep2Param = new PerformanceStep2Param();
BeanUtils.copyProperties(data, performanceStep2Param);
KylinPerformanceStatus performanceStatus = performanceStatusMapper.selectOne(new UpdateWrapper<KylinPerformanceStatus>().eq("performance_id", performancesId));
if(null!=performanceStatus) {
performanceStep2Param.setStatus(performanceStatus.getStatus());
}else{
performanceStep2Param.setStatus(-1);
}
performanceStep2Param.setTicketTimes(ticketTimesTicketCreatePartnerVoList);
return ResponseDto.success(performanceStep2Param);
}
......@@ -514,7 +526,7 @@ public class KylinPerformancesPartnerServiceImpl extends ServiceImpl<KylinPerfor
KylinPerformanceStatus performanceStatusData = performanceStatusMapper.selectOne(new UpdateWrapper<KylinPerformanceStatus>().eq("performance_id", performancesId));
if (performanceStatusData.getStatus() >= 3 && performanceStatusData.getStatus() != 4 && performanceStatusData.getStatus() != 7) {//未提审||被拒绝
if (performanceStatusData.getStatus() >= 3 && performanceStatusData.getStatus() != 4 && performanceStatusData.getStatus() != 7 && performanceStatusData.getStatus() != 10) {//未提审||被拒绝
LocalDateTime updatedAt = LocalDateTime.now();
KylinPerformanceStatus performanceStatus = new KylinPerformanceStatus();
performanceStatus.setStatus(7);
......
......@@ -309,77 +309,29 @@ public class DataUtils {
allTicketId.put(timeItem.getUseStart(), ticketList);
}
System.out.println(" PERFORMANCE_ID = "+performanceId);
if (0 == isTrueName) {
redisKey = KylinRedisConst.USERID_BUY_INFO + userId;
} else {
redisKey = KylinRedisConst.IDCARD_BUY_INFO + idCard;
}
System.out.println(" REDIS KEY= "+redisKey);
String performanceIdKey = redisKey + ":" + KylinRedisConst.PERFORMANCE_ID + ":" + performanceId;
String ticketIdKey = redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + ticketId;
String ticketUseTimeKey = ticketIdKey + ":" + KylinRedisConst.USE_TIME;
System.out.println("PERFORMANCEID REDIS KEY = "+performanceIdKey);
System.out.println("TICKETID REDIS KEY = "+ticketIdKey);
redisUtil.set(ticketUseTimeKey, useTime);
if (buyCount > 0) {
redisUtil.incr(ticketIdKey, buyCount);
if (1 == ticketType) {
int count = 0;
for (int i = 0; i < allTicketId.get(useTime).size(); i++) {
String item = allTicketId.get(useTime).get(i);
if (allTicketId.get(useTime).size() == 1) {
redisUtil.incr(performanceIdKey, buyCount);
break;
}
if (null == redisUtil.get(redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + item)) {
redisUtil.set(redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + item, 0);
}
if (i == 0) {
count = (int) redisUtil.get(redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + item);
} else {
if (count != (int) redisUtil.get(redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + item)) {
redisUtil.incr(performanceIdKey, buyCount);
break;
}
}
}
} else {
System.out.println("BUY_COUNT = "+buyCount);
redisUtil.incr(performanceIdKey, buyCount);
}
} else {
redisUtil.decr(ticketIdKey, Math.abs(buyCount));
if (1 == ticketType) {
int count = 0;
for (int i = 0; i < allTicketId.get(useTime).size(); i++) {
String item = allTicketId.get(useTime).get(i);
if (allTicketId.get(useTime).size() == 1) {
redisUtil.decr(performanceIdKey, Math.abs(buyCount));
break;
}
if (null == redisUtil.get(redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + item)) {
redisUtil.set(redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + item, 0);
}
if (i == 0) {
count = (int) redisUtil.get(redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + item);
} else {
if (count != (int) redisUtil.get(redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + item)) {
redisUtil.decr(performanceIdKey, Math.abs(buyCount));
break;
}
}
}
} else {
redisUtil.decr(performanceIdKey, Math.abs(buyCount));
}
redisUtil.incr(performanceIdKey, buyCount);
}else{
redisUtil.decr(ticketIdKey, buyCount);
redisUtil.decr(performanceIdKey, buyCount);
}
}
// 获取 用户维度 演出购买数量
public int getUserPBuyCount(String userId, String performanceId) {
try {
......@@ -387,6 +339,61 @@ public class DataUtils {
} catch (Exception e) {
return 0;
}
// if (buyCount > 0) {
// redisUtil.incr(ticketIdKey, buyCount);
// if (1 == ticketType) {
// int count = 0;
// for (int i = 0; i < allTicketId.get(useTime).size(); i++) {
// String item = allTicketId.get(useTime).get(i);
// if (allTicketId.get(useTime).size() == 1) {
// redisUtil.incr(performanceIdKey, buyCount);
// break;
// }
// if (null == redisUtil.get(redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + item)) {
// redisUtil.set(redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + item, 0);
// }
// if (i == 0) {
// count = (int) redisUtil.get(redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + item);
// } else {
// if (count != (int) redisUtil.get(redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + item)) {
// redisUtil.incr(performanceIdKey, buyCount);
// break;
// }
// }
// }
// } else {
// System.out.println("BUY_COUNT = "+buyCount);
// redisUtil.incr(performanceIdKey, buyCount);
// for (int i = 0; i < allTicketId.get(useTime).size(); i++) {
// String item = allTicketId.get(useTime).get(i);
// redisUtil.set(redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + item, 0);
// }
// }
// } else {
// redisUtil.decr(ticketIdKey, Math.abs(buyCount));
// if (1 == ticketType) {
// int count = 0;
// for (int i = 0; i < allTicketId.get(useTime).size(); i++) {
// String item = allTicketId.get(useTime).get(i);
// if (allTicketId.get(useTime).size() == 1) {
// redisUtil.decr(performanceIdKey, Math.abs(buyCount));
// break;
// }
// if (null == redisUtil.get(redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + item)) {
// redisUtil.set(redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + item, 0);
// }
// if (i == 0) {
// count = (int) redisUtil.get(redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + item);
// } else {
// if (count != (int) redisUtil.get(redisKey + ":" + KylinRedisConst.TICKET_ID + ":" + item)) {
// redisUtil.decr(performanceIdKey, Math.abs(buyCount));
// break;
// }
// }
// }
// } else {
// redisUtil.decr(performanceIdKey, Math.abs(buyCount));
// }
}
// 获取 用户维度 票种购买数量
......
......@@ -19,7 +19,7 @@
20013=已超过快递票截止时间
20014=快递票未填写收货地址
20015=入场人数量错误
20016=该票种已售罄
20016=库存不足
20017=年龄不符合
20018=下单失败
......
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