liurunyu
2025-03-26 b4bc05b29aa6d71072efdf39caf1808b4e69eca4
pipIrr-platform/pipIrr-global/src/main/resources/mapper/IrGroupClientMapper.xml
@@ -105,28 +105,4 @@
        where id = #{id,jdbcType=BIGINT}
    </update>
    <!--根据农户编号获取轮灌组数量-->
    <select id="getGroupCountByClientId" resultType="java.lang.Long">
        SELECT
            count(*)
        FROM ir_irrigate_group grp
            INNER JOIN ir_group_client gc ON gc.group_id = grp.id
        WHERE grp.deleted = 0 AND gc.client_id = #{clientId}
    </select>
    <!--根据农户编号获取轮灌组列表-->
    <select id="getGroupsByClientId" resultType="com.dy.pipIrrGlobal.voIr.VoGroupSimple">
        SELECT
            grp.id  AS groupId,
            grp.group_code AS groupCode
        FROM ir_irrigate_group grp
            INNER JOIN ir_group_client gc ON gc.group_id = grp.id
        WHERE grp.deleted = 0 AND gc.client_id = #{clientId}
        ORDER BY grp.group_code
        <trim prefix="limit ">
            <if test="start != null and count != null">
                #{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER}
            </if>
        </trim>
    </select>
</mapper>