From a0a9fc7a58a39626a395d2760194641726e1cd35 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期五, 25 四月 2025 10:48:15 +0800
Subject: [PATCH] 1、微信小程序后端轮灌迟延时长改为可配置的; 2、微信小程序查询取水口接口实现修改,改为后端模糊查询;

---
 pipIrr-platform/pipIrr-global/src/main/resources/mapper/IrGroupUnitMapper.xml |   86 +++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 86 insertions(+), 0 deletions(-)

diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/IrGroupUnitMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/IrGroupUnitMapper.xml
new file mode 100644
index 0000000..de655c8
--- /dev/null
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/IrGroupUnitMapper.xml
@@ -0,0 +1,86 @@
+<?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.dy.pipIrrGlobal.daoIr.IrGroupUnitMapper">
+    <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoIr.IrGroupUnit">
+        <!--@mbg.generated-->
+        <!--@Table ir_group_unit-->
+        <id column="id" jdbcType="BIGINT" property="id" />
+        <result column="group_id" jdbcType="BIGINT" property="groupId" />
+        <result column="unit_id" jdbcType="BIGINT" property="unitId" />
+        <result column="operator" jdbcType="BIGINT" property="operator" />
+        <result column="operate_time" jdbcType="TIMESTAMP" property="operateDt" />
+    </resultMap>
+    <sql id="Base_Column_List">
+        <!--@mbg.generated-->
+        id, group_id, unit_id, `operator`,
+        operate_time
+    </sql>
+
+    <!--娣诲姞-->
+    <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoIr.IrGroupUnit">
+        <!--@mbg.generated-->
+        insert into ir_group_unit
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">
+                id,
+            </if>
+            <if test="groupId != null">
+                group_id,
+            </if>
+            <if test="unitId != null">
+                unit_id,
+            </if>
+            <if test="operator != null">
+                `operator`,
+            </if>
+            <if test="operateDt != null">
+                operate_time,
+            </if>
+
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">
+                #{id,jdbcType=BIGINT},
+            </if>
+            <if test="groupId != null">
+                #{groupId,jdbcType=BIGINT},
+            </if>
+            <if test="unitId != null">
+                #{unitId,jdbcType=BIGINT},
+            </if>
+            <if test="operator != null">
+                #{operator,jdbcType=BIGINT},
+            </if>
+            <if test="operateDt != null">
+                #{operateDt,jdbcType=TIMESTAMP},
+            </if>
+
+        </trim>
+    </insert>
+
+
+
+    <delete id="deleteByUnitIdGroupId" parameterType="com.dy.pipIrrGlobal.pojoIr.IrGroupUnit">
+        delete from ir_group_unit
+        where group_id = #{groupId,jdbcType=BIGINT} and unit_id = #{unitId,jdbcType=BIGINT}
+    </delete>
+
+    <delete id="deleteByUnitId">
+        delete from ir_group_unit
+        where unit_id = #{unitId,jdbcType=BIGINT}
+    </delete>
+
+    <delete id="deleteByGroupId">
+        delete from ir_group_unit
+        where group_id = #{groupId,jdbcType=BIGINT}
+    </delete>
+
+<!--    //鏌ヤ竴涓疆鐏岀粍缁戝畾鐨勭亴婧夊崟鍏僫d-->
+    <select id="getGroupBindUnits" parameterType="Long" resultType="java.lang.Long">
+        SELECT unit_id AS unitId FROM `ir_group_unit`WHERE group_id = #{groupId,jdbcType=BIGINT}
+    </select>
+
+    <select id="getNotBindUnits" resultType="java.lang.Long">
+        SELECT id FROM ir_irrigate_unit  WHERE id NOT IN (SELECT unit_id  FROM ir_group_unit)
+    </select>
+</mapper>
\ No newline at end of file

--
Gitblit v1.8.0