202404 足球入场逻辑
This commit is contained in:
@@ -18,12 +18,23 @@ import java.util.Date;
|
||||
* @since 2018-08-06
|
||||
*/
|
||||
public class MemberLessonTicketDetailDTO extends MemberLessonTicket {
|
||||
private Integer id;
|
||||
private VenueLessonDTO venueLesson;
|
||||
private Order order;
|
||||
private Venue venue;
|
||||
private MemberCard memberCard = new MemberCard();
|
||||
private Integer lessonCount;
|
||||
|
||||
@Override
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public VenueLessonDTO getVenueLesson() {
|
||||
return venueLesson;
|
||||
}
|
||||
@@ -63,4 +74,4 @@ public class MemberLessonTicketDetailDTO extends MemberLessonTicket {
|
||||
public void setLessonCount(Integer lessonCount) {
|
||||
this.lessonCount = lessonCount;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,39 @@
|
||||
package com.sv.dto.api;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.sv.entity.MemberLessonTicket;
|
||||
import com.sv.json.LocalTimeSerializer;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalTime;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public class MemberTicketEnterDTO extends MemberLessonTicket {
|
||||
private String venueName;
|
||||
private String lessonName;
|
||||
/**
|
||||
* 上课日期 2018-03-30
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
|
||||
private Date date;
|
||||
|
||||
/**
|
||||
* 课程开始时间 8
|
||||
*/
|
||||
@DateTimeFormat(iso = DateTimeFormat.ISO.TIME)
|
||||
@JsonSerialize(using= LocalTimeSerializer.class)
|
||||
private LocalTime startTime;
|
||||
|
||||
/**
|
||||
* 课程结束时间 12
|
||||
*/
|
||||
@DateTimeFormat(iso = DateTimeFormat.ISO.TIME)
|
||||
@JsonSerialize(using= LocalTimeSerializer.class)
|
||||
private LocalTime endTime;
|
||||
|
||||
// TODO 增加场馆位置信息
|
||||
|
||||
private String mobile;
|
||||
private String errCode;
|
||||
private String msg;
|
||||
@@ -22,14 +49,6 @@ public class MemberTicketEnterDTO extends MemberLessonTicket {
|
||||
this.venueName = venueName;
|
||||
}
|
||||
|
||||
public String getLessonName() {
|
||||
return lessonName;
|
||||
}
|
||||
|
||||
public void setLessonName(String lessonName) {
|
||||
this.lessonName = lessonName;
|
||||
}
|
||||
|
||||
public String getMobile() {
|
||||
return mobile;
|
||||
}
|
||||
@@ -38,6 +57,30 @@ public class MemberTicketEnterDTO extends MemberLessonTicket {
|
||||
this.mobile = mobile;
|
||||
}
|
||||
|
||||
public Date getDate() {
|
||||
return date;
|
||||
}
|
||||
|
||||
public void setDate(Date date) {
|
||||
this.date = date;
|
||||
}
|
||||
|
||||
public LocalTime getStartTime() {
|
||||
return startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(LocalTime startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public LocalTime getEndTime() {
|
||||
return endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(LocalTime endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public List<MemberTicketInviteDTO> getMemberTicketInviteList() {
|
||||
return memberTicketInviteList;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,9 @@ import java.util.Date;
|
||||
public class MemberTicketInvite {
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* ticketId 客户预定的记录id
|
||||
*/
|
||||
private Integer ownerId;
|
||||
|
||||
private Integer memberId;
|
||||
@@ -135,4 +138,4 @@ public class MemberTicketInvite {
|
||||
public void setMobile(String mobile) {
|
||||
this.mobile = mobile;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
DROP TABLE IF EXISTS `sv_member_lesson_ticket_invite`;
|
||||
CREATE TABLE `sv_member_lesson_ticket_invite` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`owner_id` tinyint(4) NOT NULL DEFAULT '1' COMMENT '场馆类型',
|
||||
`owner_id` int(11) NOT NULL DEFAULT '1' COMMENT '场馆类型',
|
||||
`member_id` int(11) NOT NULL,
|
||||
`status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态:0-未选中 1-已选中',
|
||||
`platform_id` int(11) NOT NULL COMMENT '平台来源ID',
|
||||
|
||||
@@ -53,6 +53,7 @@ public interface MemberLessonTicketMapper {
|
||||
* @param id 编号
|
||||
* @return 用户预约的场馆课程票号
|
||||
*/
|
||||
@NoPlatform
|
||||
MemberLessonTicket findById(Integer id);
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.sv.mapper;
|
||||
|
||||
import com.sv.annotation.NoPlatform;
|
||||
import com.sv.annotation.PlatformKey;
|
||||
import com.sv.dto.api.VenueLessonDTO;
|
||||
import com.sv.dto.app.VenueLessonStatus;
|
||||
|
||||
@@ -1,45 +1,22 @@
|
||||
package com.sv.service.api;
|
||||
|
||||
import com.enums.*;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.sv.dto.api.*;
|
||||
import com.sv.dto.api.wechat.OrderPaySignResponse;
|
||||
import com.sv.entity.*;
|
||||
import com.sv.exception.api.ExceptionCodeTemplate;
|
||||
import com.sv.mapper.MemberLessonTicketMapper;
|
||||
import com.sv.mapper.MemberTicketInviteMapper;
|
||||
import com.sv.mapper.VenueLessonMapper;
|
||||
import com.sv.service.api.util.DateUtilCard;
|
||||
import com.sv.service.common.RedisLock;
|
||||
import com.sv.service.message.AsyncTaskUtil;
|
||||
import com.sv.service.message.NotifyAdminMsgThread;
|
||||
import com.ydd.framework.core.common.Pagination;
|
||||
import com.ydd.framework.core.common.utils.ValidationUtils;
|
||||
import com.ydd.framework.core.entity.enums.DeletedEnum;
|
||||
import com.ydd.framework.core.entity.enums.StatusEnum;
|
||||
import com.ydd.framework.core.exception.ServiceException;
|
||||
import com.ydd.framework.core.service.impl.BaseServiceImpl;
|
||||
import org.apache.commons.lang3.time.DateFormatUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.DecimalFormat;
|
||||
import java.time.LocalTime;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.time.temporal.TemporalUnit;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import static com.sv.entity.Constants.LESSON_TICKET_LOCK_KEY;
|
||||
|
||||
/**
|
||||
* Service - 用户查询预订列表
|
||||
*
|
||||
@@ -70,7 +47,7 @@ public class MemberTicketEnterService extends BaseServiceImpl {
|
||||
if (memberLessonTicket == null) {
|
||||
res.setErrCode("2");
|
||||
res.setMsg("未找到对应的预订信息");
|
||||
}
|
||||
}// TODO 查询场馆表
|
||||
// 判断场馆是否已经超时
|
||||
VenueLesson venueLesson = venueLessonMapper.findById(memberLessonTicket.getLessonId());
|
||||
LocalTime endTime = venueLesson.getEndTime();
|
||||
|
||||
@@ -540,6 +540,7 @@
|
||||
<!--预约记录详情页-->
|
||||
<select id="memberLessonTicketDetail" resultMap="MemberLessonTicketDetailDtoMap">
|
||||
SELECT
|
||||
id,
|
||||
venue_id,
|
||||
lesson_id,
|
||||
member_card_id,
|
||||
|
||||
@@ -17,11 +17,11 @@
|
||||
</constructor>
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List" >
|
||||
id, owner_id, member_id, status, platform_id, created_id, modified_id, created_time,
|
||||
id, owner_id, member_id, status, platform_id, created_id, modified_id, created_time,
|
||||
modified_time, deleted
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
||||
select
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from sv_member_lesson_ticket_invite
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
@@ -31,13 +31,13 @@
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.sv.entity.MemberTicketInvite" >
|
||||
insert into sv_member_lesson_ticket_invite (id, owner_id, member_id,
|
||||
status, platform_id, created_id,
|
||||
modified_id, created_time, modified_time,
|
||||
insert into sv_member_lesson_ticket_invite (id, owner_id, member_id,
|
||||
status, platform_id, created_id,
|
||||
modified_id, created_time, modified_time,
|
||||
deleted)
|
||||
values (#{id,jdbcType=INTEGER}, #{ownerId,jdbcType=INTEGER}, #{memberId,jdbcType=INTEGER},
|
||||
#{status,jdbcType=INTEGER}, #{platformId,jdbcType=INTEGER}, #{createdId,jdbcType=INTEGER},
|
||||
#{modifiedId,jdbcType=INTEGER}, #{createdTime,jdbcType=TIMESTAMP}, #{modifiedTime,jdbcType=TIMESTAMP},
|
||||
values (#{id,jdbcType=INTEGER}, #{ownerId,jdbcType=INTEGER}, #{memberId,jdbcType=INTEGER},
|
||||
#{status,jdbcType=INTEGER}, #{platformId,jdbcType=INTEGER}, #{createdId,jdbcType=INTEGER},
|
||||
#{modifiedId,jdbcType=INTEGER}, #{createdTime,jdbcType=TIMESTAMP}, #{modifiedTime,jdbcType=TIMESTAMP},
|
||||
#{deleted,jdbcType=INTEGER})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.sv.entity.MemberTicketInvite" >
|
||||
@@ -160,14 +160,14 @@
|
||||
a.modified_time, a.deleted,b.mobile
|
||||
from sv_member_lesson_ticket_invite a,sv_member b
|
||||
where a.member_id = b.id
|
||||
owner_id = #{ticketId,jdbcType=INTEGER}
|
||||
and owner_id = #{ticketId,jdbcType=INTEGER}
|
||||
</select>
|
||||
|
||||
<select id="findByTicketIdAndMember" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
||||
<select id="findByTicketIdAndMember" resultType="java.lang.Integer" parameterType="java.lang.Integer" >
|
||||
select count(1)
|
||||
from sv_member_lesson_ticket_invite
|
||||
where member_id = #{memberId,jdbcType=INTEGER}
|
||||
owner_id = #{ticketId,jdbcType=INTEGER}
|
||||
and owner_id = #{ticketId,jdbcType=INTEGER}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user