DrawLotGroupDictMapper.xml
1.06 KB
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zhongzhi.dao.DrawLotGroupDictMapper">
<select id="groupJudges" resultType="com.zhongzhi.vo.drawlots.GroupJudgesVO">
SELECT
t2.id,
t.expector_type,
t2.username
FROM
draw_lots_group_judges t
LEFT JOIN project_judge t2 ON t.judge_id = t2.id
WHERE
t.delete_time IS NULL
AND t2.delete_time IS NULL
<if test="roleType != null and roleType != ''">
AND t.role_type = #{roleType}
</if>
and t.group_id = #{groupId}
</select>
<select id="groupNums" resultType="java.lang.Integer">
SELECT
t.group_num
FROM
draw_lots_group_items t
WHERE
t.delete_time IS NULL
AND t.group_num IS NOT NULL
AND t.group_id = #{groupId}
order by group_num
</select>
</mapper>