Browse Source

条件限制

change 4 years ago
parent
commit
a620e06afe

+ 3 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/service/impl/SchoolServiceImpl.java

@@ -132,6 +132,9 @@ public class SchoolServiceImpl extends ServiceImpl<SchoolMapper, School> impleme
      * @param entity 实体类数据
      */
     private void validEntityBeforeSave(School entity){
+        SchoolQueryBo schoolQueryBo = new SchoolQueryBo();
+        schoolQueryBo.setSchoolName(entity.getSchoolName());
+        List<SchoolVo> schoolVos = baseMapper.queryList(schoolQueryBo);
         //TODO 做一些数据校验,如唯一约束
     }
 

+ 1 - 1
zhongzheng-system/src/main/resources/mapper/modules/course/CourseBusinessMapper.xml

@@ -57,7 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             AND b.encoder = #{encoder}
         </if>
         <if test="projectId != null and projectId != ''">
-            AND b.id = #{projectId}
+            AND p.id = #{projectId}
         </if>
         <if test="educationId != null and educationId != ''">
             AND e.id = #{educationId}