| | |
| | | DELETE |
| | | FROM t_dept_question |
| | | WHERE question_id = #{questionId} |
| | | AND dept_id IN |
| | | <foreach collection="deptIds" open="(" separator="," close=")" item="deptId"> |
| | | #{deptId} |
| | | </foreach> |
| | | <if test="deptIds != null and deptIds.size > 0"> |
| | | AND dept_id IN |
| | | <foreach collection="deptIds" open="(" separator="," close=")" item="deptId"> |
| | | #{deptId} |
| | | </foreach> |
| | | </if> |
| | | </delete> |
| | | |
| | | <select id="deptByQuestionId" resultType="com.mindskip.xzs.domain.vo.DeptQuestionVO"> |
| | | SELECT tdq.dept_id, td.name as deptName FROM t_dept_question tdq INNER JOIN t_department td ON td.id = tdq.dept_id WHERE tdq.question_id = #{questionId} |
| | | SELECT tdq.dept_id, td.name as deptName |
| | | FROM t_dept_question tdq |
| | | INNER JOIN t_department td ON td.id = tdq.dept_id |
| | | WHERE tdq.question_id = #{questionId} |
| | | </select> |
| | | |
| | | </mapper> |