LaborGroupDictMapper.xml
813 Bytes
<?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.subsidy.mapper.LaborGroupDictMapper">
<select id="allGroups" parameterType="long" resultType="com.subsidy.vo.labor.AllGroupsVO">
SELECT
t.id,
t.group_name,
count(t2.member_id) as cnt
FROM
labor_group_dict t
LEFT JOIN group_member_mapping t2 ON t.id = t2.group_id
WHERE
t.delete_date IS NULL
AND t2.delete_date IS NULL
and t.labor_id = #{laborId}
GROUP BY
t.id,
t.group_name
</select>
<select id="getProjectId" parameterType="long" resultType="long">
</select>
</mapper>