| | |
| | | select |
| | | ts.id, ts.name |
| | | from t_subject ts |
| | | <if test="deptIds != null and deptIds.size > 0"> |
| | | <if test="admin == false and deptIds != null and deptIds.size > 0"> |
| | | INNER JOIN t_subject_dept tsd ON tsd.subject_id = ts.id |
| | | AND tsd.dept_id IN |
| | | <foreach collection="deptIds" open="(" separator="," close=")" item="deptId">#{deptId}</foreach> |
| | |
| | | where ts.deleted = 0 |
| | | </select> |
| | | |
| | | <select id="listByDeptId" resultMap="BaseResultMap"> |
| | | select ts.id, |
| | | ts.name |
| | | from t_subject ts |
| | | INNER JOIN t_subject_dept tsd ON tsd.subject_id = ts.id |
| | | AND tsd.dept_id = #{deptId} |
| | | where ts.deleted = 0 |
| | | </select> |
| | | |
| | | |
| | | <select id="page" resultMap="BaseResultMap" |
| | | parameterType="com.mindskip.xzs.viewmodel.admin.education.SubjectPageRequestVM"> |
| | | SELECT |