Browse Source

1、 报表中心新增学员小课记录导出

zouxuan 3 years ago
parent
commit
18aacfd33e

+ 2 - 2
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CourseScheduleStudentPaymentDao.java

@@ -568,7 +568,7 @@ public interface CourseScheduleStudentPaymentDao extends BaseDAO<Long, CourseSch
     * @author zx
     * @date 2021/11/5 11:30
     */
-    boolean hasCourse(Integer organId);
+    boolean hasCourse(@Param("organId") Integer organId);
 
     /**
     * @description:  报表中心学员小课记录导出
@@ -577,5 +577,5 @@ public interface CourseScheduleStudentPaymentDao extends BaseDAO<Long, CourseSch
     * @author zx
     * @date 2021/11/5 11:54 
     */
-    List<StudentVipPracticeExportDto> exportStudentVipPractice(Integer organId);
+    List<StudentVipPracticeExportDto> exportStudentVipPractice(@Param("organId") Integer organId);
 }

+ 2 - 2
mec-biz/src/main/resources/config/mybatis/CourseScheduleStudentPaymentMapper.xml

@@ -839,7 +839,7 @@
 		LEFT JOIN course_schedule_student_payment cssp FORCE INDEX(group_type_) ON cssp.user_id_ = s.user_id_
 		WHERE cssp.group_type_ IN ('VIP','PRACTICE')
 		<if test="organId != null">
-			su.organ_id_ = #{organId}
+			AND su.organ_id_ = #{organId}
 		</if>
 		LIMIT 1
 	</select>
@@ -871,7 +871,7 @@
 		LEFT JOIN course_schedule cs ON cs.id_ = cssp.course_schedule_id_
 		LEFT JOIN sys_user sut ON cs.actual_teacher_id_ = sut.id_
 		WHERE cssp.group_type_ IN ('VIP','PRACTICE')
-		<if test="organId">
+		<if test="organId != null">
 			AND su.organ_id_ = #{organId}
 		</if>
 		GROUP BY s.user_id_

+ 1 - 1
mec-web/src/main/java/com/ym/mec/web/controller/ExportController.java

@@ -1444,7 +1444,7 @@ public class ExportController extends BaseController {
 
 
     @ApiOperation(value = "学员小课记录导出")
-    @PostMapping("export/studentVipPractice")
+    @RequestMapping("export/studentVipPractice")
     @PreAuthorize("@pcs.hasPermissions('export/studentVipPractice')")
     public HttpResponseResult exportStudentVipPractice(Integer organId) throws IOException {
         boolean hasCourse = courseScheduleStudentPaymentDao.hasCourse(organId);