zhangxin 3 dias atrás
pai
commit
a83a44b25a

+ 6 - 0
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/app/vo/course/CourseResponseVo.java

@@ -1,10 +1,12 @@
 package org.jeecg.modules.app.vo.course;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
 import org.jeecg.modules.app.dto.PageDTO;
+import org.springframework.format.annotation.DateTimeFormat;
 
 import java.math.BigDecimal;
 import java.util.Date;
@@ -39,8 +41,12 @@ public class CourseResponseVo extends PageDTO {
     @Schema(description = "课时数")
     private Integer coursesNum;
     @Schema(description = "开始时间")
+    @JsonFormat(timezone = "GMT+8",pattern = "MM-dd")
+    @DateTimeFormat(pattern="MM-dd")
     private Date startTime;
     @Schema(description = "结束时间")
+    @JsonFormat(timezone = "GMT+8",pattern = "MM-dd")
+    @DateTimeFormat(pattern="MM-d")
     private Date endTime;
     @Schema(description = "年销售数")
     private Integer annualSalesNum;

+ 3 - 3
national-motion-module-system/national-motion-system-biz/src/main/java/org/jeecg/modules/system/app/mapper/xml/AppCoursesMapper.xml

@@ -86,11 +86,11 @@
     </select>
     <select id="findByCourseList" resultType="org.jeecg.modules.app.vo.course.CourseResponseVo">
         select b.`name`,e.address,b.original_price,b.selling_price
-             ,b.id,b.price_type,b.good_rate,e.latitude,e.longitude,count(c.courses_id) as coursesNum
+             ,b.id,b.price_type,b.good_rate,e.latitude,e.longitude,count(c.courses_id) as coursesNum,b.start_time,b.end_time
         FROM nm_courses b
         LEFT JOIN nm_courses_price_rules c on b.id= c.courses_id
         LEFT JOIN nm_site e on e.id = b.address_site_id
-        where 1=1
+        where 1=1 and b.racking_status=0
         <if test="courseRequestVo.instructorId != null and courseRequestVo.instructorId !=''">
             and  b.user_id=#{courseRequestVo.instructorId}
         </if>
@@ -201,7 +201,7 @@
     <select id="findByInstructorId" resultType="java.lang.String">
         select  b.id  from nm_instructor a
          left join  nm_courses  b   on a.user_id =b.user_id and a.del_flag =0
-         where a.id =#{instructorId}
+         where a.user_id =#{instructorId}
     </select>
     <select id="getPageCourse" resultType="org.jeecg.modules.app.vo.AppCoursesPageVO">
         SELECT