From d01fa2df1b46f45647e82be6d1476ea1e295f995 Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期日, 27 十月 2024 21:31:53 +0800 Subject: [PATCH] 一个班级可以有多个老师 --- src/main/java/com/ycl/jxkg/mapper/SubjectMapper.java | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/ycl/jxkg/mapper/SubjectMapper.java b/src/main/java/com/ycl/jxkg/mapper/SubjectMapper.java index c9d297e..abc041f 100644 --- a/src/main/java/com/ycl/jxkg/mapper/SubjectMapper.java +++ b/src/main/java/com/ycl/jxkg/mapper/SubjectMapper.java @@ -1,9 +1,11 @@ package com.ycl.jxkg.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.ycl.jxkg.domain.Subject; -import com.ycl.jxkg.vo.admin.education.SubjectPageRequestVO; +import com.ycl.jxkg.domain.entity.Subject; +import com.ycl.jxkg.domain.vo.admin.education.SubjectPageRequestVO; +import com.ycl.jxkg.domain.vo.admin.education.SubjectResponseVO; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Select; import java.util.List; @@ -14,5 +16,8 @@ List<Subject> allSubject(); - List<Subject> page(SubjectPageRequestVO requestVM); + List<SubjectResponseVO> page(SubjectPageRequestVO requestVM); + + @Select("select ifnull(count(*) + 1, 1) from t_subject where deleted = 0") + Integer getItemOrder(); } -- Gitblit v1.8.0