diff --git a/api/src/main/resources/logback.xml b/api/src/main/resources/logback.xml index d235aa6..8022e88 100644 --- a/api/src/main/resources/logback.xml +++ b/api/src/main/resources/logback.xml @@ -1,7 +1,7 @@ - + diff --git a/entity/src/main/java/com/sv/dto/api/VenueDTO.java b/entity/src/main/java/com/sv/dto/api/VenueDTO.java index 8553003..bb094b2 100644 --- a/entity/src/main/java/com/sv/dto/api/VenueDTO.java +++ b/entity/src/main/java/com/sv/dto/api/VenueDTO.java @@ -1,10 +1,14 @@ package com.sv.dto.api; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.sv.entity.VenueCard; import com.sv.entity.VenueImage; import com.sv.entity.VenuePrice; +import com.sv.json.LocalTimeSerializer; +import org.springframework.format.annotation.DateTimeFormat; import java.io.Serializable; +import java.time.LocalTime; import java.util.Date; import java.math.*; import java.util.List; @@ -132,6 +136,18 @@ public class VenueDTO implements Serializable { */ private Integer limitWeek; + /** + * 复制周几 + */ + private Integer copyWeek; + + /** + * 复制时间 + */ + @DateTimeFormat(iso = DateTimeFormat.ISO.TIME) + @JsonSerialize(using = LocalTimeSerializer.class) + private LocalTime copyTime; + /** * 场馆图片列表 */ @@ -553,4 +569,20 @@ public class VenueDTO implements Serializable { public void setLimitWeek(Integer limitWeek) { this.limitWeek = limitWeek; } + + public Integer getCopyWeek() { + return copyWeek; + } + + public void setCopyWeek(Integer copyWeek) { + this.copyWeek = copyWeek; + } + + public LocalTime getCopyTime() { + return copyTime; + } + + public void setCopyTime(LocalTime copyTime) { + this.copyTime = copyTime; + } } diff --git a/entity/src/main/java/com/sv/entity/Venue.java b/entity/src/main/java/com/sv/entity/Venue.java index 70b0e83..692fbd6 100644 --- a/entity/src/main/java/com/sv/entity/Venue.java +++ b/entity/src/main/java/com/sv/entity/Venue.java @@ -30,6 +30,18 @@ public class Venue implements Serializable { */ private String name; + /** + * 复制周几 + */ + private Integer copyWeek; + + /** + * 复制时间 + */ + @DateTimeFormat(iso = DateTimeFormat.ISO.TIME) + @JsonSerialize(using = LocalTimeSerializer.class) + private LocalTime copyTime; + /** * 地址 */ @@ -600,4 +612,20 @@ public class Venue implements Serializable { public void setLimitWeek(Integer limitWeek) { this.limitWeek = limitWeek; } + + public Integer getCopyWeek() { + return copyWeek; + } + + public void setCopyWeek(Integer copyWeek) { + this.copyWeek = copyWeek; + } + + public LocalTime getCopyTime() { + return copyTime; + } + + public void setCopyTime(LocalTime copyTime) { + this.copyTime = copyTime; + } } diff --git a/netty-pad/src/main/resources/logback.xml b/netty-pad/src/main/resources/logback.xml index 6e2cbdd..0fd9d32 100644 --- a/netty-pad/src/main/resources/logback.xml +++ b/netty-pad/src/main/resources/logback.xml @@ -1,7 +1,7 @@ - + diff --git a/oms/pom.xml b/oms/pom.xml index 6fac529..f6c8045 100644 --- a/oms/pom.xml +++ b/oms/pom.xml @@ -36,6 +36,10 @@ org.springframework.boot spring-boot-starter-web + + org.springframework.boot + spring-boot-starter-test + diff --git a/oms/src/main/resources/logback.xml b/oms/src/main/resources/logback.xml index cc1d16f..c76e843 100644 --- a/oms/src/main/resources/logback.xml +++ b/oms/src/main/resources/logback.xml @@ -1,7 +1,7 @@ - + diff --git a/service/src/main/java/com/sv/mapper/VenueLessonMapper.java b/service/src/main/java/com/sv/mapper/VenueLessonMapper.java index de49709..a446e4d 100644 --- a/service/src/main/java/com/sv/mapper/VenueLessonMapper.java +++ b/service/src/main/java/com/sv/mapper/VenueLessonMapper.java @@ -157,4 +157,6 @@ public interface VenueLessonMapper { List getCopyLesson(@Param("venueId") Integer venueId,@Param("date") Date date); void copyImg(@Param("id") Integer id,@Param("nId") Integer nId); + + List findAllForCopy(@Param("leftTime") String leftTime, @Param("rightTime") String rightTime); } diff --git a/service/src/main/java/com/sv/service/api/util/DateUtilCard.java b/service/src/main/java/com/sv/service/api/util/DateUtilCard.java index f1ee2c3..6e7b696 100644 --- a/service/src/main/java/com/sv/service/api/util/DateUtilCard.java +++ b/service/src/main/java/com/sv/service/api/util/DateUtilCard.java @@ -156,4 +156,11 @@ public class DateUtilCard { return calendar.getTime(); //这个时间就是日期往后推一天的结果 } + public static Date addDays(Date date,int days){ + Calendar calendar = new GregorianCalendar(); + calendar.setTime(date); + calendar.add(calendar.DATE,days); //把日期往后增加一天,整数 往后推,负数往前移动 + return calendar.getTime(); //这个时间就是日期往后推一天的结果 + } + } diff --git a/service/src/main/java/com/sv/service/oms/VenueLessonService.java b/service/src/main/java/com/sv/service/oms/VenueLessonService.java index 348a396..3add635 100644 --- a/service/src/main/java/com/sv/service/oms/VenueLessonService.java +++ b/service/src/main/java/com/sv/service/oms/VenueLessonService.java @@ -290,6 +290,15 @@ public class VenueLessonService extends BaseServiceImpl { return pagination; } + /** + * 查询场馆课程 + * + * @return 需要拷贝的场馆课程 + */ + public List findAllForCopy(String leftTime, String rightTime) { + return venueLessonMapper.findAllForCopy(leftTime, rightTime); + } + /** * 查看教练有多少课程 * @param id diff --git a/service/src/main/resources/mybatis/mapper/sv/VenueLessonMapper.xml b/service/src/main/resources/mybatis/mapper/sv/VenueLessonMapper.xml index db01587..512c996 100644 --- a/service/src/main/resources/mybatis/mapper/sv/VenueLessonMapper.xml +++ b/service/src/main/resources/mybatis/mapper/sv/VenueLessonMapper.xml @@ -670,4 +670,19 @@ ) + + diff --git a/service/src/main/resources/mybatis/mapper/sv/VenueMapper.xml b/service/src/main/resources/mybatis/mapper/sv/VenueMapper.xml index b06d300..b6be2d7 100644 --- a/service/src/main/resources/mybatis/mapper/sv/VenueMapper.xml +++ b/service/src/main/resources/mybatis/mapper/sv/VenueMapper.xml @@ -30,6 +30,8 @@ + + @@ -54,6 +56,8 @@ + + @@ -111,7 +115,9 @@ code_url, deleted, limit_day, - limit_week + limit_week, + copy_week, + copy_time @@ -137,6 +143,8 @@ #{deleted, jdbcType=TINYINT} #{limit_day, jdbcType=TINYINT} #{limit_week, jdbcType=TINYINT} + #{copy_week, jdbcType=TINYINT} + #{copy_time, jdbcType=TIMESTAMP} @@ -265,6 +273,12 @@ limit_week, + + copy_week, + + + copy_time, + @@ -345,6 +359,12 @@ #{limitWeek}, + + #{copyWeek}, + + + #{copyTime}, + @@ -456,6 +476,12 @@ limit_week = #{limitWeek}, + + copy_week = #{copyWeek}, + + + copy_time = #{copyTime}, + WHERE id = #{id} @@ -493,7 +519,9 @@ latitude, card_content, limit_day, - limit_week + limit_week, + copy_week, + copy_time FROM sv_venue WHERE