feat: bug修复

This commit is contained in:
2024-02-26 21:50:29 +08:00
parent 85d0b1e6c9
commit e13b3f7c2d
13 changed files with 226 additions and 27 deletions

View File

@@ -70,5 +70,7 @@ public interface SubjectCategoryDao {
int deleteById(Long id);
List<SubjectCategory> queryCategory(SubjectCategory subjectCategory);
Integer querySubjectCount(Long id);
}

View File

@@ -49,4 +49,6 @@ public interface SubjectCategoryService {
* @return
*/
List<SubjectCategory> queryCategory(SubjectCategory subjectCategory);
Integer querySubjectCount(Long id);
}

View File

@@ -75,4 +75,9 @@ public class SubjectCategoryServiceImpl implements SubjectCategoryService {
public List<SubjectCategory> queryCategory(SubjectCategory subjectCategory) {
return this.subjectCategoryDao.queryCategory(subjectCategory);
}
@Override
public Integer querySubjectCount(Long id) {
return this.subjectCategoryDao.querySubjectCount(id);
}
}

View File

@@ -105,6 +105,13 @@
</if>
</where>
</select>
<select id="querySubjectCount" resultType="java.lang.Integer">
select count(distinct subject_id)
from subject_mapping a,
subject_label b
where a.label_id=b.id
and b.category_id=#{id}
</select>
<!--新增所有列-->
<insert id="insert" keyProperty="id" useGeneratedKeys="true">