Browse Source

修改SQL

chenw 7 years ago
parent
commit
010f5df790

+ 2 - 2
applications/school/school-server/src/main/resources/mapper/NotifyMapper.xml

@@ -227,8 +227,8 @@
   </select>
 
     <select id="selectNoticer" parameterType="long" resultType="com.usoftchina.smartschool.school.po.SchoolNoticer">
-        select openid,parents_name noticer,parentstu.stu_id personId,'1' type from sys_parents parent left join sys_parents_stu parentstu on parent.parent_id = parentstu.parent_id where school_id=1 and ifnull(openid,'') != '' and parents_status=1
+        select openid,parents_name noticer,parentstu.stu_id personId,'1' type from sys_parents parent left join sys_parents_stu parentstu on parent.parent_id = parentstu.parent_id where school_id=#{schoolId} and ifnull(openid,'') != '' and parents_status=1
         union all
-        select openid,teacher_name noticer,teacher_id personId, '0' type from sys_teacher where school_id=1 and ifnull(openid,'') != '' and teacher_status=1
+        select openid,teacher_name noticer,teacher_id personId, '0' type from sys_teacher where school_id=#{schoolId} and ifnull(openid,'') != '' and teacher_status=1
     </select>
 </mapper>